diff --git a/go.mod b/go.mod index 9ad864737536b..4598f699727ca 100644 --- a/go.mod +++ b/go.mod @@ -17,8 +17,8 @@ require ( github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 github.com/hashicorp/go-azure-helpers v0.70.1 - github.com/hashicorp/go-azure-sdk/resource-manager v0.20240715.1103416 - github.com/hashicorp/go-azure-sdk/sdk v0.20240715.1103416 + github.com/hashicorp/go-azure-sdk/resource-manager v0.20240731.1170959 + github.com/hashicorp/go-azure-sdk/sdk v0.20240731.1170959 github.com/hashicorp/go-hclog v1.6.3 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-uuid v1.0.3 diff --git a/go.sum b/go.sum index 8ae94e005fb1f..90c7df2bc4048 100644 --- a/go.sum +++ b/go.sum @@ -93,10 +93,10 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-azure-helpers v0.70.1 h1:7hlnRrZobMZxpOzdlNEsayzAayj/KRG4wpDS1jgo4GM= github.com/hashicorp/go-azure-helpers v0.70.1/go.mod h1:BmbF4JDYXK5sEmFeU5hcn8Br21uElcqLfdQxjatwQKw= -github.com/hashicorp/go-azure-sdk/resource-manager v0.20240715.1103416 h1:TEAZyGtJoBPIxE0bif+fjLE0SurzU95pOTM0CILUnh0= -github.com/hashicorp/go-azure-sdk/resource-manager v0.20240715.1103416/go.mod h1:8rhCtgnQvMPQEhKxYJjdxAEhodA9sOT+GzVRvzJYYvk= -github.com/hashicorp/go-azure-sdk/sdk v0.20240715.1103416 h1:84S+8LdbZLDAUo1+dOr2lq13/hIzHnPxX/QokzGDKo4= -github.com/hashicorp/go-azure-sdk/sdk v0.20240715.1103416/go.mod h1:dMKF6bXrgGmy1d3pLzkmBpG2JIHgSAV2/OMSCEgyMwE= +github.com/hashicorp/go-azure-sdk/resource-manager v0.20240731.1170959 h1:+LR1JefVapkJ9ji+2DTB++1B4C4PmsgGUvXEa4lGfYs= +github.com/hashicorp/go-azure-sdk/resource-manager v0.20240731.1170959/go.mod h1:uyPIWhT9t9mul2yXK170ez6JbUcSlt60q59UowFspCE= +github.com/hashicorp/go-azure-sdk/sdk v0.20240731.1170959 h1:KhOjnnQkEyM1to5ltI//BcgkFu+3h6yJjmBLrXjLFz0= +github.com/hashicorp/go-azure-sdk/sdk v0.20240731.1170959/go.mod h1:dMKF6bXrgGmy1d3pLzkmBpG2JIHgSAV2/OMSCEgyMwE= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_commonexportproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_commonexportproperties.go deleted file mode 100644 index 814103b70a7db..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_commonexportproperties.go +++ /dev/null @@ -1,31 +0,0 @@ -package exports - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommonExportProperties struct { - Definition ExportDefinition `json:"definition"` - DeliveryInfo ExportDeliveryInfo `json:"deliveryInfo"` - Format *FormatType `json:"format,omitempty"` - NextRunTimeEstimate *string `json:"nextRunTimeEstimate,omitempty"` - PartitionData *bool `json:"partitionData,omitempty"` - RunHistory *ExportExecutionListResult `json:"runHistory,omitempty"` -} - -func (o *CommonExportProperties) GetNextRunTimeEstimateAsTime() (*time.Time, error) { - if o.NextRunTimeEstimate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.NextRunTimeEstimate, "2006-01-02T15:04:05Z07:00") -} - -func (o *CommonExportProperties) SetNextRunTimeEstimateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.NextRunTimeEstimate = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_export.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_export.go deleted file mode 100644 index ea296361983c3..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_export.go +++ /dev/null @@ -1,12 +0,0 @@ -package exports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Export struct { - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExportProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdeliverydestination.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdeliverydestination.go deleted file mode 100644 index 56cff46854a7e..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdeliverydestination.go +++ /dev/null @@ -1,12 +0,0 @@ -package exports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExportDeliveryDestination struct { - Container string `json:"container"` - ResourceId *string `json:"resourceId,omitempty"` - RootFolderPath *string `json:"rootFolderPath,omitempty"` - SasToken *string `json:"sasToken,omitempty"` - StorageAccount *string `json:"storageAccount,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecution.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecution.go deleted file mode 100644 index 5cddc2df1e6bc..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecution.go +++ /dev/null @@ -1,12 +0,0 @@ -package exports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExportExecution struct { - ETag *string `json:"eTag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExportExecutionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportproperties.go deleted file mode 100644 index 13dbc84cd87d4..0000000000000 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportproperties.go +++ /dev/null @@ -1,32 +0,0 @@ -package exports - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExportProperties struct { - Definition ExportDefinition `json:"definition"` - DeliveryInfo ExportDeliveryInfo `json:"deliveryInfo"` - Format *FormatType `json:"format,omitempty"` - NextRunTimeEstimate *string `json:"nextRunTimeEstimate,omitempty"` - PartitionData *bool `json:"partitionData,omitempty"` - RunHistory *ExportExecutionListResult `json:"runHistory,omitempty"` - Schedule *ExportSchedule `json:"schedule,omitempty"` -} - -func (o *ExportProperties) GetNextRunTimeEstimateAsTime() (*time.Time, error) { - if o.NextRunTimeEstimate == nil { - return nil, nil - } - return dates.ParseAsFormat(o.NextRunTimeEstimate, "2006-01-02T15:04:05Z07:00") -} - -func (o *ExportProperties) SetNextRunTimeEstimateAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.NextRunTimeEstimate = &formatted -} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/README.md similarity index 92% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/README.md rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/README.md index 77f79d25d0514..94ed874b9f12d 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/README.md +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/README.md @@ -1,7 +1,7 @@ -## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports` Documentation +## `github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports` Documentation -The `exports` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2021-10-01`). +The `exports` SDK allows for interaction with the Azure Resource Manager Service `costmanagement` (API Version `2023-07-01-preview`). This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). @@ -9,7 +9,7 @@ This readme covers example usages, but further information on [using this SDK ca ```go import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" -import "github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports" +import "github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports" ``` @@ -64,7 +64,12 @@ if model := read.Model; model != nil { ctx := context.TODO() id := exports.NewScopedExportID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "exportValue") -read, err := client.Execute(ctx, id) +payload := exports.ExportRunRequest{ + // ... +} + + +read, err := client.Execute(ctx, id, payload) if err != nil { // handle the error } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/client.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/client.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/client.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/constants.go similarity index 58% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/constants.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/constants.go index b4be448873d19..66ca3bde9456e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/constants.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/constants.go @@ -9,6 +9,126 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. +type CompressionModeType string + +const ( + CompressionModeTypeGzip CompressionModeType = "gzip" + CompressionModeTypeNone CompressionModeType = "None" +) + +func PossibleValuesForCompressionModeType() []string { + return []string{ + string(CompressionModeTypeGzip), + string(CompressionModeTypeNone), + } +} + +func (s *CompressionModeType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseCompressionModeType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseCompressionModeType(input string) (*CompressionModeType, error) { + vals := map[string]CompressionModeType{ + "gzip": CompressionModeTypeGzip, + "none": CompressionModeTypeNone, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := CompressionModeType(input) + return &out, nil +} + +type DataOverwriteBehaviorType string + +const ( + DataOverwriteBehaviorTypeCreateNewReport DataOverwriteBehaviorType = "CreateNewReport" + DataOverwriteBehaviorTypeOverwritePreviousReport DataOverwriteBehaviorType = "OverwritePreviousReport" +) + +func PossibleValuesForDataOverwriteBehaviorType() []string { + return []string{ + string(DataOverwriteBehaviorTypeCreateNewReport), + string(DataOverwriteBehaviorTypeOverwritePreviousReport), + } +} + +func (s *DataOverwriteBehaviorType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDataOverwriteBehaviorType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDataOverwriteBehaviorType(input string) (*DataOverwriteBehaviorType, error) { + vals := map[string]DataOverwriteBehaviorType{ + "createnewreport": DataOverwriteBehaviorTypeCreateNewReport, + "overwritepreviousreport": DataOverwriteBehaviorTypeOverwritePreviousReport, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DataOverwriteBehaviorType(input) + return &out, nil +} + +type DestinationType string + +const ( + DestinationTypeAzureBlob DestinationType = "AzureBlob" +) + +func PossibleValuesForDestinationType() []string { + return []string{ + string(DestinationTypeAzureBlob), + } +} + +func (s *DestinationType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseDestinationType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseDestinationType(input string) (*DestinationType, error) { + vals := map[string]DestinationType{ + "azureblob": DestinationTypeAzureBlob, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := DestinationType(input) + return &out, nil +} + type ExecutionStatus string const ( @@ -109,15 +229,25 @@ func parseExecutionType(input string) (*ExecutionType, error) { type ExportType string const ( - ExportTypeActualCost ExportType = "ActualCost" - ExportTypeAmortizedCost ExportType = "AmortizedCost" - ExportTypeUsage ExportType = "Usage" + ExportTypeActualCost ExportType = "ActualCost" + ExportTypeAmortizedCost ExportType = "AmortizedCost" + ExportTypeFocusCost ExportType = "FocusCost" + ExportTypePriceSheet ExportType = "PriceSheet" + ExportTypeReservationDetails ExportType = "ReservationDetails" + ExportTypeReservationRecommendations ExportType = "ReservationRecommendations" + ExportTypeReservationTransactions ExportType = "ReservationTransactions" + ExportTypeUsage ExportType = "Usage" ) func PossibleValuesForExportType() []string { return []string{ string(ExportTypeActualCost), string(ExportTypeAmortizedCost), + string(ExportTypeFocusCost), + string(ExportTypePriceSheet), + string(ExportTypeReservationDetails), + string(ExportTypeReservationRecommendations), + string(ExportTypeReservationTransactions), string(ExportTypeUsage), } } @@ -137,9 +267,14 @@ func (s *ExportType) UnmarshalJSON(bytes []byte) error { func parseExportType(input string) (*ExportType, error) { vals := map[string]ExportType{ - "actualcost": ExportTypeActualCost, - "amortizedcost": ExportTypeAmortizedCost, - "usage": ExportTypeUsage, + "actualcost": ExportTypeActualCost, + "amortizedcost": ExportTypeAmortizedCost, + "focuscost": ExportTypeFocusCost, + "pricesheet": ExportTypePriceSheet, + "reservationdetails": ExportTypeReservationDetails, + "reservationrecommendations": ExportTypeReservationRecommendations, + "reservationtransactions": ExportTypeReservationTransactions, + "usage": ExportTypeUsage, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil @@ -150,6 +285,50 @@ func parseExportType(input string) (*ExportType, error) { return &out, nil } +type FilterItemNames string + +const ( + FilterItemNamesLookBackPeriod FilterItemNames = "LookBackPeriod" + FilterItemNamesReservationScope FilterItemNames = "ReservationScope" + FilterItemNamesResourceType FilterItemNames = "ResourceType" +) + +func PossibleValuesForFilterItemNames() []string { + return []string{ + string(FilterItemNamesLookBackPeriod), + string(FilterItemNamesReservationScope), + string(FilterItemNamesResourceType), + } +} + +func (s *FilterItemNames) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseFilterItemNames(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseFilterItemNames(input string) (*FilterItemNames, error) { + vals := map[string]FilterItemNames{ + "lookbackperiod": FilterItemNamesLookBackPeriod, + "reservationscope": FilterItemNamesReservationScope, + "resourcetype": FilterItemNamesResourceType, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := FilterItemNames(input) + return &out, nil +} + type FormatType string const ( @@ -191,12 +370,14 @@ func parseFormatType(input string) (*FormatType, error) { type GranularityType string const ( - GranularityTypeDaily GranularityType = "Daily" + GranularityTypeDaily GranularityType = "Daily" + GranularityTypeMonthly GranularityType = "Monthly" ) func PossibleValuesForGranularityType() []string { return []string{ string(GranularityTypeDaily), + string(GranularityTypeMonthly), } } @@ -215,7 +396,8 @@ func (s *GranularityType) UnmarshalJSON(bytes []byte) error { func parseGranularityType(input string) (*GranularityType, error) { vals := map[string]GranularityType{ - "daily": GranularityTypeDaily, + "daily": GranularityTypeDaily, + "monthly": GranularityTypeMonthly, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil @@ -276,14 +458,16 @@ func parseRecurrenceType(input string) (*RecurrenceType, error) { type StatusType string const ( - StatusTypeActive StatusType = "Active" - StatusTypeInactive StatusType = "Inactive" + StatusTypeActive StatusType = "Active" + StatusTypeInactive StatusType = "Inactive" + StatusTypeSystemSuspended StatusType = "SystemSuspended" ) func PossibleValuesForStatusType() []string { return []string{ string(StatusTypeActive), string(StatusTypeInactive), + string(StatusTypeSystemSuspended), } } @@ -302,8 +486,9 @@ func (s *StatusType) UnmarshalJSON(bytes []byte) error { func parseStatusType(input string) (*StatusType, error) { vals := map[string]StatusType{ - "active": StatusTypeActive, - "inactive": StatusTypeInactive, + "active": StatusTypeActive, + "inactive": StatusTypeInactive, + "systemsuspended": StatusTypeSystemSuspended, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil @@ -320,6 +505,7 @@ const ( TimeframeTypeBillingMonthToDate TimeframeType = "BillingMonthToDate" TimeframeTypeCustom TimeframeType = "Custom" TimeframeTypeMonthToDate TimeframeType = "MonthToDate" + TimeframeTypeTheCurrentMonth TimeframeType = "TheCurrentMonth" TimeframeTypeTheLastBillingMonth TimeframeType = "TheLastBillingMonth" TimeframeTypeTheLastMonth TimeframeType = "TheLastMonth" TimeframeTypeWeekToDate TimeframeType = "WeekToDate" @@ -330,6 +516,7 @@ func PossibleValuesForTimeframeType() []string { string(TimeframeTypeBillingMonthToDate), string(TimeframeTypeCustom), string(TimeframeTypeMonthToDate), + string(TimeframeTypeTheCurrentMonth), string(TimeframeTypeTheLastBillingMonth), string(TimeframeTypeTheLastMonth), string(TimeframeTypeWeekToDate), @@ -354,6 +541,7 @@ func parseTimeframeType(input string) (*TimeframeType, error) { "billingmonthtodate": TimeframeTypeBillingMonthToDate, "custom": TimeframeTypeCustom, "monthtodate": TimeframeTypeMonthToDate, + "thecurrentmonth": TimeframeTypeTheCurrentMonth, "thelastbillingmonth": TimeframeTypeTheLastBillingMonth, "thelastmonth": TimeframeTypeTheLastMonth, "weektodate": TimeframeTypeWeekToDate, diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/id_scopedexport.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/id_scopedexport.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/id_scopedexport.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/id_scopedexport.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_createorupdate.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/method_createorupdate.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_createorupdate.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/method_createorupdate.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/method_delete.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_delete.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/method_delete.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_execute.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/method_execute.go similarity index 87% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_execute.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/method_execute.go index 9c0087a4e0be3..ed13c32595956 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_execute.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/method_execute.go @@ -18,7 +18,7 @@ type ExecuteOperationResponse struct { } // Execute ... -func (c ExportsClient) Execute(ctx context.Context, id ScopedExportId) (result ExecuteOperationResponse, err error) { +func (c ExportsClient) Execute(ctx context.Context, id ScopedExportId, input ExportRunRequest) (result ExecuteOperationResponse, err error) { opts := client.RequestOptions{ ContentType: "application/json; charset=utf-8", ExpectedStatusCodes: []int{ @@ -33,6 +33,10 @@ func (c ExportsClient) Execute(ctx context.Context, id ScopedExportId) (result E return } + if err = req.Marshal(input); err != nil { + return + } + var resp *client.Response resp, err = req.Execute(ctx) if resp != nil { diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/method_get.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_get.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/method_get.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_getexecutionhistory.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/method_getexecutionhistory.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_getexecutionhistory.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/method_getexecutionhistory.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_list.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/method_list.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/method_list.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/method_list.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_commonexportproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_commonexportproperties.go new file mode 100644 index 0000000000000..90ddf17b1206e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_commonexportproperties.go @@ -0,0 +1,35 @@ +package exports + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CommonExportProperties struct { + CompressionMode *CompressionModeType `json:"compressionMode,omitempty"` + DataOverwriteBehavior *DataOverwriteBehaviorType `json:"dataOverwriteBehavior,omitempty"` + Definition ExportDefinition `json:"definition"` + DeliveryInfo ExportDeliveryInfo `json:"deliveryInfo"` + ExportDescription *string `json:"exportDescription,omitempty"` + Format *FormatType `json:"format,omitempty"` + NextRunTimeEstimate *string `json:"nextRunTimeEstimate,omitempty"` + PartitionData *bool `json:"partitionData,omitempty"` + RunHistory *ExportExecutionListResult `json:"runHistory,omitempty"` + SystemSuspensionContext *ExportSuspensionContext `json:"systemSuspensionContext,omitempty"` +} + +func (o *CommonExportProperties) GetNextRunTimeEstimateAsTime() (*time.Time, error) { + if o.NextRunTimeEstimate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.NextRunTimeEstimate, "2006-01-02T15:04:05Z07:00") +} + +func (o *CommonExportProperties) SetNextRunTimeEstimateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.NextRunTimeEstimate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_errordetails.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_errordetails.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_errordetails.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_errordetails.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_export.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_export.go new file mode 100644 index 0000000000000..0ee2528d8d788 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_export.go @@ -0,0 +1,18 @@ +package exports + +import ( + "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Export struct { + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Identity *identity.SystemAssigned `json:"identity,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ExportProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdataset.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportdataset.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdataset.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportdataset.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportdatasetconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportdatasetconfiguration.go new file mode 100644 index 0000000000000..d3e24055f1c9b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportdatasetconfiguration.go @@ -0,0 +1,10 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportDatasetConfiguration struct { + Columns *[]string `json:"columns,omitempty"` + DataVersion *string `json:"dataVersion,omitempty"` + Filters *[]FilterItems `json:"filters,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdefinition.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportdefinition.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdefinition.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportdefinition.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportdeliverydestination.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportdeliverydestination.go new file mode 100644 index 0000000000000..f5787858b92ed --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportdeliverydestination.go @@ -0,0 +1,13 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportDeliveryDestination struct { + Container string `json:"container"` + ResourceId *string `json:"resourceId,omitempty"` + RootFolderPath *string `json:"rootFolderPath,omitempty"` + SasToken *string `json:"sasToken,omitempty"` + StorageAccount *string `json:"storageAccount,omitempty"` + Type *DestinationType `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdeliveryinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportdeliveryinfo.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdeliveryinfo.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportdeliveryinfo.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecutionlistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportexecutionlistresult.go similarity index 80% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecutionlistresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportexecutionlistresult.go index a07b784ea303f..b8e5c87619767 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecutionlistresult.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportexecutionlistresult.go @@ -4,5 +4,5 @@ package exports // Licensed under the MIT License. See NOTICE.txt in the project root for license information. type ExportExecutionListResult struct { - Value *[]ExportExecution `json:"value,omitempty"` + Value *[]ExportRun `json:"value,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportlistresult.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportlistresult.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportlistresult.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportlistresult.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportproperties.go new file mode 100644 index 0000000000000..c7e55787e0590 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportproperties.go @@ -0,0 +1,36 @@ +package exports + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportProperties struct { + CompressionMode *CompressionModeType `json:"compressionMode,omitempty"` + DataOverwriteBehavior *DataOverwriteBehaviorType `json:"dataOverwriteBehavior,omitempty"` + Definition ExportDefinition `json:"definition"` + DeliveryInfo ExportDeliveryInfo `json:"deliveryInfo"` + ExportDescription *string `json:"exportDescription,omitempty"` + Format *FormatType `json:"format,omitempty"` + NextRunTimeEstimate *string `json:"nextRunTimeEstimate,omitempty"` + PartitionData *bool `json:"partitionData,omitempty"` + RunHistory *ExportExecutionListResult `json:"runHistory,omitempty"` + Schedule *ExportSchedule `json:"schedule,omitempty"` + SystemSuspensionContext *ExportSuspensionContext `json:"systemSuspensionContext,omitempty"` +} + +func (o *ExportProperties) GetNextRunTimeEstimateAsTime() (*time.Time, error) { + if o.NextRunTimeEstimate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.NextRunTimeEstimate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ExportProperties) SetNextRunTimeEstimateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.NextRunTimeEstimate = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportrecurrenceperiod.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportrecurrenceperiod.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportrecurrenceperiod.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportrecurrenceperiod.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportrun.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportrun.go new file mode 100644 index 0000000000000..24fffaa768e50 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportrun.go @@ -0,0 +1,12 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportRun struct { + ETag *string `json:"eTag,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Properties *ExportRunProperties `json:"properties,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecutionproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportrunproperties.go similarity index 54% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecutionproperties.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportrunproperties.go index c29e900fc3dc6..6090ac5aa9ea0 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportexecutionproperties.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportrunproperties.go @@ -9,50 +9,77 @@ import ( // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ExportExecutionProperties struct { +type ExportRunProperties struct { + EndDate *string `json:"endDate,omitempty"` Error *ErrorDetails `json:"error,omitempty"` ExecutionType *ExecutionType `json:"executionType,omitempty"` FileName *string `json:"fileName,omitempty"` + ManifestFile *string `json:"manifestFile,omitempty"` ProcessingEndTime *string `json:"processingEndTime,omitempty"` ProcessingStartTime *string `json:"processingStartTime,omitempty"` RunSettings *CommonExportProperties `json:"runSettings,omitempty"` + StartDate *string `json:"startDate,omitempty"` Status *ExecutionStatus `json:"status,omitempty"` SubmittedBy *string `json:"submittedBy,omitempty"` SubmittedTime *string `json:"submittedTime,omitempty"` } -func (o *ExportExecutionProperties) GetProcessingEndTimeAsTime() (*time.Time, error) { +func (o *ExportRunProperties) GetEndDateAsTime() (*time.Time, error) { + if o.EndDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.EndDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ExportRunProperties) SetEndDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.EndDate = &formatted +} + +func (o *ExportRunProperties) GetProcessingEndTimeAsTime() (*time.Time, error) { if o.ProcessingEndTime == nil { return nil, nil } return dates.ParseAsFormat(o.ProcessingEndTime, "2006-01-02T15:04:05Z07:00") } -func (o *ExportExecutionProperties) SetProcessingEndTimeAsTime(input time.Time) { +func (o *ExportRunProperties) SetProcessingEndTimeAsTime(input time.Time) { formatted := input.Format("2006-01-02T15:04:05Z07:00") o.ProcessingEndTime = &formatted } -func (o *ExportExecutionProperties) GetProcessingStartTimeAsTime() (*time.Time, error) { +func (o *ExportRunProperties) GetProcessingStartTimeAsTime() (*time.Time, error) { if o.ProcessingStartTime == nil { return nil, nil } return dates.ParseAsFormat(o.ProcessingStartTime, "2006-01-02T15:04:05Z07:00") } -func (o *ExportExecutionProperties) SetProcessingStartTimeAsTime(input time.Time) { +func (o *ExportRunProperties) SetProcessingStartTimeAsTime(input time.Time) { formatted := input.Format("2006-01-02T15:04:05Z07:00") o.ProcessingStartTime = &formatted } -func (o *ExportExecutionProperties) GetSubmittedTimeAsTime() (*time.Time, error) { +func (o *ExportRunProperties) GetStartDateAsTime() (*time.Time, error) { + if o.StartDate == nil { + return nil, nil + } + return dates.ParseAsFormat(o.StartDate, "2006-01-02T15:04:05Z07:00") +} + +func (o *ExportRunProperties) SetStartDateAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.StartDate = &formatted +} + +func (o *ExportRunProperties) GetSubmittedTimeAsTime() (*time.Time, error) { if o.SubmittedTime == nil { return nil, nil } return dates.ParseAsFormat(o.SubmittedTime, "2006-01-02T15:04:05Z07:00") } -func (o *ExportExecutionProperties) SetSubmittedTimeAsTime(input time.Time) { +func (o *ExportRunProperties) SetSubmittedTimeAsTime(input time.Time) { formatted := input.Format("2006-01-02T15:04:05Z07:00") o.SubmittedTime = &formatted } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdatasetconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportrunrequest.go similarity index 65% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdatasetconfiguration.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportrunrequest.go index 9acc4e43e924a..af619f29a1a2e 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportdatasetconfiguration.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportrunrequest.go @@ -3,6 +3,6 @@ package exports // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -type ExportDatasetConfiguration struct { - Columns *[]string `json:"columns,omitempty"` +type ExportRunRequest struct { + TimePeriod *ExportTimePeriod `json:"timePeriod,omitempty"` } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportschedule.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportschedule.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exportschedule.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportschedule.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportsuspensioncontext.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportsuspensioncontext.go new file mode 100644 index 0000000000000..a6343e8246528 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exportsuspensioncontext.go @@ -0,0 +1,28 @@ +package exports + +import ( + "time" + + "github.com/hashicorp/go-azure-helpers/lang/dates" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ExportSuspensionContext struct { + SuspensionCode *string `json:"suspensionCode,omitempty"` + SuspensionReason *string `json:"suspensionReason,omitempty"` + SuspensionTime *string `json:"suspensionTime,omitempty"` +} + +func (o *ExportSuspensionContext) GetSuspensionTimeAsTime() (*time.Time, error) { + if o.SuspensionTime == nil { + return nil, nil + } + return dates.ParseAsFormat(o.SuspensionTime, "2006-01-02T15:04:05Z07:00") +} + +func (o *ExportSuspensionContext) SetSuspensionTimeAsTime(input time.Time) { + formatted := input.Format("2006-01-02T15:04:05Z07:00") + o.SuspensionTime = &formatted +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exporttimeperiod.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exporttimeperiod.go similarity index 100% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/model_exporttimeperiod.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_exporttimeperiod.go diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_filteritems.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_filteritems.go new file mode 100644 index 0000000000000..9f63ef84f5f87 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/model_filteritems.go @@ -0,0 +1,9 @@ +package exports + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FilterItems struct { + Name *FilterItemNames `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/version.go similarity index 86% rename from vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/version.go rename to vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/version.go index 96be6d93da3f2..11cf25298faf2 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports/version.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports/version.go @@ -5,7 +5,7 @@ import "fmt" // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See NOTICE.txt in the project root for license information. -const defaultApiVersion = "2021-10-01" +const defaultApiVersion = "2023-07-01-preview" func userAgent() string { return fmt.Sprintf("hashicorp/go-azure-sdk/exports/%s", defaultApiVersion) diff --git a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro_statuses.go b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro_statuses.go index 888feb6a2439c..bc9806bed6edc 100644 --- a/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro_statuses.go +++ b/vendor/github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager/poller_lro_statuses.go @@ -103,4 +103,7 @@ var longRunningOperationCustomStatuses = map[status]pollers.PollingStatus{ // StorageSync@2020-03-01 returns `validateInput` rather than `InProgress` during creation/update (https://github.com/hashicorp/go-azure-sdk/issues/565) "validateInput": pollers.PollingStatusInProgress, + + // EventGrid @ 2022-06-15 returns `AwaitingManualAction` while waiting for manual validation of a webhook (https://github.com/hashicorp/terraform-provider-azurerm/issues/25689) + "AwaitingManualAction": pollers.PollingStatusInProgress, } diff --git a/vendor/modules.txt b/vendor/modules.txt index be8b1e1382ece..06ba9df1fcd38 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -151,7 +151,7 @@ github.com/hashicorp/go-azure-helpers/resourcemanager/tags github.com/hashicorp/go-azure-helpers/resourcemanager/zones github.com/hashicorp/go-azure-helpers/sender github.com/hashicorp/go-azure-helpers/storage -# github.com/hashicorp/go-azure-sdk/resource-manager v0.20240715.1103416 +# github.com/hashicorp/go-azure-sdk/resource-manager v0.20240731.1170959 ## explicit; go 1.21 github.com/hashicorp/go-azure-sdk/resource-manager/aad/2021-05-01/domainservices github.com/hashicorp/go-azure-sdk/resource-manager/aadb2c/2021-04-01-preview @@ -409,10 +409,10 @@ github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-05-15/sqldedica github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2022-11-15/mongorbacs github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/cosmosdb github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2023-04-15/managedcassandras -github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2021-10-01/exports github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-06-01-preview/scheduledactions github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/scheduledactions github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/views +github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2023-07-01-preview/exports github.com/hashicorp/go-azure-sdk/resource-manager/customproviders/2018-09-01-preview/customresourceprovider github.com/hashicorp/go-azure-sdk/resource-manager/dashboard/2023-09-01/grafanaresource github.com/hashicorp/go-azure-sdk/resource-manager/databoxedge/2022-03-01/devices @@ -1120,7 +1120,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saplands github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/saprecommendations github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapsupportedsku github.com/hashicorp/go-azure-sdk/resource-manager/workloads/2023-04-01/sapvirtualinstances -# github.com/hashicorp/go-azure-sdk/sdk v0.20240715.1103416 +# github.com/hashicorp/go-azure-sdk/sdk v0.20240731.1170959 ## explicit; go 1.21 github.com/hashicorp/go-azure-sdk/sdk/auth github.com/hashicorp/go-azure-sdk/sdk/auth/autorest