diff --git a/cmd/mapt/cmd/aws/hosts/fedora.go b/cmd/mapt/cmd/aws/hosts/fedora.go
index 5034ee712..d325f9251 100644
--- a/cmd/mapt/cmd/aws/hosts/fedora.go
+++ b/cmd/mapt/cmd/aws/hosts/fedora.go
@@ -4,7 +4,9 @@ import (
params "github.com/redhat-developer/mapt/cmd/mapt/cmd/constants"
maptContext "github.com/redhat-developer/mapt/pkg/manager/context"
"github.com/redhat-developer/mapt/pkg/provider/aws/action/fedora"
+ "github.com/redhat-developer/mapt/pkg/util"
"github.com/redhat-developer/mapt/pkg/util/logging"
+ "github.com/redhat-developer/mapt/pkg/util/resources"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"
@@ -50,13 +52,28 @@ func getFedoraCreate() *cobra.Command {
viper.GetString(params.ConnectionDetailsOutput),
viper.GetStringMapString(params.Tags))
+ // Get the VM instance type name based on cpus, memory and arch
+ var ec2Types []string
+ if viper.GetInt32(params.CPUs) > 0 && viper.GetInt32(params.Memory) > 0 {
+ var arch resources.Arch = resources.Amd64
+ if viper.GetString(params.LinuxArch) == "arm64" {
+ arch = resources.Arm64
+ }
+ ec2Types, _ = resources.GetAwsMachineTypes(viper.GetInt32(params.CPUs), viper.GetInt32(params.Memory), arch)
+ if len(ec2Types) > 0 {
+ logging.Info("Using dynamic vm types: ", ec2Types)
+ } else {
+ logging.Info("Using the default instance type")
+ }
+ }
+
// Run create
if err := fedora.Create(
&fedora.Request{
Prefix: "main",
Version: viper.GetString(rhelVersion),
Arch: viper.GetString(params.LinuxArch),
- VMType: viper.GetStringSlice(vmTypes),
+ VMType: util.If(len(ec2Types) > 0, ec2Types, viper.GetStringSlice(vmTypes)),
Spot: viper.IsSet(spot),
Airgap: viper.IsSet(airgap)}); err != nil {
logging.Error(err)
@@ -72,6 +89,7 @@ func getFedoraCreate() *cobra.Command {
flagSet.StringSliceP(vmTypes, "", []string{}, vmTypesDescription)
flagSet.Bool(airgap, false, airgapDesc)
flagSet.Bool(spot, false, spotDesc)
+ flagSet.AddFlagSet(params.GetCpusAndMemoryFlagset())
c.PersistentFlags().AddFlagSet(flagSet)
return c
}
diff --git a/cmd/mapt/cmd/aws/hosts/rhel.go b/cmd/mapt/cmd/aws/hosts/rhel.go
index bdaccdcd7..17fe19eda 100644
--- a/cmd/mapt/cmd/aws/hosts/rhel.go
+++ b/cmd/mapt/cmd/aws/hosts/rhel.go
@@ -4,8 +4,10 @@ import (
params "github.com/redhat-developer/mapt/cmd/mapt/cmd/constants"
maptContext "github.com/redhat-developer/mapt/pkg/manager/context"
"github.com/redhat-developer/mapt/pkg/provider/aws/action/rhel"
+ "github.com/redhat-developer/mapt/pkg/util"
"github.com/redhat-developer/mapt/pkg/util/ghactions"
"github.com/redhat-developer/mapt/pkg/util/logging"
+ "github.com/redhat-developer/mapt/pkg/util/resources"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"
@@ -67,13 +69,28 @@ func getRHELCreate() *cobra.Command {
}
}
+ // Get the VM instance type name based on cpus, memory and arch
+ var ec2Types []string
+ if viper.GetInt32(params.CPUs) > 0 && viper.GetInt32(params.Memory) > 0 {
+ var arch resources.Arch = resources.Amd64
+ if viper.GetString(params.LinuxArch) == "arm64" {
+ arch = resources.Arm64
+ }
+ ec2Types, _ = resources.GetAwsMachineTypes(viper.GetInt32(params.CPUs), viper.GetInt32(params.Memory), arch)
+ if len(ec2Types) > 0 {
+ logging.Info("Using dynamic vm types: ", ec2Types)
+ } else {
+ logging.Info("Using the default instance type")
+ }
+ }
+
// Run create
if err := rhel.Create(
&rhel.Request{
Prefix: "main",
Version: viper.GetString(rhelVersion),
Arch: viper.GetString(params.LinuxArch),
- VMType: viper.GetStringSlice(vmTypes),
+ VMType: util.If(len(ec2Types) > 0, ec2Types, viper.GetStringSlice(vmTypes)),
SubsUsername: viper.GetString(subsUsername),
SubsUserpass: viper.GetString(subsUserpass),
ProfileSNC: viper.IsSet(profileSNC),
@@ -98,6 +115,7 @@ func getRHELCreate() *cobra.Command {
flagSet.Bool(spot, false, spotDesc)
flagSet.Bool(profileSNC, false, profileSNCDesc)
flagSet.AddFlagSet(params.GetGHActionsFlagset())
+ flagSet.AddFlagSet(params.GetCpusAndMemoryFlagset())
c.PersistentFlags().AddFlagSet(flagSet)
// if err := c.MarkFlagRequired(subsUsername); err != nil {
// logging.Error(err)
diff --git a/cmd/mapt/cmd/aws/hosts/windows.go b/cmd/mapt/cmd/aws/hosts/windows.go
index 3397e8da8..f50e49eaf 100644
--- a/cmd/mapt/cmd/aws/hosts/windows.go
+++ b/cmd/mapt/cmd/aws/hosts/windows.go
@@ -101,6 +101,7 @@ func getWindowsCreate() *cobra.Command {
flagSet.Bool(spot, false, spotDesc)
flagSet.Bool(amiKeepCopy, false, amiKeepCopyDesc)
flagSet.AddFlagSet(params.GetGHActionsFlagset())
+ flagSet.AddFlagSet(params.GetCpusAndMemoryFlagset())
c.PersistentFlags().AddFlagSet(flagSet)
return c
}
diff --git a/cmd/mapt/cmd/azure/hosts/linux.go b/cmd/mapt/cmd/azure/hosts/linux.go
index 6fdcf9a9e..51eb796a4 100644
--- a/cmd/mapt/cmd/azure/hosts/linux.go
+++ b/cmd/mapt/cmd/azure/hosts/linux.go
@@ -9,6 +9,7 @@ import (
spotprice "github.com/redhat-developer/mapt/pkg/provider/azure/module/spot-price"
"github.com/redhat-developer/mapt/pkg/util/logging"
+ "github.com/redhat-developer/mapt/pkg/util/resources"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"
@@ -74,11 +75,27 @@ func getCreateLinux(ostype azureLinux.OSType, defaultOSVersion string) *cobra.Co
return fmt.Errorf("%s is not a valid spot tolerance value", viper.GetString(paramSpotTolerance))
}
}
+
+ // Get the VM instance type name based on cpus, memory and arch
+ var vmTypes []string
+ if viper.GetInt32(params.CPUs) > 0 && viper.GetInt32(params.Memory) > 0 {
+ var arch resources.Arch = resources.Amd64
+ if viper.GetString(params.LinuxArch) == "arm64" {
+ arch = resources.Arm64
+ }
+ vmTypes = resources.GetAzureMachineTypes(viper.GetInt32(params.CPUs), viper.GetInt32(params.Memory), arch)
+ if len(vmTypes) > 0 {
+ logging.Info("Using dynamic vm types: ", vmTypes)
+ } else {
+ logging.Info("Using the default instance type")
+ }
+ }
+
if err := azureLinux.Create(
&azureLinux.LinuxRequest{
Prefix: viper.GetString(params.ProjectName),
Location: viper.GetString(paramLocation),
- VMSize: viper.GetString(paramVMSize),
+ VMSizes: vmTypes,
Version: viper.GetString(paramLinuxVersion),
Arch: viper.GetString(params.LinuxArch),
OSType: ostype,
@@ -100,6 +117,7 @@ func getCreateLinux(ostype azureLinux.OSType, defaultOSVersion string) *cobra.Co
flagSet.StringP(paramUsername, "", defaultUsername, paramUsernameDesc)
flagSet.Bool(paramSpot, false, paramSpotDesc)
flagSet.StringP(paramSpotTolerance, "", defaultSpotTolerance, paramSpotToleranceDesc)
+ flagSet.AddFlagSet(params.GetCpusAndMemoryFlagset())
c.PersistentFlags().AddFlagSet(flagSet)
return c
}
diff --git a/cmd/mapt/cmd/azure/hosts/windows.go b/cmd/mapt/cmd/azure/hosts/windows.go
index 8a693e164..615d242be 100644
--- a/cmd/mapt/cmd/azure/hosts/windows.go
+++ b/cmd/mapt/cmd/azure/hosts/windows.go
@@ -7,8 +7,10 @@ import (
maptContext "github.com/redhat-developer/mapt/pkg/manager/context"
azureWindows "github.com/redhat-developer/mapt/pkg/provider/azure/action/windows"
spotprice "github.com/redhat-developer/mapt/pkg/provider/azure/module/spot-price"
+ "github.com/redhat-developer/mapt/pkg/util"
"github.com/redhat-developer/mapt/pkg/util/ghactions"
"github.com/redhat-developer/mapt/pkg/util/logging"
+ "github.com/redhat-developer/mapt/pkg/util/resources"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"
@@ -83,11 +85,22 @@ func getCreateWindowsDesktop() *cobra.Command {
}
}
+ // Get the VM instance type name based on cpus, memory and arch
+ var vmTypes []string
+ if viper.GetInt32(params.CPUs) > 0 && viper.GetInt32(params.Memory) > 0 {
+ vmTypes = resources.GetAzureMachineTypes(viper.GetInt32(params.CPUs), viper.GetInt32(params.Memory), resources.Amd64)
+ if len(vmTypes) > 0 {
+ logging.Info("Using dynamic vm types: ", vmTypes)
+ } else {
+ logging.Info("Using the default instance type")
+ }
+ }
+
if err := azureWindows.Create(
&azureWindows.WindowsRequest{
Prefix: viper.GetString(params.ProjectName),
Location: viper.GetString(paramLocation),
- VMSize: viper.GetString(paramVMSize),
+ VMSizes: util.If(len(vmTypes) > 0, vmTypes, []string{viper.GetString(paramVMSize)}),
Version: viper.GetString(paramWindowsVersion),
Feature: viper.GetString(paramFeature),
Username: viper.GetString(paramUsername),
@@ -114,6 +127,7 @@ func getCreateWindowsDesktop() *cobra.Command {
flagSet.Bool(paramSpot, false, paramSpotDesc)
flagSet.StringP(paramSpotTolerance, "", defaultSpotTolerance, paramSpotToleranceDesc)
flagSet.AddFlagSet(params.GetGHActionsFlagset())
+ flagSet.AddFlagSet(params.GetCpusAndMemoryFlagset())
c.PersistentFlags().AddFlagSet(flagSet)
return c
}
diff --git a/cmd/mapt/cmd/constants/constants.go b/cmd/mapt/cmd/constants/constants.go
index 8905f6f9d..8c624a31b 100644
--- a/cmd/mapt/cmd/constants/constants.go
+++ b/cmd/mapt/cmd/constants/constants.go
@@ -38,6 +38,10 @@ const (
GHActionsRunnerTokenDesc string = "Token needed for registering the Github Actions Runner token"
GHActionsRunnerNameDesc string = "Name for the Github Actions Runner"
GHActionsRunnerRepoDesc string = "Full URL of the repository where the Github Actions Runner should be registered"
+ Memory string = "memory"
+ MemoryDesc string = "Amount of RAM for the cloud instance in GiB"
+ CPUs string = "cpus"
+ CPUsDesc string = "Number of CPUs for the cloud instance"
CreateCmdName string = "create"
DestroyCmdName string = "destroy"
@@ -56,3 +60,10 @@ func GetGHActionsFlagset() *pflag.FlagSet {
flagSet.StringP(GHActionsRunnerRepo, "", "", GHActionsRunnerRepoDesc)
return flagSet
}
+
+func GetCpusAndMemoryFlagset() *pflag.FlagSet {
+ flagSet := pflag.NewFlagSet(CreateCmdName, pflag.ExitOnError)
+ flagSet.Int32P(CPUs, "", 0, CPUsDesc)
+ flagSet.Int32P(Memory, "", 0, MemoryDesc)
+ return flagSet
+}
diff --git a/go.mod b/go.mod
index 77a6d1938..9bb19b36d 100644
--- a/go.mod
+++ b/go.mod
@@ -13,9 +13,11 @@ require (
)
require (
- github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0
- github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0
+ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0
+ github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0
+ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6 v6.0.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.9.0
+ github.com/aws/amazon-ec2-instance-selector/v2 v2.4.2-0.20231006140257-d989c5d76f0e
github.com/aws/aws-sdk-go-v2 v1.27.2
github.com/aws/aws-sdk-go-v2/config v1.27.18
github.com/aws/aws-sdk-go-v2/service/ec2 v1.142.0
@@ -28,14 +30,23 @@ require (
)
require (
+ github.com/aws/aws-sdk-go v1.45.6 // indirect
+ github.com/aws/aws-sdk-go-v2/service/pricing v1.21.6 // indirect
+ github.com/blang/semver/v4 v4.0.0 // indirect
+ github.com/evertras/bubble-table v0.15.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
+ github.com/imdario/mergo v0.3.16 // indirect
+ github.com/mitchellh/go-homedir v1.1.0 // indirect
+ github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 // indirect
+ github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
+ github.com/sahilm/fuzzy v0.1.0 // indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/tools v0.22.0 // indirect
)
require (
dario.cat/mergo v1.0.0 // indirect
- github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0 // indirect
+ github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
@@ -93,7 +104,7 @@ require (
github.com/spf13/cast v1.6.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/zclconf/go-cty v1.13.2 // indirect
- go.uber.org/multierr v1.9.0 // indirect
+ go.uber.org/multierr v1.11.0 // indirect
golang.org/x/sync v0.7.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
@@ -125,7 +136,7 @@ require (
github.com/nxadm/tail v1.4.11 // indirect
github.com/opentracing/basictracer-go v1.1.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
- github.com/pkg/errors v0.9.1 // indirect
+ github.com/pkg/errors v0.9.1
github.com/pkg/term v1.1.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
@@ -139,10 +150,10 @@ require (
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
go.uber.org/atomic v1.9.0 // indirect
- golang.org/x/crypto v0.24.0 // indirect
- golang.org/x/net v0.26.0 // indirect
- golang.org/x/sys v0.21.0 // indirect
- golang.org/x/term v0.21.0 // indirect
+ golang.org/x/crypto v0.25.0 // indirect
+ golang.org/x/net v0.27.0 // indirect
+ golang.org/x/sys v0.22.0 // indirect
+ golang.org/x/term v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.34.2 // indirect
diff --git a/go.sum b/go.sum
index 6b64ea4c6..0d1e8fa59 100644
--- a/go.sum
+++ b/go.sum
@@ -1,13 +1,20 @@
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
-github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0 h1:1nGuui+4POelzDwI7RG56yfQJHCnKvwfMoU7VsEp+Zg=
-github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0/go.mod h1:99EvauvlcJ1U06amZiksfYz/3aFGyIhWGHVyiZXtBAI=
-github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0 h1:U2rTu3Ef+7w9FHKIAXM6ZyqF3UOWJZ12zIm8zECAFfg=
-github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg=
-github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0 h1:H+U3Gk9zY56G3u872L82bk4thcsy2Gghb9ExT4Zvm1o=
-github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0/go.mod h1:mgrmMSgaLp9hmax62XQTd0N4aAqSE5E0DulSpVYK7vc=
+github.com/Azure/azure-sdk-for-go v66.0.0+incompatible h1:bmmC38SlE8/E81nNADlgmVGurPWMHDX2YNXVQMrBpEE=
+github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 h1:GJHeeA2N7xrG3q30L2UXDyuWRzDM900/65j70wcM4Ww=
+github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0=
+github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc=
+github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg=
+github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY=
+github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY=
+github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6 v6.0.0 h1:ubTqH0Sqcc7KgjHGKstw446zi7SurSXESKgd4hJea7w=
+github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6 v6.0.0/go.mod h1:zflC9v4VfViJrSvcvplqws/yGXVbUEMZi/iHpZdSPWA=
+github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v3 v3.1.0 h1:2qsIIvxVT+uE6yrNldntJKlLRgxGbZ85kgtz5SNBhMw=
+github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v3 v3.1.0/go.mod h1:AW8VEadnhw9xox+VaVd9sP7NjzOAnaZBLRH6Tq3cJ38=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.9.0 h1:zLzoX5+W2l95UJoVwiyNS4dX8vHyQ6x2xRLoBBL9wMk=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.9.0/go.mod h1:wVEOJfGTj0oPAUGA1JuRAvz/lxXQsWW16axmHPP47Bk=
+github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 h1:Dd+RhdJn0OTtVGaeDLZpcumkIVCtA/3/Fo42+eoYvVM=
+github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0/go.mod h1:5kakwfW5CjC9KK+Q4wjXAg+ShuIm2mBMua0ZFj2C8PE=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU=
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM=
@@ -31,6 +38,11 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
+github.com/aws/amazon-ec2-instance-selector/v2 v2.4.2-0.20231006140257-d989c5d76f0e h1:WWOuG4hx+k8KjLO0tHGrYUwY95nKJMMU9A/IGeIEKnU=
+github.com/aws/amazon-ec2-instance-selector/v2 v2.4.2-0.20231006140257-d989c5d76f0e/go.mod h1:xN+IXvhDWtzz9rQrNVLK+wwXvNie/bc6gv9gSP1cxlg=
+github.com/aws/aws-sdk-go v1.45.6 h1:Y2isQQBZsnO15dzUQo9YQRThtHgrV200XCH05BRHVJI=
+github.com/aws/aws-sdk-go v1.45.6/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
+github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M=
github.com/aws/aws-sdk-go-v2 v1.27.2 h1:pLsTXqX93rimAOZG2FIYraDQstZaaGVVN4tNw65v0h8=
github.com/aws/aws-sdk-go-v2 v1.27.2/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM=
github.com/aws/aws-sdk-go-v2/config v1.27.18 h1:wFvAnwOKKe7QAyIxziwSKjmer9JBMH1vzIL6W+fYuKk=
@@ -39,8 +51,10 @@ github.com/aws/aws-sdk-go-v2/credentials v1.17.18 h1:D/ALDWqK4JdY3OFgA2thcPO1c9a
github.com/aws/aws-sdk-go-v2/credentials v1.17.18/go.mod h1:JuitCWq+F5QGUrmMPsk945rop6bB57jdscu+Glozdnc=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.5 h1:dDgptDO9dxeFkXy+tEgVkzSClHZje/6JkPW5aZyEvrQ=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.5/go.mod h1:gjvE2KBUgUQhcv89jqxrIxH9GaKs1JbZzWejj/DaHGA=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9 h1:cy8ahBJuhtM8GTTSyOkfy6WVPV1IE+SS5/wfXUYuulw=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9/go.mod h1:CZBXGLaJnEZI6EVNcPd7a6B5IC5cA/GkRWtu9fp3S6Y=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9 h1:A4SYk07ef04+vxZToz9LWvAXl9LW0NClpPpMsi31cz0=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9/go.mod h1:5jJcHuwDagxN+ErjQ3PU3ocf6Ylc/p9x+BLO/+X4iXw=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU=
@@ -51,18 +65,23 @@ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1x
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11 h1:o4T+fKxA3gTMcluBNZZXE9DNaMkJuUL1O3mffCUjoJo=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11/go.mod h1:84oZdJ+VjuJKs9v1UTC9NaodRZRseOXCTgku+vQJWR8=
+github.com/aws/aws-sdk-go-v2/service/pricing v1.21.6 h1:k/f3T13s7wx/By6aKovlVsjdNkRVT0QRR2RlZEvaTGg=
+github.com/aws/aws-sdk-go-v2/service/pricing v1.21.6/go.mod h1:9n3tkRCngy3+Iw/8vK3C69iXh22SCGsy3yn16nTxH+s=
github.com/aws/aws-sdk-go-v2/service/sso v1.20.11 h1:gEYM2GSpr4YNWc6hCd5nod4+d4kd9vWIAWrmGuLdlMw=
github.com/aws/aws-sdk-go-v2/service/sso v1.20.11/go.mod h1:gVvwPdPNYehHSP9Rs7q27U1EU+3Or2ZpXvzAYJNh63w=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.5 h1:iXjh3uaH3vsVcnyZX7MqCoCfcyxIrVE9iOQruRaWPrQ=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.5/go.mod h1:5ZXesEuy/QcO0WUnt+4sDkxhdXRHTu2yG0uCSH8B6os=
github.com/aws/aws-sdk-go-v2/service/sts v1.28.12 h1:M/1u4HBpwLuMtjlxuI2y6HoVLzF5e2mfxHCg7ZVMYmk=
github.com/aws/aws-sdk-go-v2/service/sts v1.28.12/go.mod h1:kcfd+eTdEi/40FIbLq4Hif3XMXnl5b/+t/KTfLt9xIk=
+github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q=
github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
+github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
+github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
@@ -95,6 +114,8 @@ github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcej
github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM=
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
+github.com/evertras/bubble-table v0.15.2 h1:hVj27V9tk5TD5p6mVv0RK/KJu2sHq0U+mBMux/HptkU=
+github.com/evertras/bubble-table v0.15.2/go.mod h1:SPOZKbIpyYWPHBNki3fyNpiPBQkvkULAtOT7NTD5fKY=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
@@ -124,6 +145,7 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
+github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
@@ -139,6 +161,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/hcl/v2 v2.20.1 h1:M6hgdyz7HYt1UN9e61j+qKJBqR3orTWbI1HKBJEdxtc=
github.com/hashicorp/hcl/v2 v2.20.1/go.mod h1:TZDqQ4kNKCbh1iJp99FdPiUaVDDUPivbqxZulxDYqL4=
+github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
+github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
@@ -178,6 +202,8 @@ github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
+github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
+github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc=
github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg=
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
@@ -194,6 +220,8 @@ github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo
github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8=
github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc=
+github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 h1:Yl0tPBa8QPjGmesFh1D0rDy+q1Twx6FyU7VWHi8wZbI=
+github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852/go.mod h1:eqOVx5Vwu4gd2mmMZvVZsgIqNSaW3xxRThUJ0k/TPk4=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
github.com/opentracing/basictracer-go v1.1.0 h1:Oa1fTSBvAl8pa3U+IJYqrKm0NALwH9OsgwOqDv4xJW0=
@@ -201,6 +229,8 @@ github.com/opentracing/basictracer-go v1.1.0/go.mod h1:V2HZueSJEp879yv285Aap1BS6
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
+github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
+github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
github.com/pgavlin/fx v0.1.6 h1:r9jEg69DhNoCd3Xh0+5mIbdbS3PqWrVWujkY76MFRTU=
@@ -253,6 +283,8 @@ github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6ke
github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
+github.com/sahilm/fuzzy v0.1.0 h1:FzWGaw2Opqyu+794ZQ9SYifWv2EIXpwP4q8dY1kDAwI=
+github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y=
github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 h1:TToq11gyfNlrMFZiYujSekIsPd9AmsA2Bj/iv+s4JHE=
github.com/santhosh-tekuri/jsonschema/v5 v5.0.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
@@ -309,8 +341,8 @@ github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0
github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0=
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
-go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
-go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
+go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
+go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@@ -318,8 +350,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
-golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=
-golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
+golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
+golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM=
golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
@@ -338,11 +370,12 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
-golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
-golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
+golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
+golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -371,15 +404,16 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
-golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
+golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
-golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA=
-golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
+golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk=
+golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
diff --git a/pkg/provider/azure/action/linux/linux.go b/pkg/provider/azure/action/linux/linux.go
index 56af42234..304195911 100644
--- a/pkg/provider/azure/action/linux/linux.go
+++ b/pkg/provider/azure/action/linux/linux.go
@@ -33,7 +33,7 @@ const (
type LinuxRequest struct {
Prefix string
Location string
- VMSize string
+ VMSizes []string
Arch string
OSType OSType
Version string
@@ -65,7 +65,7 @@ func Destroy() error {
// Main function to deploy all requried resources to azure
func (r *LinuxRequest) deployer(ctx *pulumi.Context) error {
// Get values for spot machine
- location, spotPrice, err := r.valuesCheckingSpot()
+ location, vmType, spotPrice, err := r.valuesCheckingSpot()
if err != nil {
return err
}
@@ -112,7 +112,7 @@ func (r *LinuxRequest) deployer(ctx *pulumi.Context) error {
ComponentID: azureLinuxID,
ResourceGroup: rg,
NetworkInteface: n.NetworkInterface,
- VMSize: r.VMSize,
+ VMSize: vmType,
Publisher: ir.publisher,
Offer: ir.offer,
Sku: ir.sku,
@@ -145,21 +145,21 @@ func (r *LinuxRequest) deployer(ctx *pulumi.Context) error {
return err
}
-func (r *LinuxRequest) valuesCheckingSpot() (*string, *float64, error) {
+func (r *LinuxRequest) valuesCheckingSpot() (*string, string, *float64, error) {
if r.Spot {
bsc, err :=
spotprice.GetBestSpotChoice(spotprice.BestSpotChoiceRequest{
- VMTypes: []string{r.VMSize},
+ VMTypes: r.VMSizes,
OSType: "linux",
EvictioRateTolerance: r.SpotTolerance,
})
logging.Debugf("Best spot price option found: %v", bsc)
if err != nil {
- return nil, nil, err
+ return nil, "", nil, err
}
- return &bsc.Location, &bsc.Price, nil
+ return &bsc.Location, bsc.VMType, &bsc.Price, nil
}
- return &r.Location, nil, nil
+ return &r.Location, "", nil, nil
}
// Write exported values in context to files o a selected target folder
diff --git a/pkg/provider/azure/action/windows/windows.go b/pkg/provider/azure/action/windows/windows.go
index dfc123345..d524acbd7 100644
--- a/pkg/provider/azure/action/windows/windows.go
+++ b/pkg/provider/azure/action/windows/windows.go
@@ -35,7 +35,7 @@ var RHQPCISetupScript []byte
type WindowsRequest struct {
Prefix string
Location string
- VMSize string
+ VMSizes []string
Version string
Feature string
Username string
@@ -81,7 +81,7 @@ func Destroy() error {
// Main function to deploy all requried resources to azure
func (r *WindowsRequest) deployer(ctx *pulumi.Context) error {
// Get values for spot machine
- location, spotPrice, err := r.valuesCheckingSpot()
+ location, vmType, spotPrice, err := r.valuesCheckingSpot()
if err != nil {
return err
}
@@ -122,7 +122,7 @@ func (r *WindowsRequest) deployer(ctx *pulumi.Context) error {
ComponentID: azureWindowsDesktopID,
ResourceGroup: rg,
NetworkInteface: n.NetworkInterface,
- VMSize: r.VMSize,
+ VMSize: vmType,
Publisher: "MicrosoftWindowsDesktop",
Offer: fmt.Sprintf("windows-%s", r.Version),
Sku: fmt.Sprintf("win%s-%s", r.Version, r.Feature),
@@ -161,21 +161,21 @@ func (r *WindowsRequest) deployer(ctx *pulumi.Context) error {
return err
}
-func (r *WindowsRequest) valuesCheckingSpot() (*string, *float64, error) {
+func (r *WindowsRequest) valuesCheckingSpot() (*string, string, *float64, error) {
if r.Spot {
bsc, err :=
spotprice.GetBestSpotChoice(spotprice.BestSpotChoiceRequest{
- VMTypes: []string{r.VMSize},
+ VMTypes: r.VMSizes,
OSType: "windows",
EvictioRateTolerance: r.SpotTolerance,
})
logging.Debugf("Best spot price option found: %v", bsc)
if err != nil {
- return nil, nil, err
+ return nil, "", nil, err
}
- return &bsc.Location, &bsc.Price, nil
+ return &bsc.Location, bsc.VMType, &bsc.Price, nil
}
- return &r.Location, nil, nil
+ return &r.Location, "", nil, nil
}
// Write exported values in context to files o a selected target folder
diff --git a/pkg/provider/azure/module/identity/azidentity.go b/pkg/provider/azure/module/identity/azidentity.go
new file mode 100644
index 000000000..ed1e107b2
--- /dev/null
+++ b/pkg/provider/azure/module/identity/azidentity.go
@@ -0,0 +1,24 @@
+package identity
+
+import (
+ "os"
+ "strings"
+)
+
+var azIdentityEnvs = []string{
+ "AZURE_TENANT_ID",
+ "AZURE_SUBSCRIPTION_ID",
+ "AZURE_CLIENT_ID",
+ "AZURE_CLIENT_SECRET",
+}
+
+// Envs required for auth with go sdk
+// https://learn.microsoft.com/es-es/azure/developer/go/azure-sdk-authentication?tabs=bash#service-principal-with-a-secret
+// do not match standard envs for pulumi envs for auth with native sdk
+// https://www.pulumi.com/registry/packages/azure-native/installation-configuration/#set-configuration-using-environment-variables
+func SetAZIdentityEnvs() {
+ for _, e := range azIdentityEnvs {
+ os.Setenv(e,
+ os.Getenv(strings.ReplaceAll(e, "AZURE", "ARM")))
+ }
+}
diff --git a/pkg/provider/azure/module/spot-price/spot-price.go b/pkg/provider/azure/module/spot-price/spot-price.go
index b74dfb030..7bf53a6d0 100644
--- a/pkg/provider/azure/module/spot-price/spot-price.go
+++ b/pkg/provider/azure/module/spot-price/spot-price.go
@@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"fmt"
- "os"
"slices"
"sort"
"strings"
@@ -12,6 +11,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph"
+ maptAzIdentity "github.com/redhat-developer/mapt/pkg/provider/azure/module/identity"
"github.com/redhat-developer/mapt/pkg/util"
"github.com/redhat-developer/mapt/pkg/util/logging"
"golang.org/x/exp/maps"
@@ -71,22 +71,13 @@ type evictionRate struct {
EvictionRate string `json:"spotEvictionRate"`
}
-var (
- azIdentityEnvs = []string{
- "AZURE_TENANT_ID",
- "AZURE_SUBSCRIPTION_ID",
- "AZURE_CLIENT_ID",
- "AZURE_CLIENT_SECRET",
- }
-
- evictionRates = map[string]evictionRateSpec{
- "lowest": {Lowest, "lowest", 0, "0-5"},
- "low": {Low, "low", 1, "5-10"},
- "medium": {Medium, "medium", 2, "10-15"},
- "high": {High, "high", 3, "15-20"},
- "highest": {Highest, "highest", 4, "20+"},
- }
-)
+var evictionRates = map[string]evictionRateSpec{
+ "lowest": {Lowest, "lowest", 0, "0-5"},
+ "low": {Low, "low", 1, "5-10"},
+ "medium": {Medium, "medium", 2, "10-15"},
+ "high": {High, "high", 3, "15-20"},
+ "highest": {Highest, "highest", 4, "20+"},
+}
// This function will return the best spot option
func GetBestSpotChoice(r BestSpotChoiceRequest) (*BestSpotChoiceResponse, error) {
@@ -115,7 +106,7 @@ func GetBestSpotChoice(r BestSpotChoiceRequest) (*BestSpotChoiceResponse, error)
func getGraphClient() (*armresourcegraph.Client, error) {
// Auth identity
- setAZIdentityEnvs()
+ maptAzIdentity.SetAZIdentityEnvs()
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
return nil, fmt.Errorf("error getting the best spot price choice: %v", err)
@@ -124,17 +115,6 @@ func getGraphClient() (*armresourcegraph.Client, error) {
return armresourcegraph.NewClient(cred, nil)
}
-// Envs required for auth with go sdk
-// https://learn.microsoft.com/es-es/azure/developer/go/azure-sdk-authentication?tabs=bash#service-principal-with-a-secret
-// do not match standard envs for pulumi envs for auth with native sdk
-// https://www.pulumi.com/registry/packages/azure-native/installation-configuration/#set-configuration-using-environment-variables
-func setAZIdentityEnvs() {
- for _, e := range azIdentityEnvs {
- os.Setenv(e,
- os.Getenv(strings.ReplaceAll(e, "AZURE", "ARM")))
- }
-}
-
func getPriceHistory(ctx context.Context, client *armresourcegraph.Client,
r BestSpotChoiceRequest) ([]priceHistory, error) {
spr := fmt.Sprintf(querySpotPrice,
diff --git a/pkg/util/resources/azure.go b/pkg/util/resources/azure.go
new file mode 100644
index 000000000..a1b1f9115
--- /dev/null
+++ b/pkg/util/resources/azure.go
@@ -0,0 +1,186 @@
+package resources
+
+import (
+ "context"
+ "log"
+ "os"
+ "slices"
+ "strconv"
+ "strings"
+ "sync"
+
+ "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
+ armcompute "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6"
+ maptAzIdenity "github.com/redhat-developer/mapt/pkg/provider/azure/module/identity"
+)
+
+func getAzureVMSKUs(cpus, memory int32, arch Arch) []string {
+ maptAzIdenity.SetAZIdentityEnvs()
+ cred, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ log.Fatalf("failed to obtain a credential: %v", err)
+ }
+ ctx := context.Background()
+ subscriptionId := os.Getenv("AZURE_SUBSCRIPTION_ID")
+ clientFactory, err := armcompute.NewClientFactory(subscriptionId, cred, nil)
+ if err != nil {
+ log.Fatalf("failed to create client: %v", err)
+ }
+ pager := clientFactory.NewResourceSKUsClient().NewListPager(&armcompute.ResourceSKUsClientListOptions{Filter: nil,
+ IncludeExtendedLocations: nil,
+ })
+
+ vmTypes := []string{}
+ for pager.More() {
+ page, err := pager.NextPage(ctx)
+ if err != nil {
+ log.Fatalf("failed to advance page: %v", err)
+ }
+ vmTypes = append(vmTypes, FilterVMs(page, filterCPUsAndMemory(cpus, memory, arch))...)
+ }
+ return vmTypes
+}
+
+type filterFunc func(*armcompute.ResourceSKU, *sync.WaitGroup, chan<- string)
+
+func filterCPUsAndMemory(cpus, memory int32, arch Arch) filterFunc {
+ return func(res *armcompute.ResourceSKU, wg *sync.WaitGroup, vmCh chan<- string) {
+ defer wg.Done()
+ choose := false
+ if res.ResourceType != nil && *res.ResourceType != "virtualMachines" {
+ return
+ }
+ for _, capability := range res.Capabilities {
+ if *capability.Name == "vCPUs" {
+ vCpus, err := strconv.ParseInt(*capability.Value, 10, 32)
+ if err != nil {
+ return
+ }
+ if vCpus == int64(cpus) {
+ choose = true
+ }
+ continue
+ }
+ if *capability.Name == "MemoryGB" {
+ mem, err := strconv.ParseInt(*capability.Value, 10, 32)
+ if err != nil {
+ return
+ }
+ if mem == int64(memory) {
+ choose = choose && true
+ } else {
+ choose = choose && false
+ }
+ continue
+ }
+ if *capability.Name == "HyperVGenerations" {
+ if strings.Contains(*capability.Value, "V2") {
+ choose = choose && true
+ } else {
+ choose = choose && false
+ }
+ continue
+ }
+ if *capability.Name == "AcceleratedNetworkingEnabled" {
+ fastNet, err := strconv.ParseBool(*capability.Value)
+ if err != nil {
+ return
+ }
+ if fastNet {
+ choose = choose && true
+ } else {
+ choose = choose && false
+ }
+ continue
+ }
+ if *capability.Name == "EncryptionAtHostSupported" {
+ encryption, err := strconv.ParseBool(*capability.Value)
+ if err != nil {
+ return
+ }
+ if encryption {
+ choose = choose && true
+ } else {
+ choose = choose && false
+ }
+ continue
+ }
+ if *capability.Name == "CpuArchitectureType" {
+ if *capability.Value == arch.String() {
+ choose = choose && true
+ } else {
+ choose = choose && false
+ }
+ continue
+ }
+ if *capability.Name == "LowPriorityCapable" {
+ lowPriority, err := strconv.ParseBool(*capability.Value)
+ if err != nil {
+ return
+ }
+ if lowPriority {
+ choose = choose && true
+ } else {
+ choose = choose && false
+ }
+ continue
+ }
+ if *capability.Name == "PremiumIO" {
+ premiumIO, err := strconv.ParseBool(*capability.Value)
+ if err != nil {
+ return
+ }
+ if premiumIO {
+ choose = choose && true
+ } else {
+ choose = choose && false
+ }
+ continue
+ }
+ if *capability.Name == "MaxResourceVolumeMB" {
+ disk, err := strconv.ParseUint(*capability.Value, 10, 64)
+ if err != nil {
+ return
+ }
+ if disk == 0 {
+ choose = choose && true
+ } else {
+ choose = choose && false
+ }
+ }
+ }
+ if choose {
+ vmCh <- *res.Name
+ }
+ }
+}
+
+func FilterVMs(skus armcompute.ResourceSKUsClientListResponse, filter filterFunc) []string {
+ chVmTypes := make(chan string)
+ vmTypes := []string{}
+ wg := &sync.WaitGroup{}
+ for _, v := range skus.Value {
+ wg.Add(1)
+ go filter(v, wg, chVmTypes)
+ }
+ c := make(chan int)
+
+ go func() {
+ defer close(c)
+ wg.Wait()
+ }()
+
+ for {
+ select {
+ case vmtype := <-chVmTypes:
+ if !slices.Contains(vmTypes, vmtype) {
+ vmTypes = append(vmTypes, vmtype)
+ }
+ if len(vmTypes) == 4 {
+ return vmTypes
+ }
+ case <-c:
+ return vmTypes
+ }
+ }
+}
diff --git a/pkg/util/resources/resources.go b/pkg/util/resources/resources.go
index 5eb851170..62bcc9168 100644
--- a/pkg/util/resources/resources.go
+++ b/pkg/util/resources/resources.go
@@ -1,6 +1,31 @@
package resources
-import "fmt"
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity"
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector"
+ "github.com/aws/aws-sdk-go-v2/config"
+ ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+)
+
+type Arch int
+
+func (a Arch) String() string {
+ switch a {
+ case Amd64:
+ return "x64"
+ case Arm64:
+ return "Arm64"
+ }
+ return "x64"
+}
+
+const (
+ Amd64 Arch = iota + 1
+ Arm64
+)
// Returns the unique name to identify a resoruces within
// pulumi context
@@ -10,3 +35,47 @@ func GetResourceName(prefix, maptComponentID, resourceTypeAbbrev string) string
}
return fmt.Sprintf("%s-%s", maptComponentID, resourceTypeAbbrev)
}
+
+func GetAwsMachineTypes(vCpus, memoryGib int32, cpuArch Arch) ([]string, error) {
+ ctx := context.Background()
+ cfg, err := config.LoadDefaultConfig(ctx)
+ if err != nil {
+ return nil, err
+ }
+ instanceSelector, err := selector.New(ctx, cfg)
+ if err != nil {
+ return nil, err
+ }
+
+ vcpusRange := selector.Int32RangeFilter{
+ LowerBound: vCpus,
+ UpperBound: vCpus,
+ }
+ memoryRange := selector.ByteQuantityRangeFilter{
+ LowerBound: bytequantity.FromGiB(uint64(memoryGib)),
+ UpperBound: bytequantity.FromGiB(uint64(memoryGib)),
+ }
+
+ arch := ec2types.ArchitectureTypeX8664
+ if cpuArch == Arm64 {
+ arch = ec2types.ArchitectureTypeArm64
+ }
+ maxResults := 3
+
+ filters := selector.Filters{
+ VCpusRange: &vcpusRange,
+ MemoryRange: &memoryRange,
+ CPUArchitecture: &arch,
+ MaxResults: &maxResults,
+ }
+
+ instanceTypesSlice, err := instanceSelector.Filter(ctx, filters)
+ if err != nil {
+ return nil, err
+ }
+ return instanceTypesSlice, nil
+}
+
+func GetAzureMachineTypes(vCpus, memoryGib int32, arch Arch) []string {
+ return getAzureVMSKUs(vCpus, memoryGib, arch)
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md
index af095f1da..1a9cedbaf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md
@@ -1,5 +1,11 @@
# Release History
+## 1.13.0 (2024-07-16)
+
+### Features Added
+
+- Added runtime.NewRequestFromRequest(), allowing for a policy.Request to be created from an existing *http.Request.
+
## 1.12.0 (2024-06-06)
### Features Added
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go
index 187fe82b9..00f2d5a0a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/internal/resource/resource_identifier.go
@@ -192,7 +192,7 @@ func appendNext(parent *ResourceID, parts []string, id string) (*ResourceID, err
}
if strings.EqualFold(parts[0], providersKey) && (len(parts) == 2 || strings.EqualFold(parts[2], providersKey)) {
- //provider resource can only be on a tenant or a subscription parent
+ // provider resource can only be on a tenant or a subscription parent
if parent.ResourceType.String() != SubscriptionResourceType.String() && parent.ResourceType.String() != TenantResourceType.String() {
return nil, fmt.Errorf("invalid resource ID: %s", id)
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/pipeline.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/pipeline.go
index 039b758bf..6a7c916b4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/pipeline.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/pipeline.go
@@ -34,18 +34,22 @@ func NewPipeline(module, version string, cred azcore.TokenCredential, plOpts azr
InsecureAllowCredentialWithHTTP: options.InsecureAllowCredentialWithHTTP,
Scopes: []string{conf.Audience + "/.default"},
})
+ // we don't want to modify the underlying array in plOpts.PerRetry
perRetry := make([]azpolicy.Policy, len(plOpts.PerRetry), len(plOpts.PerRetry)+1)
copy(perRetry, plOpts.PerRetry)
- plOpts.PerRetry = append(perRetry, authPolicy, exported.PolicyFunc(httpTraceNamespacePolicy))
+ perRetry = append(perRetry, authPolicy, exported.PolicyFunc(httpTraceNamespacePolicy))
+ plOpts.PerRetry = perRetry
if !options.DisableRPRegistration {
regRPOpts := armpolicy.RegistrationOptions{ClientOptions: options.ClientOptions}
regPolicy, err := NewRPRegistrationPolicy(cred, ®RPOpts)
if err != nil {
return azruntime.Pipeline{}, err
}
+ // we don't want to modify the underlying array in plOpts.PerCall
perCall := make([]azpolicy.Policy, len(plOpts.PerCall), len(plOpts.PerCall)+1)
copy(perCall, plOpts.PerCall)
- plOpts.PerCall = append(perCall, regPolicy)
+ perCall = append(perCall, regPolicy)
+ plOpts.PerCall = perCall
}
if plOpts.APIVersion.Name == "" {
plOpts.APIVersion.Name = "api-version"
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/request.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/request.go
index 3041984d9..e3e2d4e58 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/request.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported/request.go
@@ -7,6 +7,7 @@
package exported
import (
+ "bytes"
"context"
"encoding/base64"
"errors"
@@ -67,6 +68,42 @@ func (ov opValues) get(value any) bool {
return ok
}
+// NewRequestFromRequest creates a new policy.Request with an existing *http.Request
+// Exported as runtime.NewRequestFromRequest().
+func NewRequestFromRequest(req *http.Request) (*Request, error) {
+ policyReq := &Request{req: req}
+
+ if req.Body != nil {
+ // we can avoid a body copy here if the underlying stream is already a
+ // ReadSeekCloser.
+ readSeekCloser, isReadSeekCloser := req.Body.(io.ReadSeekCloser)
+
+ if !isReadSeekCloser {
+ // since this is an already populated http.Request we want to copy
+ // over its body, if it has one.
+ bodyBytes, err := io.ReadAll(req.Body)
+
+ if err != nil {
+ return nil, err
+ }
+
+ if err := req.Body.Close(); err != nil {
+ return nil, err
+ }
+
+ readSeekCloser = NopCloser(bytes.NewReader(bodyBytes))
+ }
+
+ // SetBody also takes care of updating the http.Request's body
+ // as well, so they should stay in-sync from this point.
+ if err := policyReq.SetBody(readSeekCloser, req.Header.Get("Content-Type")); err != nil {
+ return nil, err
+ }
+ }
+
+ return policyReq, nil
+}
+
// NewRequest creates a new Request with the specified input.
// Exported as runtime.NewRequest().
func NewRequest(ctx context.Context, httpMethod string, endpoint string) (*Request, error) {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go
index 79651fd96..e5b28a9b1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go
@@ -40,5 +40,5 @@ const (
Module = "azcore"
// Version is the semantic version (see http://semver.org) of this module.
- Version = "v1.12.0"
+ Version = "v1.13.0"
)
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/request.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/request.go
index 40ddc8d92..7d34b7803 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/request.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/request.go
@@ -15,6 +15,7 @@ import (
"fmt"
"io"
"mime/multipart"
+ "net/http"
"net/textproto"
"net/url"
"path"
@@ -45,6 +46,11 @@ func NewRequest(ctx context.Context, httpMethod string, endpoint string) (*polic
return exported.NewRequest(ctx, httpMethod, endpoint)
}
+// NewRequestFromRequest creates a new policy.Request with an existing *http.Request
+func NewRequestFromRequest(req *http.Request) (*policy.Request, error) {
+ return exported.NewRequestFromRequest(req)
+}
+
// EncodeQueryParams will parse and encode any query parameters in the specified URL.
// Any semicolons will automatically be escaped.
func EncodeQueryParams(u string) (string, error) {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md
index 6d4b6feb8..a8c2feb6d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md
@@ -1,5 +1,29 @@
# Release History
+## 1.7.0 (2024-06-20)
+
+### Features Added
+* `AzurePipelinesCredential` authenticates an Azure Pipelines service connection with
+ workload identity federation
+
+### Breaking Changes
+> These changes affect only code written against a beta version such as v1.7.0-beta.1
+* Removed the persistent token caching API. It will return in v1.8.0-beta.1
+
+## 1.7.0-beta.1 (2024-06-10)
+
+### Features Added
+* Restored `AzurePipelinesCredential` and persistent token caching API
+
+## Breaking Changes
+> These changes affect only code written against a beta version such as v1.6.0-beta.4
+* Values which `NewAzurePipelinesCredential` read from environment variables in
+ prior versions are now parameters
+* Renamed `AzurePipelinesServiceConnectionCredentialOptions` to `AzurePipelinesCredentialOptions`
+
+### Bugs Fixed
+* Managed identity bug fixes
+
## 1.6.0 (2024-06-10)
### Features Added
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/README.md
index b5acff0e6..7e201ea2f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/README.md
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/README.md
@@ -140,6 +140,7 @@ client := armresources.NewResourceGroupsClient("subscription ID", chain, nil)
|Credential|Usage
|-|-
+|[AzurePipelinesCredential](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#AzurePipelinesCredential)|Authenticate an Azure Pipelines [service connection](https://learn.microsoft.com/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml)
|[ClientAssertionCredential](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#ClientAssertionCredential)|Authenticate a service principal with a signed client assertion
|[ClientCertificateCredential](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#ClientCertificateCredential)|Authenticate a service principal with a certificate
|[ClientSecretCredential](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#ClientSecretCredential)|Authenticate a service principal with a secret
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TOKEN_CACHING.MD b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TOKEN_CACHING.MD
index f9cc48943..fbaa29220 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TOKEN_CACHING.MD
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TOKEN_CACHING.MD
@@ -57,6 +57,7 @@ The following table indicates the state of in-memory and persistent caching in e
|--------------------------------|---------------------------------------------------------------------|--------------------------|
| `AzureCLICredential` | Not Supported | Not Supported |
| `AzureDeveloperCLICredential` | Not Supported | Not Supported |
+| `AzurePipelinesCredential` | Supported | Supported |
| `ClientAssertionCredential` | Supported | Supported |
| `ClientCertificateCredential` | Supported | Supported |
| `ClientSecretCredential` | Supported | Supported |
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TROUBLESHOOTING.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TROUBLESHOOTING.md
index 3564e685e..54016a070 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TROUBLESHOOTING.md
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TROUBLESHOOTING.md
@@ -10,6 +10,7 @@ This troubleshooting guide covers failure investigation techniques, common error
- [Enable and configure logging](#enable-and-configure-logging)
- [Troubleshoot AzureCLICredential authentication issues](#troubleshoot-azureclicredential-authentication-issues)
- [Troubleshoot AzureDeveloperCLICredential authentication issues](#troubleshoot-azuredeveloperclicredential-authentication-issues)
+- [Troubleshoot AzurePipelinesCredential authentication issues](#troubleshoot-azurepipelinescredential-authentication-issues)
- [Troubleshoot ClientCertificateCredential authentication issues](#troubleshoot-clientcertificatecredential-authentication-issues)
- [Troubleshoot ClientSecretCredential authentication issues](#troubleshoot-clientsecretcredential-authentication-issues)
- [Troubleshoot DefaultAzureCredential authentication issues](#troubleshoot-defaultazurecredential-authentication-issues)
@@ -226,6 +227,15 @@ azd auth token --output json --scope https://management.core.windows.net/.defaul
|---|---|---|
|no client ID/tenant ID/token file specified|Incomplete configuration|In most cases these values are provided via environment variables set by Azure Workload Identity.
- If your application runs on Azure Kubernetes Servide (AKS) or a cluster that has deployed the Azure Workload Identity admission webhook, check pod labels and service account configuration. See the [AKS documentation](https://learn.microsoft.com/azure/aks/workload-identity-deploy-cluster#disable-workload-identity) and [Azure Workload Identity troubleshooting guide](https://azure.github.io/azure-workload-identity/docs/troubleshooting.html) for more details.
- If your application isn't running on AKS or your cluster hasn't deployed the Workload Identity admission webhook, set these values in `WorkloadIdentityCredentialOptions`
+
+## Troubleshoot AzurePipelinesCredential authentication issues
+
+| Error Message |Description| Mitigation |
+|---|---|---|
+| AADSTS900023: Specified tenant identifier 'some tenant ID' is neither a valid DNS name, nor a valid external domain.|The `tenantID` argument to `NewAzurePipelinesCredential` is incorrect| Verify the tenant ID. It must identify the tenant of the user-assigned managed identity or service principal configured for the service connection.|
+| No service connection found with identifier |The `serviceConnectionID` argument to `NewAzurePipelinesCredential` is incorrect| Verify the service connection ID. This parameter refers to the `resourceId` of the Azure Service Connection. It can also be found in the query string of the service connection's configuration in Azure DevOps. [Azure Pipelines documentation](https://learn.microsoft.com/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml) has more information about service connections.|
+|302 (Found) response from OIDC endpoint|The `systemAccessToken` argument to `NewAzurePipelinesCredential` is incorrect|Check pipeline configuration. This value comes from the predefined variable `System.AccessToken` [as described in Azure Pipelines documentation](https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#systemaccesstoken).|
+
## Get additional help
Additional information on ways to reach out for support can be found in [SUPPORT.md](https://github.com/Azure/azure-sdk-for-go/blob/main/SUPPORT.md).
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_pipelines_credential.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_pipelines_credential.go
index 2655543ae..80c1806bb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_pipelines_credential.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_pipelines_credential.go
@@ -19,21 +19,20 @@ import (
const (
credNameAzurePipelines = "AzurePipelinesCredential"
oidcAPIVersion = "7.1"
- systemAccessToken = "SYSTEM_ACCESSTOKEN"
systemOIDCRequestURI = "SYSTEM_OIDCREQUESTURI"
)
-// azurePipelinesCredential authenticates with workload identity federation in an Azure Pipeline. See
+// AzurePipelinesCredential authenticates with workload identity federation in an Azure Pipeline. See
// [Azure Pipelines documentation] for more information.
//
// [Azure Pipelines documentation]: https://learn.microsoft.com/azure/devops/pipelines/library/connect-to-azure?view=azure-devops#create-an-azure-resource-manager-service-connection-that-uses-workload-identity-federation
-type azurePipelinesCredential struct {
+type AzurePipelinesCredential struct {
connectionID, oidcURI, systemAccessToken string
cred *ClientAssertionCredential
}
-// azurePipelinesCredentialOptions contains optional parameters for AzurePipelinesCredential.
-type azurePipelinesCredentialOptions struct {
+// AzurePipelinesCredentialOptions contains optional parameters for AzurePipelinesCredential.
+type AzurePipelinesCredentialOptions struct {
azcore.ClientOptions
// AdditionallyAllowedTenants specifies additional tenants for which the credential may acquire tokens.
@@ -48,28 +47,39 @@ type azurePipelinesCredentialOptions struct {
DisableInstanceDiscovery bool
}
-// newAzurePipelinesCredential is the constructor for AzurePipelinesCredential. In addition to its required arguments,
-// it reads a security token for the running build, which is required to authenticate the service connection, from the
-// environment variable SYSTEM_ACCESSTOKEN. See the [Azure Pipelines documentation] for an example showing how to set
-// this variable in build job YAML.
+// NewAzurePipelinesCredential is the constructor for AzurePipelinesCredential.
+//
+// - tenantID: tenant ID of the service principal federated with the service connection
+// - clientID: client ID of that service principal
+// - serviceConnectionID: ID of the service connection to authenticate
+// - systemAccessToken: security token for the running build. See [Azure Pipelines documentation] for
+// an example showing how to get this value.
//
// [Azure Pipelines documentation]: https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#systemaccesstoken
-func newAzurePipelinesCredential(tenantID, clientID, serviceConnectionID string, options *azurePipelinesCredentialOptions) (*azurePipelinesCredential, error) {
- if options == nil {
- options = &azurePipelinesCredentialOptions{}
+func NewAzurePipelinesCredential(tenantID, clientID, serviceConnectionID, systemAccessToken string, options *AzurePipelinesCredentialOptions) (*AzurePipelinesCredential, error) {
+ if !validTenantID(tenantID) {
+ return nil, errInvalidTenantID
+ }
+ if clientID == "" {
+ return nil, errors.New("no client ID specified")
+ }
+ if serviceConnectionID == "" {
+ return nil, errors.New("no service connection ID specified")
+ }
+ if systemAccessToken == "" {
+ return nil, errors.New("no system access token specified")
}
u := os.Getenv(systemOIDCRequestURI)
if u == "" {
return nil, fmt.Errorf("no value for environment variable %s. This should be set by Azure Pipelines", systemOIDCRequestURI)
}
- sat := os.Getenv(systemAccessToken)
- if sat == "" {
- return nil, errors.New("no value for environment variable " + systemAccessToken)
- }
- a := azurePipelinesCredential{
+ a := AzurePipelinesCredential{
connectionID: serviceConnectionID,
oidcURI: u,
- systemAccessToken: sat,
+ systemAccessToken: systemAccessToken,
+ }
+ if options == nil {
+ options = &AzurePipelinesCredentialOptions{}
}
caco := ClientAssertionCredentialOptions{
AdditionallyAllowedTenants: options.AdditionallyAllowedTenants,
@@ -86,7 +96,7 @@ func newAzurePipelinesCredential(tenantID, clientID, serviceConnectionID string,
}
// GetToken requests an access token from Microsoft Entra ID. Azure SDK clients call this method automatically.
-func (a *azurePipelinesCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
+func (a *AzurePipelinesCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error) {
var err error
ctx, endSpan := runtime.StartSpan(ctx, credNameAzurePipelines+"."+traceOpGetToken, a.cred.client.azClient.Tracer(), nil)
defer func() { endSpan(err) }()
@@ -94,7 +104,7 @@ func (a *azurePipelinesCredential) GetToken(ctx context.Context, opts policy.Tok
return tk, err
}
-func (a *azurePipelinesCredential) getAssertion(ctx context.Context) (string, error) {
+func (a *AzurePipelinesCredential) getAssertion(ctx context.Context) (string, error) {
url := a.oidcURI + "?api-version=" + oidcAPIVersion + "&serviceConnectionId=" + a.connectionID
url, err := runtime.EncodeQueryParams(url)
if err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/errors.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/errors.go
index 698650bbb..35fa01d13 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/errors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/errors.go
@@ -83,6 +83,8 @@ func (e *AuthenticationFailedError) Error() string {
anchor = "azure-cli"
case credNameAzureDeveloperCLI:
anchor = "azd"
+ case credNameAzurePipelines:
+ anchor = "apc"
case credNameCert:
anchor = "client-cert"
case credNameSecret:
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go
index 459ef64c6..4305b5d3d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go
@@ -14,5 +14,5 @@ const (
module = "github.com/Azure/azure-sdk-for-go/sdk/" + component
// Version is the semantic version (see http://semver.org) of this module.
- version = "v1.6.0"
+ version = "v1.7.0"
)
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/CHANGELOG.md
new file mode 100644
index 000000000..5fcb39dcb
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/CHANGELOG.md
@@ -0,0 +1,433 @@
+# Release History
+
+## 6.0.0 (2024-07-26)
+### Breaking Changes
+
+- Type of `SecurityPostureReference.ExcludeExtensions` has been changed from `[]*VirtualMachineExtension` to `[]*string`
+
+### Features Added
+
+- New struct `SecurityPostureReferenceUpdate`
+- New field `IsOverridable` in struct `SecurityPostureReference`
+- New field `SecurityPostureReference` in struct `VirtualMachineScaleSetUpdateVMProfile`
+
+
+## 5.7.0 (2024-04-26)
+### Features Added
+
+- New value `DiffDiskPlacementNvmeDisk` added to enum type `DiffDiskPlacement`
+- New value `DiskCreateOptionTypesCopy`, `DiskCreateOptionTypesRestore` added to enum type `DiskCreateOptionTypes`
+- New enum type `ResourceIDOptionsForGetCapacityReservationGroups` with values `ResourceIDOptionsForGetCapacityReservationGroupsAll`, `ResourceIDOptionsForGetCapacityReservationGroupsCreatedInSubscription`, `ResourceIDOptionsForGetCapacityReservationGroupsSharedWithSubscription`
+- New struct `EventGridAndResourceGraph`
+- New struct `ScheduledEventsAdditionalPublishingTargets`
+- New struct `ScheduledEventsPolicy`
+- New struct `UserInitiatedReboot`
+- New struct `UserInitiatedRedeploy`
+- New field `ResourceIDsOnly` in struct `CapacityReservationGroupsClientListBySubscriptionOptions`
+- New field `SourceResource` in struct `DataDisk`
+- New field `Caching`, `DeleteOption`, `DiskEncryptionSet`, `WriteAcceleratorEnabled` in struct `DataDisksToAttach`
+- New field `ScheduledEventsPolicy` in struct `VirtualMachineProperties`
+- New field `ScheduledEventsPolicy` in struct `VirtualMachineScaleSetProperties`
+- New field `ForceUpdateOSDiskForEphemeral` in struct `VirtualMachineScaleSetReimageParameters`
+- New field `DiffDiskSettings` in struct `VirtualMachineScaleSetUpdateOSDisk`
+- New field `ForceUpdateOSDiskForEphemeral` in struct `VirtualMachineScaleSetVMReimageParameters`
+
+
+## 5.6.0 (2024-03-22)
+### Features Added
+
+- New field `VirtualMachineID` in struct `GalleryArtifactVersionFullSource`
+
+
+## 5.5.0 (2024-01-26)
+### Features Added
+
+- New value `DiskSecurityTypesConfidentialVMNonPersistedTPM` added to enum type `DiskSecurityTypes`
+- New enum type `ProvisionedBandwidthCopyOption` with values `ProvisionedBandwidthCopyOptionEnhanced`, `ProvisionedBandwidthCopyOptionNone`
+- New field `ProvisionedBandwidthCopySpeed` in struct `CreationData`
+
+
+## 5.4.0 (2023-12-22)
+### Features Added
+
+- New value `ConfidentialVMEncryptionTypeNonPersistedTPM` added to enum type `ConfidentialVMEncryptionType`
+- New value `ReplicationStatusTypesUefiSettings` added to enum type `ReplicationStatusTypes`
+- New value `SecurityEncryptionTypesNonPersistedTPM` added to enum type `SecurityEncryptionTypes`
+- New enum type `Mode` with values `ModeAudit`, `ModeEnforce`
+- New enum type `SSHEncryptionTypes` with values `SSHEncryptionTypesEd25519`, `SSHEncryptionTypesRSA`
+- New enum type `UefiKeyType` with values `UefiKeyTypeSHA256`, `UefiKeyTypeX509`
+- New enum type `UefiSignatureTemplateName` with values `UefiSignatureTemplateNameMicrosoftUefiCertificateAuthorityTemplate`, `UefiSignatureTemplateNameMicrosoftWindowsTemplate`, `UefiSignatureTemplateNameNoSignatureTemplate`
+- New function `*DedicatedHostsClient.BeginRedeploy(context.Context, string, string, string, *DedicatedHostsClientBeginRedeployOptions) (*runtime.Poller[DedicatedHostsClientRedeployResponse], error)`
+- New function `*VirtualMachineScaleSetVMsClient.BeginApproveRollingUpgrade(context.Context, string, string, string, *VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientApproveRollingUpgradeResponse], error)`
+- New function `*VirtualMachineScaleSetVMsClient.BeginAttachDetachDataDisks(context.Context, string, string, string, AttachDetachDataDisksRequest, *VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientAttachDetachDataDisksResponse], error)`
+- New function `*VirtualMachineScaleSetsClient.BeginApproveRollingUpgrade(context.Context, string, string, *VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions) (*runtime.Poller[VirtualMachineScaleSetsClientApproveRollingUpgradeResponse], error)`
+- New function `*VirtualMachinesClient.BeginAttachDetachDataDisks(context.Context, string, string, AttachDetachDataDisksRequest, *VirtualMachinesClientBeginAttachDetachDataDisksOptions) (*runtime.Poller[VirtualMachinesClientAttachDetachDataDisksResponse], error)`
+- New struct `AttachDetachDataDisksRequest`
+- New struct `CommunityGalleryMetadata`
+- New struct `CommunityGalleryProperties`
+- New struct `DataDisksToAttach`
+- New struct `DataDisksToDetach`
+- New struct `EncryptionIdentity`
+- New struct `GalleryImageVersionUefiSettings`
+- New struct `ImageVersionSecurityProfile`
+- New struct `ProxyAgentSettings`
+- New struct `ResiliencyPolicy`
+- New struct `ResilientVMCreationPolicy`
+- New struct `ResilientVMDeletionPolicy`
+- New struct `ResourceSharingProfile`
+- New struct `SSHGenerateKeyPairInputParameters`
+- New struct `SharedGalleryProperties`
+- New struct `UefiKey`
+- New struct `UefiKeySignatures`
+- New field `OSRollingUpgradeDeferral` in struct `AutomaticOSUpgradePolicy`
+- New field `SharedSubscriptionIDs` in struct `CapacityReservationGroupInstanceView`
+- New field `SharingProfile` in struct `CapacityReservationGroupProperties`
+- New field `Properties` in struct `CommunityGallery`
+- New field `ArtifactTags`, `Disclaimer` in struct `CommunityGalleryImageProperties`
+- New field `ArtifactTags`, `Disclaimer` in struct `CommunityGalleryImageVersionProperties`
+- New field `SecurityProfile` in struct `GalleryImageVersionProperties`
+- New field `DiskControllerType` in struct `RestorePointSourceVMStorageProfile`
+- New field `Parameters` in struct `SSHPublicKeysClientGenerateKeyPairOptions`
+- New field `EncryptionIdentity`, `ProxyAgentSettings` in struct `SecurityProfile`
+- New field `Properties` in struct `SharedGallery`
+- New field `ArtifactTags` in struct `SharedGalleryImageProperties`
+- New field `ArtifactTags` in struct `SharedGalleryImageVersionProperties`
+- New field `Etag`, `ManagedBy` in struct `VirtualMachine`
+- New field `IsVMInStandbyPool` in struct `VirtualMachineInstanceView`
+- New field `Etag` in struct `VirtualMachineScaleSet`
+- New field `ResiliencyPolicy` in struct `VirtualMachineScaleSetProperties`
+- New field `ResiliencyPolicy` in struct `VirtualMachineScaleSetUpdateProperties`
+- New field `Etag` in struct `VirtualMachineScaleSetVM`
+- New field `TimeCreated` in struct `VirtualMachineScaleSetVMProfile`
+- New field `IfMatch`, `IfNoneMatch` in struct `VirtualMachineScaleSetVMsClientBeginUpdateOptions`
+- New field `IfMatch`, `IfNoneMatch` in struct `VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions`
+- New field `IfMatch`, `IfNoneMatch` in struct `VirtualMachineScaleSetsClientBeginUpdateOptions`
+- New field `IfMatch`, `IfNoneMatch` in struct `VirtualMachinesClientBeginCreateOrUpdateOptions`
+- New field `IfMatch`, `IfNoneMatch` in struct `VirtualMachinesClientBeginUpdateOptions`
+
+
+## 5.3.0 (2023-11-24)
+### Features Added
+
+- Support for test fakes and OpenTelemetry trace spans.
+
+
+## 5.3.0-beta.2 (2023-10-30)
+
+### Other Changes
+
+- Updated with latest code generator to fix a few issues in fakes.
+
+## 5.3.0-beta.1 (2023-10-09)
+### Features Added
+
+- Support for test fakes and OpenTelemetry trace spans.
+
+## 5.2.0 (2023-09-22)
+### Features Added
+
+- New value `DiskCreateOptionCopyFromSanSnapshot` added to enum type `DiskCreateOption`
+- New enum type `DomainNameLabelScopeTypes` with values `DomainNameLabelScopeTypesNoReuse`, `DomainNameLabelScopeTypesResourceGroupReuse`, `DomainNameLabelScopeTypesSubscriptionReuse`, `DomainNameLabelScopeTypesTenantReuse`
+- New enum type `NetworkInterfaceAuxiliaryMode` with values `NetworkInterfaceAuxiliaryModeAcceleratedConnections`, `NetworkInterfaceAuxiliaryModeFloating`, `NetworkInterfaceAuxiliaryModeNone`
+- New enum type `NetworkInterfaceAuxiliarySKU` with values `NetworkInterfaceAuxiliarySKUA1`, `NetworkInterfaceAuxiliarySKUA2`, `NetworkInterfaceAuxiliarySKUA4`, `NetworkInterfaceAuxiliarySKUA8`, `NetworkInterfaceAuxiliarySKUNone`
+- New field `ElasticSanResourceID` in struct `CreationData`
+- New field `LastOwnershipUpdateTime` in struct `DiskProperties`
+- New field `AuxiliaryMode`, `AuxiliarySKU` in struct `VirtualMachineNetworkInterfaceConfigurationProperties`
+- New field `DomainNameLabelScope` in struct `VirtualMachinePublicIPAddressDNSSettingsConfiguration`
+- New field `AuxiliaryMode`, `AuxiliarySKU` in struct `VirtualMachineScaleSetNetworkConfigurationProperties`
+- New field `DomainNameLabelScope` in struct `VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings`
+- New field `AuxiliaryMode`, `AuxiliarySKU` in struct `VirtualMachineScaleSetUpdateNetworkConfigurationProperties`
+- New field `TimeCreated` in struct `VirtualMachineScaleSetVMProperties`
+
+
+## 5.1.0 (2023-07-28)
+### Features Added
+
+- New enum type `FileFormat` with values `FileFormatVHD`, `FileFormatVHDX`
+- New field `FileFormat` in struct `GrantAccessData`
+
+
+## 5.0.0 (2023-05-26)
+### Breaking Changes
+
+- Type of `CommunityGalleryImageProperties.Identifier` has been changed from `*GalleryImageIdentifier` to `*CommunityGalleryImageIdentifier`
+- Type of `GalleryTargetExtendedLocation.StorageAccountType` has been changed from `*StorageAccountType` to `*EdgeZoneStorageAccountType`
+- Type of `RestorePointSourceVMDataDisk.DiskRestorePoint` has been changed from `*APIEntityReference` to `*DiskRestorePointAttributes`
+- Type of `RestorePointSourceVMOSDisk.DiskRestorePoint` has been changed from `*APIEntityReference` to `*DiskRestorePointAttributes`
+- `StorageAccountTypeStandardSSDLRS` from enum `StorageAccountType` has been removed
+- Field `ID` of struct `VirtualMachineScaleSetIPConfiguration` has been removed
+- Field `ID` of struct `VirtualMachineScaleSetNetworkConfiguration` has been removed
+- Field `ID` of struct `VirtualMachineScaleSetUpdateIPConfiguration` has been removed
+- Field `ID` of struct `VirtualMachineScaleSetUpdateNetworkConfiguration` has been removed
+
+### Features Added
+
+- New enum type `EdgeZoneStorageAccountType` with values `EdgeZoneStorageAccountTypePremiumLRS`, `EdgeZoneStorageAccountTypeStandardLRS`, `EdgeZoneStorageAccountTypeStandardSSDLRS`, `EdgeZoneStorageAccountTypeStandardZRS`
+- New enum type `ExpandTypeForListVMs` with values `ExpandTypeForListVMsInstanceView`
+- New enum type `ExpandTypesForListVMs` with values `ExpandTypesForListVMsInstanceView`
+- New enum type `RestorePointEncryptionType` with values `RestorePointEncryptionTypeEncryptionAtRestWithCustomerKey`, `RestorePointEncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys`, `RestorePointEncryptionTypeEncryptionAtRestWithPlatformKey`
+- New function `*DedicatedHostsClient.NewListAvailableSizesPager(string, string, string, *DedicatedHostsClientListAvailableSizesOptions) *runtime.Pager[DedicatedHostsClientListAvailableSizesResponse]`
+- New function `*VirtualMachineScaleSetsClient.BeginReapply(context.Context, string, string, *VirtualMachineScaleSetsClientBeginReapplyOptions) (*runtime.Poller[VirtualMachineScaleSetsClientReapplyResponse], error)`
+- New struct `CommunityGalleryImageIdentifier`
+- New struct `DedicatedHostSizeListResult`
+- New struct `DiskRestorePointAttributes`
+- New struct `RestorePointEncryption`
+- New struct `RunCommandManagedIdentity`
+- New struct `SecurityPostureReference`
+- New field `SKU` in struct `DedicatedHostUpdate`
+- New field `BypassPlatformSafetyChecksOnUserSchedule` in struct `LinuxVMGuestPatchAutomaticByPlatformSettings`
+- New field `HyperVGeneration` in struct `RestorePointSourceMetadata`
+- New field `WriteAcceleratorEnabled` in struct `RestorePointSourceVMDataDisk`
+- New field `WriteAcceleratorEnabled` in struct `RestorePointSourceVMOSDisk`
+- New field `ProvisionAfterExtensions` in struct `VirtualMachineExtensionProperties`
+- New field `ErrorBlobManagedIdentity`, `OutputBlobManagedIdentity`, `TreatFailureAsDeploymentFailure` in struct `VirtualMachineRunCommandProperties`
+- New field `ScriptURIManagedIdentity` in struct `VirtualMachineRunCommandScriptSource`
+- New field `PriorityMixPolicy`, `SpotRestorePolicy` in struct `VirtualMachineScaleSetUpdateProperties`
+- New field `Location` in struct `VirtualMachineScaleSetVMExtension`
+- New field `SecurityPostureReference` in struct `VirtualMachineScaleSetVMProfile`
+- New field `Hibernate` in struct `VirtualMachineScaleSetsClientBeginDeallocateOptions`
+- New field `Expand` in struct `VirtualMachinesClientListAllOptions`
+- New field `Expand` in struct `VirtualMachinesClientListOptions`
+- New field `BypassPlatformSafetyChecksOnUserSchedule` in struct `WindowsVMGuestPatchAutomaticByPlatformSettings`
+
+
+## 4.2.1 (2023-04-14)
+### Bug Fixes
+
+- Fix serialization bug of empty value of `any` type.
+
+
+## 4.2.0 (2023-03-27)
+### Features Added
+
+- New struct `ClientFactory` which is a client factory used to create any client in this module
+- New value `StorageAccountTypeStandardSSDLRS` added to enum type `StorageAccountType`
+- New field `ComputerName` in struct `VirtualMachineScaleSetVMInstanceView`
+- New field `HyperVGeneration` in struct `VirtualMachineScaleSetVMInstanceView`
+- New field `OSName` in struct `VirtualMachineScaleSetVMInstanceView`
+- New field `OSVersion` in struct `VirtualMachineScaleSetVMInstanceView`
+
+
+## 4.1.0 (2023-01-27)
+### Features Added
+
+- New type alias `AlternativeType` with values `AlternativeTypeNone`, `AlternativeTypeOffer`, `AlternativeTypePlan`
+- New type alias `ImageState` with values `ImageStateActive`, `ImageStateDeprecated`, `ImageStateScheduledForDeprecation`
+- New struct `AlternativeOption`
+- New struct `ImageDeprecationStatus`
+- New struct `OSImageNotificationProfile`
+- New struct `OSProfileProvisioningData`
+- New struct `ServiceArtifactReference`
+- New field `Zones` in struct `CloudService`
+- New field `UserData` in struct `RestorePointSourceMetadata`
+- New field `MaxSurge` in struct `RollingUpgradePolicy`
+- New field `RollbackFailedInstancesOnPolicyBreach` in struct `RollingUpgradePolicy`
+- New field `OSImageNotificationProfile` in struct `ScheduledEventsProfile`
+- New field `ImageDeprecationStatus` in struct `VirtualMachineImageProperties`
+- New field `ExactVersion` in struct `VirtualMachineReimageParameters`
+- New field `OSProfile` in struct `VirtualMachineReimageParameters`
+- New field `RequireGuestProvisionSignal` in struct `VirtualMachineScaleSetOSProfile`
+- New field `ConstrainedMaximumCapacity` in struct `VirtualMachineScaleSetProperties`
+- New field `ExactVersion` in struct `VirtualMachineScaleSetReimageParameters`
+- New field `OSProfile` in struct `VirtualMachineScaleSetReimageParameters`
+- New field `ServiceArtifactReference` in struct `VirtualMachineScaleSetVMProfile`
+- New field `ExactVersion` in struct `VirtualMachineScaleSetVMReimageParameters`
+- New field `OSProfile` in struct `VirtualMachineScaleSetVMReimageParameters`
+
+
+## 4.0.0 (2022-10-04)
+### Breaking Changes
+
+- Type of `GalleryImageVersionStorageProfile.Source` has been changed from `*GalleryArtifactVersionSource` to `*GalleryArtifactVersionFullSource`
+- Type of `SharingProfile.CommunityGalleryInfo` has been changed from `interface{}` to `*CommunityGalleryInfo`
+- Type of `VirtualMachineExtensionUpdateProperties.ProtectedSettingsFromKeyVault` has been changed from `interface{}` to `*KeyVaultSecretReference`
+- Type of `GalleryOSDiskImage.Source` has been changed from `*GalleryArtifactVersionSource` to `*GalleryDiskImageSource`
+- Type of `GalleryDiskImage.Source` has been changed from `*GalleryArtifactVersionSource` to `*GalleryDiskImageSource`
+- Type of `GalleryDataDiskImage.Source` has been changed from `*GalleryArtifactVersionSource` to `*GalleryDiskImageSource`
+- Type of `VirtualMachineScaleSetExtensionProperties.ProtectedSettingsFromKeyVault` has been changed from `interface{}` to `*KeyVaultSecretReference`
+- Type of `VirtualMachineExtensionProperties.ProtectedSettingsFromKeyVault` has been changed from `interface{}` to `*KeyVaultSecretReference`
+- Field `URI` of struct `GalleryArtifactVersionSource` has been removed
+
+### Features Added
+
+- New const `DiskControllerTypesSCSI`
+- New const `PolicyViolationCategoryImageFlaggedUnsafe`
+- New const `GalleryApplicationCustomActionParameterTypeConfigurationDataBlob`
+- New const `PolicyViolationCategoryIPTheft`
+- New const `PolicyViolationCategoryCopyrightValidation`
+- New const `PolicyViolationCategoryOther`
+- New const `GalleryApplicationCustomActionParameterTypeString`
+- New const `DiskControllerTypesNVMe`
+- New const `GalleryApplicationCustomActionParameterTypeLogOutputBlob`
+- New type alias `DiskControllerTypes`
+- New type alias `PolicyViolationCategory`
+- New type alias `GalleryApplicationCustomActionParameterType`
+- New function `PossiblePolicyViolationCategoryValues() []PolicyViolationCategory`
+- New function `PossibleGalleryApplicationCustomActionParameterTypeValues() []GalleryApplicationCustomActionParameterType`
+- New function `PossibleDiskControllerTypesValues() []DiskControllerTypes`
+- New struct `GalleryApplicationCustomAction`
+- New struct `GalleryApplicationCustomActionParameter`
+- New struct `GalleryApplicationVersionSafetyProfile`
+- New struct `GalleryArtifactSafetyProfileBase`
+- New struct `GalleryArtifactVersionFullSource`
+- New struct `GalleryDiskImageSource`
+- New struct `GalleryImageVersionSafetyProfile`
+- New struct `LatestGalleryImageVersion`
+- New struct `PolicyViolation`
+- New struct `PriorityMixPolicy`
+- New field `DiskControllerType` in struct `VirtualMachineScaleSetUpdateStorageProfile`
+- New field `HardwareProfile` in struct `VirtualMachineScaleSetUpdateVMProfile`
+- New field `CustomActions` in struct `GalleryApplicationProperties`
+- New field `DisableTCPStateTracking` in struct `VirtualMachineScaleSetNetworkConfigurationProperties`
+- New field `DiskControllerType` in struct `StorageProfile`
+- New field `OptimizedForFrequentAttach` in struct `DiskProperties`
+- New field `BurstingEnabledTime` in struct `DiskProperties`
+- New field `DiskControllerTypes` in struct `SupportedCapabilities`
+- New field `DisableTCPStateTracking` in struct `VirtualMachineNetworkInterfaceConfigurationProperties`
+- New field `EnableVMAgentPlatformUpdates` in struct `WindowsConfiguration`
+- New field `PerformancePlus` in struct `CreationData`
+- New field `IncrementalSnapshotFamilyID` in struct `SnapshotProperties`
+- New field `OptimizedForFrequentAttach` in struct `DiskUpdateProperties`
+- New field `DisableTCPStateTracking` in struct `VirtualMachineScaleSetUpdateNetworkConfigurationProperties`
+- New field `ExcludeFromLatest` in struct `TargetRegion`
+- New field `PrivacyStatementURI` in struct `SharedGalleryImageProperties`
+- New field `Eula` in struct `SharedGalleryImageProperties`
+- New field `SafetyProfile` in struct `GalleryApplicationVersionProperties`
+- New field `SafetyProfile` in struct `GalleryImageVersionProperties`
+- New field `EnableVMAgentPlatformUpdates` in struct `LinuxConfiguration`
+- New field `CurrentCapacity` in struct `CapacityReservationUtilization`
+- New field `PriorityMixPolicy` in struct `VirtualMachineScaleSetProperties`
+- New field `CustomActions` in struct `GalleryApplicationVersionPublishingProfile`
+- New field `PlatformFaultDomainCount` in struct `CapacityReservationProperties`
+- New field `DiskControllerType` in struct `VirtualMachineScaleSetStorageProfile`
+
+
+## 3.0.1 (2022-07-29)
+### Other Changes
+- Fix wrong module import for live test
+
+## 3.0.0 (2022-06-24)
+### Breaking Changes
+
+- Function `*CloudServicesClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, *CloudServicesClientBeginCreateOrUpdateOptions)` to `(context.Context, string, string, CloudService, *CloudServicesClientBeginCreateOrUpdateOptions)`
+- Function `*CloudServicesClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, *CloudServicesClientBeginUpdateOptions)` to `(context.Context, string, string, CloudServiceUpdate, *CloudServicesClientBeginUpdateOptions)`
+- Function `*CloudServicesUpdateDomainClient.BeginWalkUpdateDomain` parameter(s) have been changed from `(context.Context, string, string, int32, *CloudServicesUpdateDomainClientBeginWalkUpdateDomainOptions)` to `(context.Context, string, string, int32, UpdateDomain, *CloudServicesUpdateDomainClientBeginWalkUpdateDomainOptions)`
+- Type of `CloudServiceExtensionProperties.Settings` has been changed from `*string` to `interface{}`
+- Type of `CloudServiceExtensionProperties.ProtectedSettings` has been changed from `*string` to `interface{}`
+- Field `Parameters` of struct `CloudServicesClientBeginUpdateOptions` has been removed
+- Field `Parameters` of struct `CloudServicesClientBeginCreateOrUpdateOptions` has been removed
+- Field `Parameters` of struct `CloudServicesUpdateDomainClientBeginWalkUpdateDomainOptions` has been removed
+
+### Features Added
+
+- New const `CloudServiceSlotTypeProduction`
+- New const `CloudServiceSlotTypeStaging`
+- New function `*VirtualMachineImagesClient.ListByEdgeZone(context.Context, string, string, *VirtualMachineImagesClientListByEdgeZoneOptions) (VirtualMachineImagesClientListByEdgeZoneResponse, error)`
+- New function `PossibleCloudServiceSlotTypeValues() []CloudServiceSlotType`
+- New struct `SystemData`
+- New struct `VMImagesInEdgeZoneListResult`
+- New struct `VirtualMachineImagesClientListByEdgeZoneOptions`
+- New struct `VirtualMachineImagesClientListByEdgeZoneResponse`
+- New field `SystemData` in struct `CloudService`
+- New field `SlotType` in struct `CloudServiceNetworkProfile`
+
+
+## 2.0.0 (2022-06-02)
+### Breaking Changes
+
+- Type of `GalleryProperties.ProvisioningState` has been changed from `*GalleryPropertiesProvisioningState` to `*GalleryProvisioningState`
+- Type of `GalleryImageVersionProperties.ProvisioningState` has been changed from `*GalleryImageVersionPropertiesProvisioningState` to `*GalleryProvisioningState`
+- Type of `GalleryImageProperties.ProvisioningState` has been changed from `*GalleryImagePropertiesProvisioningState` to `*GalleryProvisioningState`
+- Type of `GalleryApplicationVersionProperties.ProvisioningState` has been changed from `*GalleryApplicationVersionPropertiesProvisioningState` to `*GalleryProvisioningState`
+- Type of `VirtualMachineScaleSetIdentity.UserAssignedIdentities` has been changed from `map[string]*VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue` to `map[string]*UserAssignedIdentitiesValue`
+- Const `GalleryImagePropertiesProvisioningStateFailed` has been removed
+- Const `GalleryImagePropertiesProvisioningStateMigrating` has been removed
+- Const `GalleryImageVersionPropertiesProvisioningStateCreating` has been removed
+- Const `GalleryImageVersionPropertiesProvisioningStateMigrating` has been removed
+- Const `GalleryApplicationVersionPropertiesProvisioningStateFailed` has been removed
+- Const `GalleryPropertiesProvisioningStateMigrating` has been removed
+- Const `GalleryApplicationVersionPropertiesProvisioningStateDeleting` has been removed
+- Const `GalleryPropertiesProvisioningStateDeleting` has been removed
+- Const `GalleryApplicationVersionPropertiesProvisioningStateCreating` has been removed
+- Const `GalleryImageVersionPropertiesProvisioningStateSucceeded` has been removed
+- Const `GalleryImagePropertiesProvisioningStateCreating` has been removed
+- Const `GalleryImagePropertiesProvisioningStateUpdating` has been removed
+- Const `GalleryImageVersionPropertiesProvisioningStateDeleting` has been removed
+- Const `GalleryPropertiesProvisioningStateFailed` has been removed
+- Const `SharingProfileGroupTypesCommunity` has been removed
+- Const `GalleryApplicationVersionPropertiesProvisioningStateSucceeded` has been removed
+- Const `GalleryApplicationVersionPropertiesProvisioningStateMigrating` has been removed
+- Const `GalleryPropertiesProvisioningStateUpdating` has been removed
+- Const `GalleryImageVersionPropertiesProvisioningStateFailed` has been removed
+- Const `GalleryImagePropertiesProvisioningStateDeleting` has been removed
+- Const `GalleryImageVersionPropertiesProvisioningStateUpdating` has been removed
+- Const `GalleryPropertiesProvisioningStateCreating` has been removed
+- Const `GalleryApplicationVersionPropertiesProvisioningStateUpdating` has been removed
+- Const `GalleryImagePropertiesProvisioningStateSucceeded` has been removed
+- Const `GalleryPropertiesProvisioningStateSucceeded` has been removed
+- Function `PossibleGalleryPropertiesProvisioningStateValues` has been removed
+- Function `PossibleGalleryImageVersionPropertiesProvisioningStateValues` has been removed
+- Function `PossibleGalleryImagePropertiesProvisioningStateValues` has been removed
+- Function `PossibleGalleryApplicationVersionPropertiesProvisioningStateValues` has been removed
+- Struct `VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue` has been removed
+
+### Features Added
+
+- New const `GallerySharingPermissionTypesCommunity`
+- New const `GalleryProvisioningStateUpdating`
+- New const `SharedGalleryHostCachingReadOnly`
+- New const `SharedGalleryHostCachingNone`
+- New const `GalleryProvisioningStateSucceeded`
+- New const `GalleryProvisioningStateFailed`
+- New const `SharedGalleryHostCachingReadWrite`
+- New const `GalleryProvisioningStateCreating`
+- New const `DiskEncryptionSetIdentityTypeUserAssigned`
+- New const `GalleryProvisioningStateMigrating`
+- New const `DiskEncryptionSetIdentityTypeSystemAssignedUserAssigned`
+- New const `CopyCompletionErrorReasonCopySourceNotFound`
+- New const `GalleryProvisioningStateDeleting`
+- New const `DiskStorageAccountTypesPremiumV2LRS`
+- New function `PossibleCopyCompletionErrorReasonValues() []CopyCompletionErrorReason`
+- New function `PossibleSharedGalleryHostCachingValues() []SharedGalleryHostCaching`
+- New function `PossibleGalleryProvisioningStateValues() []GalleryProvisioningState`
+- New function `EncryptionSetIdentity.MarshalJSON() ([]byte, error)`
+- New function `*CommunityGalleryImagesClient.NewListPager(string, string, *CommunityGalleryImagesClientListOptions) *runtime.Pager[CommunityGalleryImagesClientListResponse]`
+- New function `*CommunityGalleryImageVersionsClient.NewListPager(string, string, string, *CommunityGalleryImageVersionsClientListOptions) *runtime.Pager[CommunityGalleryImageVersionsClientListResponse]`
+- New struct `CommunityGalleryImageList`
+- New struct `CommunityGalleryImageVersionList`
+- New struct `CommunityGalleryImageVersionsClientListOptions`
+- New struct `CommunityGalleryImageVersionsClientListResponse`
+- New struct `CommunityGalleryImagesClientListOptions`
+- New struct `CommunityGalleryImagesClientListResponse`
+- New struct `CopyCompletionError`
+- New struct `SharedGalleryDataDiskImage`
+- New struct `SharedGalleryDiskImage`
+- New struct `SharedGalleryImageVersionStorageProfile`
+- New struct `SharedGalleryOSDiskImage`
+- New struct `UserArtifactSettings`
+- New field `SharedGalleryImageID` in struct `ImageDiskReference`
+- New field `CommunityGalleryImageID` in struct `ImageDiskReference`
+- New field `AdvancedSettings` in struct `GalleryApplicationVersionPublishingProfile`
+- New field `Settings` in struct `GalleryApplicationVersionPublishingProfile`
+- New field `CopyCompletionError` in struct `SnapshotProperties`
+- New field `ExcludeFromLatest` in struct `SharedGalleryImageVersionProperties`
+- New field `StorageProfile` in struct `SharedGalleryImageVersionProperties`
+- New field `ExcludeFromLatest` in struct `CommunityGalleryImageVersionProperties`
+- New field `StorageProfile` in struct `CommunityGalleryImageVersionProperties`
+- New field `Architecture` in struct `SharedGalleryImageProperties`
+- New field `UserAssignedIdentities` in struct `EncryptionSetIdentity`
+- New field `Eula` in struct `CommunityGalleryImageProperties`
+- New field `PrivacyStatementURI` in struct `CommunityGalleryImageProperties`
+- New field `Architecture` in struct `CommunityGalleryImageProperties`
+- New field `FederatedClientID` in struct `DiskEncryptionSetUpdateProperties`
+- New field `FederatedClientID` in struct `EncryptionSetProperties`
+- New field `SecurityProfile` in struct `DiskRestorePointProperties`
+
+
+## 1.0.0 (2022-05-16)
+
+The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute` is using our [next generation design principles](https://azure.github.io/azure-sdk/general_introduction.html) since version 1.0.0, which contains breaking changes.
+
+To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration).
+
+To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt).
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/LICENSE.txt
new file mode 100644
index 000000000..dc0c2ffb3
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/LICENSE.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) Microsoft Corporation. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/README.md
new file mode 100644
index 000000000..b508c67ff
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/README.md
@@ -0,0 +1,113 @@
+# Azure Compute Module for Go
+
+[![PkgGoDev](https://pkg.go.dev/badge/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6)](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6)
+
+The `armcompute` module provides operations for working with Azure Compute.
+
+[Source code](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/resourcemanager/compute/armcompute)
+
+# Getting started
+
+## Prerequisites
+
+- an [Azure subscription](https://azure.microsoft.com/free/)
+- Go 1.18 or above (You could download and install the latest version of Go from [here](https://go.dev/doc/install). It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this [doc](https://go.dev/doc/manage-install).)
+
+## Install the package
+
+This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for versioning and dependency management.
+
+Install the Azure Compute module:
+
+```sh
+go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6
+```
+
+## Authorization
+
+When creating a client, you will need to provide a credential for authenticating with Azure Compute. The `azidentity` module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.
+
+```go
+cred, err := azidentity.NewDefaultAzureCredential(nil)
+```
+
+For more information on authentication, please see the documentation for `azidentity` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity).
+
+## Client Factory
+
+Azure Compute module consists of one or more clients. We provide a client factory which could be used to create any client in this module.
+
+```go
+clientFactory, err := armcompute.NewClientFactory(, cred, nil)
+```
+
+You can use `ClientOptions` in package `github.com/Azure/azure-sdk-for-go/sdk/azcore/arm` to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for `azcore` at [pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore).
+
+```go
+options := arm.ClientOptions {
+ ClientOptions: azcore.ClientOptions {
+ Cloud: cloud.AzureChina,
+ },
+}
+clientFactory, err := armcompute.NewClientFactory(, cred, &options)
+```
+
+## Clients
+
+A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.
+
+```go
+client := clientFactory.NewAvailabilitySetsClient()
+```
+
+## Fakes
+
+The fake package contains types used for constructing in-memory fake servers used in unit tests.
+This allows writing tests to cover various success/error conditions without the need for connecting to a live service.
+
+Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.
+
+## More sample code
+
+- [Availability Set](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/compute/availabilityset)
+- [Creating a Fake](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/resourcemanager/compute/armcompute/fake_example_test.go)
+- [Virtual Machine](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/compute/create_vm)
+- [Dedicated Host](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/compute/dedicated_host)
+- [Disk](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/compute/disk)
+- [Gallery](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/compute/gallery)
+- [Proximity Placement Group](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/compute/proximity)
+- [Snapshot](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/compute/snapshot)
+- [Virtual Machine Scale Set](https://aka.ms/azsdk/go/mgmt/samples?path=sdk/resourcemanager/compute/vmscaleset)
+
+## Major Version Upgrade
+
+Go uses [semantic import versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) to ensure a good backward compatibility for modules. For Azure Go management SDK, we usually upgrade module version according to cooresponding service's API version. Regarding it could be a complicated experience for major version upgrade, we will try our best to keep the SDK API stable and release new version in backward compatible way. However, if any unavoidable breaking changes and a new major version releases for SDK modules, you could use these commands under your module folder to upgrade:
+
+```sh
+go install github.com/icholy/gomajor@latest
+gomajor get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute@latest
+```
+
+## Provide Feedback
+
+If you encounter bugs or have suggestions, please
+[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Compute` label.
+
+# Contributing
+
+This project welcomes contributions and suggestions. Most contributions require
+you to agree to a Contributor License Agreement (CLA) declaring that you have
+the right to, and actually do, grant us the rights to use your contribution.
+For details, visit [https://cla.microsoft.com](https://cla.microsoft.com).
+
+When you submit a pull request, a CLA-bot will automatically determine whether
+you need to provide a CLA and decorate the PR appropriately (e.g., label,
+comment). Simply follow the instructions provided by the bot. You will only
+need to do this once across all repos using our CLA.
+
+This project has adopted the
+[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
+For more information, see the
+[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
+or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any
+additional questions or comments.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/assets.json
new file mode 100644
index 000000000..15df49eb4
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/assets.json
@@ -0,0 +1,6 @@
+{
+ "AssetsRepo": "Azure/azure-sdk-assets",
+ "AssetsRepoPrefixPath": "go",
+ "TagPrefix": "go/resourcemanager/compute/armcompute",
+ "Tag": "go/resourcemanager/compute/armcompute_a040b901e1"
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/autorest.md
new file mode 100644
index 000000000..07c325d84
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/autorest.md
@@ -0,0 +1,13 @@
+### AutoRest Configuration
+
+> see https://aka.ms/autorest
+
+``` yaml
+azure-arm: true
+require:
+- https://github.com/Azure/azure-rest-api-specs/blob/81a4ee5a83ae38620c0e1404793caffe005d26e4/specification/compute/resource-manager/readme.md
+- https://github.com/Azure/azure-rest-api-specs/blob/81a4ee5a83ae38620c0e1404793caffe005d26e4/specification/compute/resource-manager/readme.go.md
+license-header: MICROSOFT_MIT_NO_VERSION
+module-version: 6.0.0
+tag: package-2024-03-01
+```
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/availabilitysets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/availabilitysets_client.go
new file mode 100644
index 000000000..b9b8536f8
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/availabilitysets_client.go
@@ -0,0 +1,485 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// AvailabilitySetsClient contains the methods for the AvailabilitySets group.
+// Don't use this type directly, use NewAvailabilitySetsClient() instead.
+type AvailabilitySetsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewAvailabilitySetsClient creates a new instance of AvailabilitySetsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewAvailabilitySetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailabilitySetsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &AvailabilitySetsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// CreateOrUpdate - Create or update an availability set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - availabilitySetName - The name of the availability set.
+// - parameters - Parameters supplied to the Create Availability Set operation.
+// - options - AvailabilitySetsClientCreateOrUpdateOptions contains the optional parameters for the AvailabilitySetsClient.CreateOrUpdate
+// method.
+func (client *AvailabilitySetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySet, options *AvailabilitySetsClientCreateOrUpdateOptions) (AvailabilitySetsClientCreateOrUpdateResponse, error) {
+ var err error
+ const operationName = "AvailabilitySetsClient.CreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, availabilitySetName, parameters, options)
+ if err != nil {
+ return AvailabilitySetsClientCreateOrUpdateResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return AvailabilitySetsClientCreateOrUpdateResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return AvailabilitySetsClientCreateOrUpdateResponse{}, err
+ }
+ resp, err := client.createOrUpdateHandleResponse(httpResp)
+ return resp, err
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *AvailabilitySetsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySet, options *AvailabilitySetsClientCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if availabilitySetName == "" {
+ return nil, errors.New("parameter availabilitySetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{availabilitySetName}", url.PathEscape(availabilitySetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// createOrUpdateHandleResponse handles the CreateOrUpdate response.
+func (client *AvailabilitySetsClient) createOrUpdateHandleResponse(resp *http.Response) (AvailabilitySetsClientCreateOrUpdateResponse, error) {
+ result := AvailabilitySetsClientCreateOrUpdateResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.AvailabilitySet); err != nil {
+ return AvailabilitySetsClientCreateOrUpdateResponse{}, err
+ }
+ return result, nil
+}
+
+// Delete - Delete an availability set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - availabilitySetName - The name of the availability set.
+// - options - AvailabilitySetsClientDeleteOptions contains the optional parameters for the AvailabilitySetsClient.Delete method.
+func (client *AvailabilitySetsClient) Delete(ctx context.Context, resourceGroupName string, availabilitySetName string, options *AvailabilitySetsClientDeleteOptions) (AvailabilitySetsClientDeleteResponse, error) {
+ var err error
+ const operationName = "AvailabilitySetsClient.Delete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, availabilitySetName, options)
+ if err != nil {
+ return AvailabilitySetsClientDeleteResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return AvailabilitySetsClientDeleteResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return AvailabilitySetsClientDeleteResponse{}, err
+ }
+ return AvailabilitySetsClientDeleteResponse{}, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *AvailabilitySetsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, availabilitySetName string, options *AvailabilitySetsClientDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if availabilitySetName == "" {
+ return nil, errors.New("parameter availabilitySetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{availabilitySetName}", url.PathEscape(availabilitySetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Retrieves information about an availability set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - availabilitySetName - The name of the availability set.
+// - options - AvailabilitySetsClientGetOptions contains the optional parameters for the AvailabilitySetsClient.Get method.
+func (client *AvailabilitySetsClient) Get(ctx context.Context, resourceGroupName string, availabilitySetName string, options *AvailabilitySetsClientGetOptions) (AvailabilitySetsClientGetResponse, error) {
+ var err error
+ const operationName = "AvailabilitySetsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, availabilitySetName, options)
+ if err != nil {
+ return AvailabilitySetsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return AvailabilitySetsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return AvailabilitySetsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *AvailabilitySetsClient) getCreateRequest(ctx context.Context, resourceGroupName string, availabilitySetName string, options *AvailabilitySetsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if availabilitySetName == "" {
+ return nil, errors.New("parameter availabilitySetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{availabilitySetName}", url.PathEscape(availabilitySetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *AvailabilitySetsClient) getHandleResponse(resp *http.Response) (AvailabilitySetsClientGetResponse, error) {
+ result := AvailabilitySetsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.AvailabilitySet); err != nil {
+ return AvailabilitySetsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - Lists all availability sets in a resource group.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - options - AvailabilitySetsClientListOptions contains the optional parameters for the AvailabilitySetsClient.NewListPager
+// method.
+func (client *AvailabilitySetsClient) NewListPager(resourceGroupName string, options *AvailabilitySetsClientListOptions) *runtime.Pager[AvailabilitySetsClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[AvailabilitySetsClientListResponse]{
+ More: func(page AvailabilitySetsClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *AvailabilitySetsClientListResponse) (AvailabilitySetsClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailabilitySetsClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return AvailabilitySetsClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *AvailabilitySetsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *AvailabilitySetsClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *AvailabilitySetsClient) listHandleResponse(resp *http.Response) (AvailabilitySetsClientListResponse, error) {
+ result := AvailabilitySetsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.AvailabilitySetListResult); err != nil {
+ return AvailabilitySetsClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListAvailableSizesPager - Lists all available virtual machine sizes that can be used to create a new virtual machine
+// in an existing availability set.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - availabilitySetName - The name of the availability set.
+// - options - AvailabilitySetsClientListAvailableSizesOptions contains the optional parameters for the AvailabilitySetsClient.NewListAvailableSizesPager
+// method.
+func (client *AvailabilitySetsClient) NewListAvailableSizesPager(resourceGroupName string, availabilitySetName string, options *AvailabilitySetsClientListAvailableSizesOptions) *runtime.Pager[AvailabilitySetsClientListAvailableSizesResponse] {
+ return runtime.NewPager(runtime.PagingHandler[AvailabilitySetsClientListAvailableSizesResponse]{
+ More: func(page AvailabilitySetsClientListAvailableSizesResponse) bool {
+ return false
+ },
+ Fetcher: func(ctx context.Context, page *AvailabilitySetsClientListAvailableSizesResponse) (AvailabilitySetsClientListAvailableSizesResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailabilitySetsClient.NewListAvailableSizesPager")
+ req, err := client.listAvailableSizesCreateRequest(ctx, resourceGroupName, availabilitySetName, options)
+ if err != nil {
+ return AvailabilitySetsClientListAvailableSizesResponse{}, err
+ }
+ resp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return AvailabilitySetsClientListAvailableSizesResponse{}, err
+ }
+ if !runtime.HasStatusCode(resp, http.StatusOK) {
+ return AvailabilitySetsClientListAvailableSizesResponse{}, runtime.NewResponseError(resp)
+ }
+ return client.listAvailableSizesHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listAvailableSizesCreateRequest creates the ListAvailableSizes request.
+func (client *AvailabilitySetsClient) listAvailableSizesCreateRequest(ctx context.Context, resourceGroupName string, availabilitySetName string, options *AvailabilitySetsClientListAvailableSizesOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if availabilitySetName == "" {
+ return nil, errors.New("parameter availabilitySetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{availabilitySetName}", url.PathEscape(availabilitySetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listAvailableSizesHandleResponse handles the ListAvailableSizes response.
+func (client *AvailabilitySetsClient) listAvailableSizesHandleResponse(resp *http.Response) (AvailabilitySetsClientListAvailableSizesResponse, error) {
+ result := AvailabilitySetsClientListAvailableSizesResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineSizeListResult); err != nil {
+ return AvailabilitySetsClientListAvailableSizesResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListBySubscriptionPager - Lists all availability sets in a subscription.
+//
+// Generated from API version 2024-03-01
+// - options - AvailabilitySetsClientListBySubscriptionOptions contains the optional parameters for the AvailabilitySetsClient.NewListBySubscriptionPager
+// method.
+func (client *AvailabilitySetsClient) NewListBySubscriptionPager(options *AvailabilitySetsClientListBySubscriptionOptions) *runtime.Pager[AvailabilitySetsClientListBySubscriptionResponse] {
+ return runtime.NewPager(runtime.PagingHandler[AvailabilitySetsClientListBySubscriptionResponse]{
+ More: func(page AvailabilitySetsClientListBySubscriptionResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *AvailabilitySetsClientListBySubscriptionResponse) (AvailabilitySetsClientListBySubscriptionResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AvailabilitySetsClient.NewListBySubscriptionPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listBySubscriptionCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return AvailabilitySetsClientListBySubscriptionResponse{}, err
+ }
+ return client.listBySubscriptionHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listBySubscriptionCreateRequest creates the ListBySubscription request.
+func (client *AvailabilitySetsClient) listBySubscriptionCreateRequest(ctx context.Context, options *AvailabilitySetsClientListBySubscriptionOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", *options.Expand)
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listBySubscriptionHandleResponse handles the ListBySubscription response.
+func (client *AvailabilitySetsClient) listBySubscriptionHandleResponse(resp *http.Response) (AvailabilitySetsClientListBySubscriptionResponse, error) {
+ result := AvailabilitySetsClientListBySubscriptionResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.AvailabilitySetListResult); err != nil {
+ return AvailabilitySetsClientListBySubscriptionResponse{}, err
+ }
+ return result, nil
+}
+
+// Update - Update an availability set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - availabilitySetName - The name of the availability set.
+// - parameters - Parameters supplied to the Update Availability Set operation.
+// - options - AvailabilitySetsClientUpdateOptions contains the optional parameters for the AvailabilitySetsClient.Update method.
+func (client *AvailabilitySetsClient) Update(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySetUpdate, options *AvailabilitySetsClientUpdateOptions) (AvailabilitySetsClientUpdateResponse, error) {
+ var err error
+ const operationName = "AvailabilitySetsClient.Update"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, availabilitySetName, parameters, options)
+ if err != nil {
+ return AvailabilitySetsClientUpdateResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return AvailabilitySetsClientUpdateResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return AvailabilitySetsClientUpdateResponse{}, err
+ }
+ resp, err := client.updateHandleResponse(httpResp)
+ return resp, err
+}
+
+// updateCreateRequest creates the Update request.
+func (client *AvailabilitySetsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySetUpdate, options *AvailabilitySetsClientUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if availabilitySetName == "" {
+ return nil, errors.New("parameter availabilitySetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{availabilitySetName}", url.PathEscape(availabilitySetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// updateHandleResponse handles the Update response.
+func (client *AvailabilitySetsClient) updateHandleResponse(resp *http.Response) (AvailabilitySetsClientUpdateResponse, error) {
+ result := AvailabilitySetsClientUpdateResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.AvailabilitySet); err != nil {
+ return AvailabilitySetsClientUpdateResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/build.go
new file mode 100644
index 000000000..f88d006f4
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/build.go
@@ -0,0 +1,7 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+
+// This file enables 'go generate' to regenerate this specific SDK
+//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate -alwaysSetBodyParamRequired resourcemanager/compute/armcompute
+
+package armcompute
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/capacityreservationgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/capacityreservationgroups_client.go
new file mode 100644
index 000000000..51a410658
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/capacityreservationgroups_client.go
@@ -0,0 +1,437 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// CapacityReservationGroupsClient contains the methods for the CapacityReservationGroups group.
+// Don't use this type directly, use NewCapacityReservationGroupsClient() instead.
+type CapacityReservationGroupsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewCapacityReservationGroupsClient creates a new instance of CapacityReservationGroupsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewCapacityReservationGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CapacityReservationGroupsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &CapacityReservationGroupsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// CreateOrUpdate - The operation to create or update a capacity reservation group. When updating a capacity reservation group,
+// only tags and sharing profile may be modified. Please refer to
+// https://aka.ms/CapacityReservation for more details.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - capacityReservationGroupName - The name of the capacity reservation group.
+// - parameters - Parameters supplied to the Create capacity reservation Group.
+// - options - CapacityReservationGroupsClientCreateOrUpdateOptions contains the optional parameters for the CapacityReservationGroupsClient.CreateOrUpdate
+// method.
+func (client *CapacityReservationGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroup, options *CapacityReservationGroupsClientCreateOrUpdateOptions) (CapacityReservationGroupsClientCreateOrUpdateResponse, error) {
+ var err error
+ const operationName = "CapacityReservationGroupsClient.CreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, capacityReservationGroupName, parameters, options)
+ if err != nil {
+ return CapacityReservationGroupsClientCreateOrUpdateResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CapacityReservationGroupsClientCreateOrUpdateResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return CapacityReservationGroupsClientCreateOrUpdateResponse{}, err
+ }
+ resp, err := client.createOrUpdateHandleResponse(httpResp)
+ return resp, err
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *CapacityReservationGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroup, options *CapacityReservationGroupsClientCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if capacityReservationGroupName == "" {
+ return nil, errors.New("parameter capacityReservationGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{capacityReservationGroupName}", url.PathEscape(capacityReservationGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// createOrUpdateHandleResponse handles the CreateOrUpdate response.
+func (client *CapacityReservationGroupsClient) createOrUpdateHandleResponse(resp *http.Response) (CapacityReservationGroupsClientCreateOrUpdateResponse, error) {
+ result := CapacityReservationGroupsClientCreateOrUpdateResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CapacityReservationGroup); err != nil {
+ return CapacityReservationGroupsClientCreateOrUpdateResponse{}, err
+ }
+ return result, nil
+}
+
+// Delete - The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources
+// are disassociated from the reservation group and all capacity reservations under
+// the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - capacityReservationGroupName - The name of the capacity reservation group.
+// - options - CapacityReservationGroupsClientDeleteOptions contains the optional parameters for the CapacityReservationGroupsClient.Delete
+// method.
+func (client *CapacityReservationGroupsClient) Delete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, options *CapacityReservationGroupsClientDeleteOptions) (CapacityReservationGroupsClientDeleteResponse, error) {
+ var err error
+ const operationName = "CapacityReservationGroupsClient.Delete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, capacityReservationGroupName, options)
+ if err != nil {
+ return CapacityReservationGroupsClientDeleteResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CapacityReservationGroupsClientDeleteResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return CapacityReservationGroupsClientDeleteResponse{}, err
+ }
+ return CapacityReservationGroupsClientDeleteResponse{}, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *CapacityReservationGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, options *CapacityReservationGroupsClientDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if capacityReservationGroupName == "" {
+ return nil, errors.New("parameter capacityReservationGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{capacityReservationGroupName}", url.PathEscape(capacityReservationGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - The operation that retrieves information about a capacity reservation group.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - capacityReservationGroupName - The name of the capacity reservation group.
+// - options - CapacityReservationGroupsClientGetOptions contains the optional parameters for the CapacityReservationGroupsClient.Get
+// method.
+func (client *CapacityReservationGroupsClient) Get(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, options *CapacityReservationGroupsClientGetOptions) (CapacityReservationGroupsClientGetResponse, error) {
+ var err error
+ const operationName = "CapacityReservationGroupsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, capacityReservationGroupName, options)
+ if err != nil {
+ return CapacityReservationGroupsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CapacityReservationGroupsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CapacityReservationGroupsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *CapacityReservationGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, options *CapacityReservationGroupsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if capacityReservationGroupName == "" {
+ return nil, errors.New("parameter capacityReservationGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{capacityReservationGroupName}", url.PathEscape(capacityReservationGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *CapacityReservationGroupsClient) getHandleResponse(resp *http.Response) (CapacityReservationGroupsClientGetResponse, error) {
+ result := CapacityReservationGroupsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CapacityReservationGroup); err != nil {
+ return CapacityReservationGroupsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByResourceGroupPager - Lists all of the capacity reservation groups in the specified resource group. Use the nextLink
+// property in the response to get the next page of capacity reservation groups.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - options - CapacityReservationGroupsClientListByResourceGroupOptions contains the optional parameters for the CapacityReservationGroupsClient.NewListByResourceGroupPager
+// method.
+func (client *CapacityReservationGroupsClient) NewListByResourceGroupPager(resourceGroupName string, options *CapacityReservationGroupsClientListByResourceGroupOptions) *runtime.Pager[CapacityReservationGroupsClientListByResourceGroupResponse] {
+ return runtime.NewPager(runtime.PagingHandler[CapacityReservationGroupsClientListByResourceGroupResponse]{
+ More: func(page CapacityReservationGroupsClientListByResourceGroupResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *CapacityReservationGroupsClientListByResourceGroupResponse) (CapacityReservationGroupsClientListByResourceGroupResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CapacityReservationGroupsClient.NewListByResourceGroupPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return CapacityReservationGroupsClientListByResourceGroupResponse{}, err
+ }
+ return client.listByResourceGroupHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByResourceGroupCreateRequest creates the ListByResourceGroup request.
+func (client *CapacityReservationGroupsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *CapacityReservationGroupsClientListByResourceGroupOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByResourceGroupHandleResponse handles the ListByResourceGroup response.
+func (client *CapacityReservationGroupsClient) listByResourceGroupHandleResponse(resp *http.Response) (CapacityReservationGroupsClientListByResourceGroupResponse, error) {
+ result := CapacityReservationGroupsClientListByResourceGroupResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CapacityReservationGroupListResult); err != nil {
+ return CapacityReservationGroupsClientListByResourceGroupResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListBySubscriptionPager - Lists all of the capacity reservation groups in the subscription. Use the nextLink property
+// in the response to get the next page of capacity reservation groups.
+//
+// Generated from API version 2024-03-01
+// - options - CapacityReservationGroupsClientListBySubscriptionOptions contains the optional parameters for the CapacityReservationGroupsClient.NewListBySubscriptionPager
+// method.
+func (client *CapacityReservationGroupsClient) NewListBySubscriptionPager(options *CapacityReservationGroupsClientListBySubscriptionOptions) *runtime.Pager[CapacityReservationGroupsClientListBySubscriptionResponse] {
+ return runtime.NewPager(runtime.PagingHandler[CapacityReservationGroupsClientListBySubscriptionResponse]{
+ More: func(page CapacityReservationGroupsClientListBySubscriptionResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *CapacityReservationGroupsClientListBySubscriptionResponse) (CapacityReservationGroupsClientListBySubscriptionResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CapacityReservationGroupsClient.NewListBySubscriptionPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listBySubscriptionCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return CapacityReservationGroupsClientListBySubscriptionResponse{}, err
+ }
+ return client.listBySubscriptionHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listBySubscriptionCreateRequest creates the ListBySubscription request.
+func (client *CapacityReservationGroupsClient) listBySubscriptionCreateRequest(ctx context.Context, options *CapacityReservationGroupsClientListBySubscriptionOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/capacityReservationGroups"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.ResourceIDsOnly != nil {
+ reqQP.Set("resourceIdsOnly", string(*options.ResourceIDsOnly))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listBySubscriptionHandleResponse handles the ListBySubscription response.
+func (client *CapacityReservationGroupsClient) listBySubscriptionHandleResponse(resp *http.Response) (CapacityReservationGroupsClientListBySubscriptionResponse, error) {
+ result := CapacityReservationGroupsClientListBySubscriptionResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CapacityReservationGroupListResult); err != nil {
+ return CapacityReservationGroupsClientListBySubscriptionResponse{}, err
+ }
+ return result, nil
+}
+
+// Update - The operation to update a capacity reservation group. When updating a capacity reservation group, only tags and
+// sharing profile may be modified.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - capacityReservationGroupName - The name of the capacity reservation group.
+// - parameters - Parameters supplied to the Update capacity reservation Group operation.
+// - options - CapacityReservationGroupsClientUpdateOptions contains the optional parameters for the CapacityReservationGroupsClient.Update
+// method.
+func (client *CapacityReservationGroupsClient) Update(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroupUpdate, options *CapacityReservationGroupsClientUpdateOptions) (CapacityReservationGroupsClientUpdateResponse, error) {
+ var err error
+ const operationName = "CapacityReservationGroupsClient.Update"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, capacityReservationGroupName, parameters, options)
+ if err != nil {
+ return CapacityReservationGroupsClientUpdateResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CapacityReservationGroupsClientUpdateResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CapacityReservationGroupsClientUpdateResponse{}, err
+ }
+ resp, err := client.updateHandleResponse(httpResp)
+ return resp, err
+}
+
+// updateCreateRequest creates the Update request.
+func (client *CapacityReservationGroupsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroupUpdate, options *CapacityReservationGroupsClientUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if capacityReservationGroupName == "" {
+ return nil, errors.New("parameter capacityReservationGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{capacityReservationGroupName}", url.PathEscape(capacityReservationGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// updateHandleResponse handles the Update response.
+func (client *CapacityReservationGroupsClient) updateHandleResponse(resp *http.Response) (CapacityReservationGroupsClientUpdateResponse, error) {
+ result := CapacityReservationGroupsClientUpdateResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CapacityReservationGroup); err != nil {
+ return CapacityReservationGroupsClientUpdateResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/capacityreservations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/capacityreservations_client.go
new file mode 100644
index 000000000..aaf86c3a2
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/capacityreservations_client.go
@@ -0,0 +1,443 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// CapacityReservationsClient contains the methods for the CapacityReservations group.
+// Don't use this type directly, use NewCapacityReservationsClient() instead.
+type CapacityReservationsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewCapacityReservationsClient creates a new instance of CapacityReservationsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewCapacityReservationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CapacityReservationsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &CapacityReservationsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - The operation to create or update a capacity reservation. Please note some properties can be set
+// only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more
+// details.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - capacityReservationGroupName - The name of the capacity reservation group.
+// - capacityReservationName - The name of the capacity reservation.
+// - parameters - Parameters supplied to the Create capacity reservation.
+// - options - CapacityReservationsClientBeginCreateOrUpdateOptions contains the optional parameters for the CapacityReservationsClient.BeginCreateOrUpdate
+// method.
+func (client *CapacityReservationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservation, options *CapacityReservationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CapacityReservationsClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CapacityReservationsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CapacityReservationsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - The operation to create or update a capacity reservation. Please note some properties can be set only
+// during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more
+// details.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *CapacityReservationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservation, options *CapacityReservationsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CapacityReservationsClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *CapacityReservationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservation, options *CapacityReservationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if capacityReservationGroupName == "" {
+ return nil, errors.New("parameter capacityReservationGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{capacityReservationGroupName}", url.PathEscape(capacityReservationGroupName))
+ if capacityReservationName == "" {
+ return nil, errors.New("parameter capacityReservationName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{capacityReservationName}", url.PathEscape(capacityReservationName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - The operation to delete a capacity reservation. This operation is allowed only when all the associated resources
+// are disassociated from the capacity reservation. Please refer to
+// https://aka.ms/CapacityReservation for more details.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - capacityReservationGroupName - The name of the capacity reservation group.
+// - capacityReservationName - The name of the capacity reservation.
+// - options - CapacityReservationsClientBeginDeleteOptions contains the optional parameters for the CapacityReservationsClient.BeginDelete
+// method.
+func (client *CapacityReservationsClient) BeginDelete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, options *CapacityReservationsClientBeginDeleteOptions) (*runtime.Poller[CapacityReservationsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CapacityReservationsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CapacityReservationsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - The operation to delete a capacity reservation. This operation is allowed only when all the associated resources
+// are disassociated from the capacity reservation. Please refer to
+// https://aka.ms/CapacityReservation for more details.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *CapacityReservationsClient) deleteOperation(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, options *CapacityReservationsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CapacityReservationsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *CapacityReservationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, options *CapacityReservationsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if capacityReservationGroupName == "" {
+ return nil, errors.New("parameter capacityReservationGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{capacityReservationGroupName}", url.PathEscape(capacityReservationGroupName))
+ if capacityReservationName == "" {
+ return nil, errors.New("parameter capacityReservationName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{capacityReservationName}", url.PathEscape(capacityReservationName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - The operation that retrieves information about the capacity reservation.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - capacityReservationGroupName - The name of the capacity reservation group.
+// - capacityReservationName - The name of the capacity reservation.
+// - options - CapacityReservationsClientGetOptions contains the optional parameters for the CapacityReservationsClient.Get
+// method.
+func (client *CapacityReservationsClient) Get(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, options *CapacityReservationsClientGetOptions) (CapacityReservationsClientGetResponse, error) {
+ var err error
+ const operationName = "CapacityReservationsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, options)
+ if err != nil {
+ return CapacityReservationsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CapacityReservationsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CapacityReservationsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *CapacityReservationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, options *CapacityReservationsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if capacityReservationGroupName == "" {
+ return nil, errors.New("parameter capacityReservationGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{capacityReservationGroupName}", url.PathEscape(capacityReservationGroupName))
+ if capacityReservationName == "" {
+ return nil, errors.New("parameter capacityReservationName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{capacityReservationName}", url.PathEscape(capacityReservationName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *CapacityReservationsClient) getHandleResponse(resp *http.Response) (CapacityReservationsClientGetResponse, error) {
+ result := CapacityReservationsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CapacityReservation); err != nil {
+ return CapacityReservationsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByCapacityReservationGroupPager - Lists all of the capacity reservations in the specified capacity reservation group.
+// Use the nextLink property in the response to get the next page of capacity reservations.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - capacityReservationGroupName - The name of the capacity reservation group.
+// - options - CapacityReservationsClientListByCapacityReservationGroupOptions contains the optional parameters for the CapacityReservationsClient.NewListByCapacityReservationGroupPager
+// method.
+func (client *CapacityReservationsClient) NewListByCapacityReservationGroupPager(resourceGroupName string, capacityReservationGroupName string, options *CapacityReservationsClientListByCapacityReservationGroupOptions) *runtime.Pager[CapacityReservationsClientListByCapacityReservationGroupResponse] {
+ return runtime.NewPager(runtime.PagingHandler[CapacityReservationsClientListByCapacityReservationGroupResponse]{
+ More: func(page CapacityReservationsClientListByCapacityReservationGroupResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *CapacityReservationsClientListByCapacityReservationGroupResponse) (CapacityReservationsClientListByCapacityReservationGroupResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CapacityReservationsClient.NewListByCapacityReservationGroupPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByCapacityReservationGroupCreateRequest(ctx, resourceGroupName, capacityReservationGroupName, options)
+ }, nil)
+ if err != nil {
+ return CapacityReservationsClientListByCapacityReservationGroupResponse{}, err
+ }
+ return client.listByCapacityReservationGroupHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByCapacityReservationGroupCreateRequest creates the ListByCapacityReservationGroup request.
+func (client *CapacityReservationsClient) listByCapacityReservationGroupCreateRequest(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, options *CapacityReservationsClientListByCapacityReservationGroupOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if capacityReservationGroupName == "" {
+ return nil, errors.New("parameter capacityReservationGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{capacityReservationGroupName}", url.PathEscape(capacityReservationGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByCapacityReservationGroupHandleResponse handles the ListByCapacityReservationGroup response.
+func (client *CapacityReservationsClient) listByCapacityReservationGroupHandleResponse(resp *http.Response) (CapacityReservationsClientListByCapacityReservationGroupResponse, error) {
+ result := CapacityReservationsClientListByCapacityReservationGroupResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CapacityReservationListResult); err != nil {
+ return CapacityReservationsClientListByCapacityReservationGroupResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginUpdate - The operation to update a capacity reservation.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - capacityReservationGroupName - The name of the capacity reservation group.
+// - capacityReservationName - The name of the capacity reservation.
+// - parameters - Parameters supplied to the Update capacity reservation operation.
+// - options - CapacityReservationsClientBeginUpdateOptions contains the optional parameters for the CapacityReservationsClient.BeginUpdate
+// method.
+func (client *CapacityReservationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservationUpdate, options *CapacityReservationsClientBeginUpdateOptions) (*runtime.Poller[CapacityReservationsClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CapacityReservationsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CapacityReservationsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - The operation to update a capacity reservation.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *CapacityReservationsClient) update(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservationUpdate, options *CapacityReservationsClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CapacityReservationsClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *CapacityReservationsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservationUpdate, options *CapacityReservationsClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if capacityReservationGroupName == "" {
+ return nil, errors.New("parameter capacityReservationGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{capacityReservationGroupName}", url.PathEscape(capacityReservationGroupName))
+ if capacityReservationName == "" {
+ return nil, errors.New("parameter capacityReservationName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{capacityReservationName}", url.PathEscape(capacityReservationName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/ci.yml b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/ci.yml
new file mode 100644
index 000000000..b805596c7
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/ci.yml
@@ -0,0 +1,30 @@
+# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
+trigger:
+ branches:
+ include:
+ - main
+ - feature/*
+ - hotfix/*
+ - release/*
+ paths:
+ include:
+ - sdk/resourcemanager/compute/armcompute/
+
+pr:
+ branches:
+ include:
+ - main
+ - feature/*
+ - hotfix/*
+ - release/*
+ paths:
+ include:
+ - sdk/resourcemanager/compute/armcompute/
+
+extends:
+ template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml
+ parameters:
+ IncludeRelease: true
+ ServiceDirectory: 'resourcemanager/compute/armcompute'
+ UsePipelineProxy: false
+ UseFederatedAuth: true
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/client_factory.go
new file mode 100644
index 000000000..dab27c87c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/client_factory.go
@@ -0,0 +1,429 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+)
+
+// ClientFactory is a client factory used to create any client in this module.
+// Don't use this type directly, use NewClientFactory instead.
+type ClientFactory struct {
+ subscriptionID string
+ internal *arm.Client
+}
+
+// NewClientFactory creates a new instance of ClientFactory with the specified values.
+// The parameter values will be propagated to any client created from this factory.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) {
+ internal, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ return &ClientFactory{
+ subscriptionID: subscriptionID,
+ internal: internal,
+ }, nil
+}
+
+// NewAvailabilitySetsClient creates a new instance of AvailabilitySetsClient.
+func (c *ClientFactory) NewAvailabilitySetsClient() *AvailabilitySetsClient {
+ return &AvailabilitySetsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewCapacityReservationGroupsClient creates a new instance of CapacityReservationGroupsClient.
+func (c *ClientFactory) NewCapacityReservationGroupsClient() *CapacityReservationGroupsClient {
+ return &CapacityReservationGroupsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewCapacityReservationsClient creates a new instance of CapacityReservationsClient.
+func (c *ClientFactory) NewCapacityReservationsClient() *CapacityReservationsClient {
+ return &CapacityReservationsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewCloudServiceOperatingSystemsClient creates a new instance of CloudServiceOperatingSystemsClient.
+func (c *ClientFactory) NewCloudServiceOperatingSystemsClient() *CloudServiceOperatingSystemsClient {
+ return &CloudServiceOperatingSystemsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewCloudServiceRoleInstancesClient creates a new instance of CloudServiceRoleInstancesClient.
+func (c *ClientFactory) NewCloudServiceRoleInstancesClient() *CloudServiceRoleInstancesClient {
+ return &CloudServiceRoleInstancesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewCloudServiceRolesClient creates a new instance of CloudServiceRolesClient.
+func (c *ClientFactory) NewCloudServiceRolesClient() *CloudServiceRolesClient {
+ return &CloudServiceRolesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewCloudServicesClient creates a new instance of CloudServicesClient.
+func (c *ClientFactory) NewCloudServicesClient() *CloudServicesClient {
+ return &CloudServicesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewCloudServicesUpdateDomainClient creates a new instance of CloudServicesUpdateDomainClient.
+func (c *ClientFactory) NewCloudServicesUpdateDomainClient() *CloudServicesUpdateDomainClient {
+ return &CloudServicesUpdateDomainClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewCommunityGalleriesClient creates a new instance of CommunityGalleriesClient.
+func (c *ClientFactory) NewCommunityGalleriesClient() *CommunityGalleriesClient {
+ return &CommunityGalleriesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewCommunityGalleryImageVersionsClient creates a new instance of CommunityGalleryImageVersionsClient.
+func (c *ClientFactory) NewCommunityGalleryImageVersionsClient() *CommunityGalleryImageVersionsClient {
+ return &CommunityGalleryImageVersionsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewCommunityGalleryImagesClient creates a new instance of CommunityGalleryImagesClient.
+func (c *ClientFactory) NewCommunityGalleryImagesClient() *CommunityGalleryImagesClient {
+ return &CommunityGalleryImagesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewDedicatedHostGroupsClient creates a new instance of DedicatedHostGroupsClient.
+func (c *ClientFactory) NewDedicatedHostGroupsClient() *DedicatedHostGroupsClient {
+ return &DedicatedHostGroupsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewDedicatedHostsClient creates a new instance of DedicatedHostsClient.
+func (c *ClientFactory) NewDedicatedHostsClient() *DedicatedHostsClient {
+ return &DedicatedHostsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewDiskAccessesClient creates a new instance of DiskAccessesClient.
+func (c *ClientFactory) NewDiskAccessesClient() *DiskAccessesClient {
+ return &DiskAccessesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewDiskEncryptionSetsClient creates a new instance of DiskEncryptionSetsClient.
+func (c *ClientFactory) NewDiskEncryptionSetsClient() *DiskEncryptionSetsClient {
+ return &DiskEncryptionSetsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewDiskRestorePointClient creates a new instance of DiskRestorePointClient.
+func (c *ClientFactory) NewDiskRestorePointClient() *DiskRestorePointClient {
+ return &DiskRestorePointClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewDisksClient creates a new instance of DisksClient.
+func (c *ClientFactory) NewDisksClient() *DisksClient {
+ return &DisksClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewGalleriesClient creates a new instance of GalleriesClient.
+func (c *ClientFactory) NewGalleriesClient() *GalleriesClient {
+ return &GalleriesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewGalleryApplicationVersionsClient creates a new instance of GalleryApplicationVersionsClient.
+func (c *ClientFactory) NewGalleryApplicationVersionsClient() *GalleryApplicationVersionsClient {
+ return &GalleryApplicationVersionsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewGalleryApplicationsClient creates a new instance of GalleryApplicationsClient.
+func (c *ClientFactory) NewGalleryApplicationsClient() *GalleryApplicationsClient {
+ return &GalleryApplicationsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewGalleryImageVersionsClient creates a new instance of GalleryImageVersionsClient.
+func (c *ClientFactory) NewGalleryImageVersionsClient() *GalleryImageVersionsClient {
+ return &GalleryImageVersionsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewGalleryImagesClient creates a new instance of GalleryImagesClient.
+func (c *ClientFactory) NewGalleryImagesClient() *GalleryImagesClient {
+ return &GalleryImagesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewGallerySharingProfileClient creates a new instance of GallerySharingProfileClient.
+func (c *ClientFactory) NewGallerySharingProfileClient() *GallerySharingProfileClient {
+ return &GallerySharingProfileClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewImagesClient creates a new instance of ImagesClient.
+func (c *ClientFactory) NewImagesClient() *ImagesClient {
+ return &ImagesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewLogAnalyticsClient creates a new instance of LogAnalyticsClient.
+func (c *ClientFactory) NewLogAnalyticsClient() *LogAnalyticsClient {
+ return &LogAnalyticsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewOperationsClient creates a new instance of OperationsClient.
+func (c *ClientFactory) NewOperationsClient() *OperationsClient {
+ return &OperationsClient{
+ internal: c.internal,
+ }
+}
+
+// NewProximityPlacementGroupsClient creates a new instance of ProximityPlacementGroupsClient.
+func (c *ClientFactory) NewProximityPlacementGroupsClient() *ProximityPlacementGroupsClient {
+ return &ProximityPlacementGroupsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewResourceSKUsClient creates a new instance of ResourceSKUsClient.
+func (c *ClientFactory) NewResourceSKUsClient() *ResourceSKUsClient {
+ return &ResourceSKUsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewRestorePointCollectionsClient creates a new instance of RestorePointCollectionsClient.
+func (c *ClientFactory) NewRestorePointCollectionsClient() *RestorePointCollectionsClient {
+ return &RestorePointCollectionsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewRestorePointsClient creates a new instance of RestorePointsClient.
+func (c *ClientFactory) NewRestorePointsClient() *RestorePointsClient {
+ return &RestorePointsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewSSHPublicKeysClient creates a new instance of SSHPublicKeysClient.
+func (c *ClientFactory) NewSSHPublicKeysClient() *SSHPublicKeysClient {
+ return &SSHPublicKeysClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewSharedGalleriesClient creates a new instance of SharedGalleriesClient.
+func (c *ClientFactory) NewSharedGalleriesClient() *SharedGalleriesClient {
+ return &SharedGalleriesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewSharedGalleryImageVersionsClient creates a new instance of SharedGalleryImageVersionsClient.
+func (c *ClientFactory) NewSharedGalleryImageVersionsClient() *SharedGalleryImageVersionsClient {
+ return &SharedGalleryImageVersionsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewSharedGalleryImagesClient creates a new instance of SharedGalleryImagesClient.
+func (c *ClientFactory) NewSharedGalleryImagesClient() *SharedGalleryImagesClient {
+ return &SharedGalleryImagesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewSnapshotsClient creates a new instance of SnapshotsClient.
+func (c *ClientFactory) NewSnapshotsClient() *SnapshotsClient {
+ return &SnapshotsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewUsageClient creates a new instance of UsageClient.
+func (c *ClientFactory) NewUsageClient() *UsageClient {
+ return &UsageClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewVirtualMachineExtensionImagesClient creates a new instance of VirtualMachineExtensionImagesClient.
+func (c *ClientFactory) NewVirtualMachineExtensionImagesClient() *VirtualMachineExtensionImagesClient {
+ return &VirtualMachineExtensionImagesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewVirtualMachineExtensionsClient creates a new instance of VirtualMachineExtensionsClient.
+func (c *ClientFactory) NewVirtualMachineExtensionsClient() *VirtualMachineExtensionsClient {
+ return &VirtualMachineExtensionsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewVirtualMachineImagesClient creates a new instance of VirtualMachineImagesClient.
+func (c *ClientFactory) NewVirtualMachineImagesClient() *VirtualMachineImagesClient {
+ return &VirtualMachineImagesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewVirtualMachineImagesEdgeZoneClient creates a new instance of VirtualMachineImagesEdgeZoneClient.
+func (c *ClientFactory) NewVirtualMachineImagesEdgeZoneClient() *VirtualMachineImagesEdgeZoneClient {
+ return &VirtualMachineImagesEdgeZoneClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewVirtualMachineRunCommandsClient creates a new instance of VirtualMachineRunCommandsClient.
+func (c *ClientFactory) NewVirtualMachineRunCommandsClient() *VirtualMachineRunCommandsClient {
+ return &VirtualMachineRunCommandsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewVirtualMachineScaleSetExtensionsClient creates a new instance of VirtualMachineScaleSetExtensionsClient.
+func (c *ClientFactory) NewVirtualMachineScaleSetExtensionsClient() *VirtualMachineScaleSetExtensionsClient {
+ return &VirtualMachineScaleSetExtensionsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewVirtualMachineScaleSetRollingUpgradesClient creates a new instance of VirtualMachineScaleSetRollingUpgradesClient.
+func (c *ClientFactory) NewVirtualMachineScaleSetRollingUpgradesClient() *VirtualMachineScaleSetRollingUpgradesClient {
+ return &VirtualMachineScaleSetRollingUpgradesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewVirtualMachineScaleSetVMExtensionsClient creates a new instance of VirtualMachineScaleSetVMExtensionsClient.
+func (c *ClientFactory) NewVirtualMachineScaleSetVMExtensionsClient() *VirtualMachineScaleSetVMExtensionsClient {
+ return &VirtualMachineScaleSetVMExtensionsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewVirtualMachineScaleSetVMRunCommandsClient creates a new instance of VirtualMachineScaleSetVMRunCommandsClient.
+func (c *ClientFactory) NewVirtualMachineScaleSetVMRunCommandsClient() *VirtualMachineScaleSetVMRunCommandsClient {
+ return &VirtualMachineScaleSetVMRunCommandsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewVirtualMachineScaleSetVMsClient creates a new instance of VirtualMachineScaleSetVMsClient.
+func (c *ClientFactory) NewVirtualMachineScaleSetVMsClient() *VirtualMachineScaleSetVMsClient {
+ return &VirtualMachineScaleSetVMsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewVirtualMachineScaleSetsClient creates a new instance of VirtualMachineScaleSetsClient.
+func (c *ClientFactory) NewVirtualMachineScaleSetsClient() *VirtualMachineScaleSetsClient {
+ return &VirtualMachineScaleSetsClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewVirtualMachineSizesClient creates a new instance of VirtualMachineSizesClient.
+func (c *ClientFactory) NewVirtualMachineSizesClient() *VirtualMachineSizesClient {
+ return &VirtualMachineSizesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
+
+// NewVirtualMachinesClient creates a new instance of VirtualMachinesClient.
+func (c *ClientFactory) NewVirtualMachinesClient() *VirtualMachinesClient {
+ return &VirtualMachinesClient{
+ subscriptionID: c.subscriptionID,
+ internal: c.internal,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudserviceoperatingsystems_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudserviceoperatingsystems_client.go
new file mode 100644
index 000000000..bd0cda902
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudserviceoperatingsystems_client.go
@@ -0,0 +1,301 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// CloudServiceOperatingSystemsClient contains the methods for the CloudServiceOperatingSystems group.
+// Don't use this type directly, use NewCloudServiceOperatingSystemsClient() instead.
+type CloudServiceOperatingSystemsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewCloudServiceOperatingSystemsClient creates a new instance of CloudServiceOperatingSystemsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewCloudServiceOperatingSystemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServiceOperatingSystemsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &CloudServiceOperatingSystemsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// GetOSFamily - Gets properties of a guest operating system family that can be specified in the XML service configuration
+// (.cscfg) for a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - location - Name of the location that the OS family pertains to.
+// - osFamilyName - Name of the OS family.
+// - options - CloudServiceOperatingSystemsClientGetOSFamilyOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.GetOSFamily
+// method.
+func (client *CloudServiceOperatingSystemsClient) GetOSFamily(ctx context.Context, location string, osFamilyName string, options *CloudServiceOperatingSystemsClientGetOSFamilyOptions) (CloudServiceOperatingSystemsClientGetOSFamilyResponse, error) {
+ var err error
+ const operationName = "CloudServiceOperatingSystemsClient.GetOSFamily"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getOSFamilyCreateRequest(ctx, location, osFamilyName, options)
+ if err != nil {
+ return CloudServiceOperatingSystemsClientGetOSFamilyResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CloudServiceOperatingSystemsClientGetOSFamilyResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CloudServiceOperatingSystemsClientGetOSFamilyResponse{}, err
+ }
+ resp, err := client.getOSFamilyHandleResponse(httpResp)
+ return resp, err
+}
+
+// getOSFamilyCreateRequest creates the GetOSFamily request.
+func (client *CloudServiceOperatingSystemsClient) getOSFamilyCreateRequest(ctx context.Context, location string, osFamilyName string, options *CloudServiceOperatingSystemsClientGetOSFamilyOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies/{osFamilyName}"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if osFamilyName == "" {
+ return nil, errors.New("parameter osFamilyName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{osFamilyName}", url.PathEscape(osFamilyName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getOSFamilyHandleResponse handles the GetOSFamily response.
+func (client *CloudServiceOperatingSystemsClient) getOSFamilyHandleResponse(resp *http.Response) (CloudServiceOperatingSystemsClientGetOSFamilyResponse, error) {
+ result := CloudServiceOperatingSystemsClientGetOSFamilyResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.OSFamily); err != nil {
+ return CloudServiceOperatingSystemsClientGetOSFamilyResponse{}, err
+ }
+ return result, nil
+}
+
+// GetOSVersion - Gets properties of a guest operating system version that can be specified in the XML service configuration
+// (.cscfg) for a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - location - Name of the location that the OS version pertains to.
+// - osVersionName - Name of the OS version.
+// - options - CloudServiceOperatingSystemsClientGetOSVersionOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.GetOSVersion
+// method.
+func (client *CloudServiceOperatingSystemsClient) GetOSVersion(ctx context.Context, location string, osVersionName string, options *CloudServiceOperatingSystemsClientGetOSVersionOptions) (CloudServiceOperatingSystemsClientGetOSVersionResponse, error) {
+ var err error
+ const operationName = "CloudServiceOperatingSystemsClient.GetOSVersion"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getOSVersionCreateRequest(ctx, location, osVersionName, options)
+ if err != nil {
+ return CloudServiceOperatingSystemsClientGetOSVersionResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CloudServiceOperatingSystemsClientGetOSVersionResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CloudServiceOperatingSystemsClientGetOSVersionResponse{}, err
+ }
+ resp, err := client.getOSVersionHandleResponse(httpResp)
+ return resp, err
+}
+
+// getOSVersionCreateRequest creates the GetOSVersion request.
+func (client *CloudServiceOperatingSystemsClient) getOSVersionCreateRequest(ctx context.Context, location string, osVersionName string, options *CloudServiceOperatingSystemsClientGetOSVersionOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions/{osVersionName}"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if osVersionName == "" {
+ return nil, errors.New("parameter osVersionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{osVersionName}", url.PathEscape(osVersionName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getOSVersionHandleResponse handles the GetOSVersion response.
+func (client *CloudServiceOperatingSystemsClient) getOSVersionHandleResponse(resp *http.Response) (CloudServiceOperatingSystemsClientGetOSVersionResponse, error) {
+ result := CloudServiceOperatingSystemsClientGetOSVersionResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.OSVersion); err != nil {
+ return CloudServiceOperatingSystemsClientGetOSVersionResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListOSFamiliesPager - Gets a list of all guest operating system families available to be specified in the XML service
+// configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page
+// of OS Families. Do this till nextLink is null to fetch all the OS Families.
+//
+// Generated from API version 2022-09-04
+// - location - Name of the location that the OS families pertain to.
+// - options - CloudServiceOperatingSystemsClientListOSFamiliesOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.NewListOSFamiliesPager
+// method.
+func (client *CloudServiceOperatingSystemsClient) NewListOSFamiliesPager(location string, options *CloudServiceOperatingSystemsClientListOSFamiliesOptions) *runtime.Pager[CloudServiceOperatingSystemsClientListOSFamiliesResponse] {
+ return runtime.NewPager(runtime.PagingHandler[CloudServiceOperatingSystemsClientListOSFamiliesResponse]{
+ More: func(page CloudServiceOperatingSystemsClientListOSFamiliesResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *CloudServiceOperatingSystemsClientListOSFamiliesResponse) (CloudServiceOperatingSystemsClientListOSFamiliesResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CloudServiceOperatingSystemsClient.NewListOSFamiliesPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listOSFamiliesCreateRequest(ctx, location, options)
+ }, nil)
+ if err != nil {
+ return CloudServiceOperatingSystemsClientListOSFamiliesResponse{}, err
+ }
+ return client.listOSFamiliesHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listOSFamiliesCreateRequest creates the ListOSFamilies request.
+func (client *CloudServiceOperatingSystemsClient) listOSFamiliesCreateRequest(ctx context.Context, location string, options *CloudServiceOperatingSystemsClientListOSFamiliesOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listOSFamiliesHandleResponse handles the ListOSFamilies response.
+func (client *CloudServiceOperatingSystemsClient) listOSFamiliesHandleResponse(resp *http.Response) (CloudServiceOperatingSystemsClientListOSFamiliesResponse, error) {
+ result := CloudServiceOperatingSystemsClientListOSFamiliesResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.OSFamilyListResult); err != nil {
+ return CloudServiceOperatingSystemsClientListOSFamiliesResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListOSVersionsPager - Gets a list of all guest operating system versions available to be specified in the XML service
+// configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page
+// of OS versions. Do this till nextLink is null to fetch all the OS versions.
+//
+// Generated from API version 2022-09-04
+// - location - Name of the location that the OS versions pertain to.
+// - options - CloudServiceOperatingSystemsClientListOSVersionsOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.NewListOSVersionsPager
+// method.
+func (client *CloudServiceOperatingSystemsClient) NewListOSVersionsPager(location string, options *CloudServiceOperatingSystemsClientListOSVersionsOptions) *runtime.Pager[CloudServiceOperatingSystemsClientListOSVersionsResponse] {
+ return runtime.NewPager(runtime.PagingHandler[CloudServiceOperatingSystemsClientListOSVersionsResponse]{
+ More: func(page CloudServiceOperatingSystemsClientListOSVersionsResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *CloudServiceOperatingSystemsClientListOSVersionsResponse) (CloudServiceOperatingSystemsClientListOSVersionsResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CloudServiceOperatingSystemsClient.NewListOSVersionsPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listOSVersionsCreateRequest(ctx, location, options)
+ }, nil)
+ if err != nil {
+ return CloudServiceOperatingSystemsClientListOSVersionsResponse{}, err
+ }
+ return client.listOSVersionsHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listOSVersionsCreateRequest creates the ListOSVersions request.
+func (client *CloudServiceOperatingSystemsClient) listOSVersionsCreateRequest(ctx context.Context, location string, options *CloudServiceOperatingSystemsClientListOSVersionsOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listOSVersionsHandleResponse handles the ListOSVersions response.
+func (client *CloudServiceOperatingSystemsClient) listOSVersionsHandleResponse(resp *http.Response) (CloudServiceOperatingSystemsClientListOSVersionsResponse, error) {
+ result := CloudServiceOperatingSystemsClientListOSVersionsResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.OSVersionListResult); err != nil {
+ return CloudServiceOperatingSystemsClientListOSVersionsResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudserviceroleinstances_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudserviceroleinstances_client.go
new file mode 100644
index 000000000..1f7cdb7c3
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudserviceroleinstances_client.go
@@ -0,0 +1,648 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// CloudServiceRoleInstancesClient contains the methods for the CloudServiceRoleInstances group.
+// Don't use this type directly, use NewCloudServiceRoleInstancesClient() instead.
+type CloudServiceRoleInstancesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewCloudServiceRoleInstancesClient creates a new instance of CloudServiceRoleInstancesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewCloudServiceRoleInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServiceRoleInstancesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &CloudServiceRoleInstancesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginDelete - Deletes a role instance from a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - roleInstanceName - Name of the role instance.
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServiceRoleInstancesClientBeginDeleteOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginDelete
+// method.
+func (client *CloudServiceRoleInstancesClient) BeginDelete(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientBeginDeleteOptions) (*runtime.Poller[CloudServiceRoleInstancesClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, roleInstanceName, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServiceRoleInstancesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServiceRoleInstancesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Deletes a role instance from a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+func (client *CloudServiceRoleInstancesClient) deleteOperation(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CloudServiceRoleInstancesClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, roleInstanceName, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *CloudServiceRoleInstancesClient) deleteCreateRequest(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}"
+ if roleInstanceName == "" {
+ return nil, errors.New("parameter roleInstanceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Gets a role instance from a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - roleInstanceName - Name of the role instance.
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServiceRoleInstancesClientGetOptions contains the optional parameters for the CloudServiceRoleInstancesClient.Get
+// method.
+func (client *CloudServiceRoleInstancesClient) Get(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientGetOptions) (CloudServiceRoleInstancesClientGetResponse, error) {
+ var err error
+ const operationName = "CloudServiceRoleInstancesClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, roleInstanceName, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return CloudServiceRoleInstancesClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CloudServiceRoleInstancesClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CloudServiceRoleInstancesClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *CloudServiceRoleInstancesClient) getCreateRequest(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}"
+ if roleInstanceName == "" {
+ return nil, errors.New("parameter roleInstanceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *CloudServiceRoleInstancesClient) getHandleResponse(resp *http.Response) (CloudServiceRoleInstancesClientGetResponse, error) {
+ result := CloudServiceRoleInstancesClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RoleInstance); err != nil {
+ return CloudServiceRoleInstancesClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// GetInstanceView - Retrieves information about the run-time state of a role instance in a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - roleInstanceName - Name of the role instance.
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServiceRoleInstancesClientGetInstanceViewOptions contains the optional parameters for the CloudServiceRoleInstancesClient.GetInstanceView
+// method.
+func (client *CloudServiceRoleInstancesClient) GetInstanceView(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientGetInstanceViewOptions) (CloudServiceRoleInstancesClientGetInstanceViewResponse, error) {
+ var err error
+ const operationName = "CloudServiceRoleInstancesClient.GetInstanceView"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getInstanceViewCreateRequest(ctx, roleInstanceName, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return CloudServiceRoleInstancesClientGetInstanceViewResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CloudServiceRoleInstancesClientGetInstanceViewResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CloudServiceRoleInstancesClientGetInstanceViewResponse{}, err
+ }
+ resp, err := client.getInstanceViewHandleResponse(httpResp)
+ return resp, err
+}
+
+// getInstanceViewCreateRequest creates the GetInstanceView request.
+func (client *CloudServiceRoleInstancesClient) getInstanceViewCreateRequest(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientGetInstanceViewOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView"
+ if roleInstanceName == "" {
+ return nil, errors.New("parameter roleInstanceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getInstanceViewHandleResponse handles the GetInstanceView response.
+func (client *CloudServiceRoleInstancesClient) getInstanceViewHandleResponse(resp *http.Response) (CloudServiceRoleInstancesClientGetInstanceViewResponse, error) {
+ result := CloudServiceRoleInstancesClientGetInstanceViewResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RoleInstanceView); err != nil {
+ return CloudServiceRoleInstancesClientGetInstanceViewResponse{}, err
+ }
+ return result, nil
+}
+
+// GetRemoteDesktopFile - Gets a remote desktop file for a role instance in a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - roleInstanceName - Name of the role instance.
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServiceRoleInstancesClientGetRemoteDesktopFileOptions contains the optional parameters for the CloudServiceRoleInstancesClient.GetRemoteDesktopFile
+// method.
+func (client *CloudServiceRoleInstancesClient) GetRemoteDesktopFile(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientGetRemoteDesktopFileOptions) (CloudServiceRoleInstancesClientGetRemoteDesktopFileResponse, error) {
+ var err error
+ const operationName = "CloudServiceRoleInstancesClient.GetRemoteDesktopFile"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getRemoteDesktopFileCreateRequest(ctx, roleInstanceName, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return CloudServiceRoleInstancesClientGetRemoteDesktopFileResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CloudServiceRoleInstancesClientGetRemoteDesktopFileResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CloudServiceRoleInstancesClientGetRemoteDesktopFileResponse{}, err
+ }
+ return CloudServiceRoleInstancesClientGetRemoteDesktopFileResponse{Body: httpResp.Body}, nil
+}
+
+// getRemoteDesktopFileCreateRequest creates the GetRemoteDesktopFile request.
+func (client *CloudServiceRoleInstancesClient) getRemoteDesktopFileCreateRequest(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientGetRemoteDesktopFileOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile"
+ if roleInstanceName == "" {
+ return nil, errors.New("parameter roleInstanceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ runtime.SkipBodyDownload(req)
+ req.Raw().Header["Accept"] = []string{"application/x-rdp"}
+ return req, nil
+}
+
+// NewListPager - Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the
+// next page of role instances. Do this till nextLink is null to fetch all the role instances.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServiceRoleInstancesClientListOptions contains the optional parameters for the CloudServiceRoleInstancesClient.NewListPager
+// method.
+func (client *CloudServiceRoleInstancesClient) NewListPager(resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientListOptions) *runtime.Pager[CloudServiceRoleInstancesClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[CloudServiceRoleInstancesClientListResponse]{
+ More: func(page CloudServiceRoleInstancesClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *CloudServiceRoleInstancesClientListResponse) (CloudServiceRoleInstancesClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CloudServiceRoleInstancesClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, resourceGroupName, cloudServiceName, options)
+ }, nil)
+ if err != nil {
+ return CloudServiceRoleInstancesClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *CloudServiceRoleInstancesClient) listCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *CloudServiceRoleInstancesClient) listHandleResponse(resp *http.Response) (CloudServiceRoleInstancesClientListResponse, error) {
+ result := CloudServiceRoleInstancesClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RoleInstanceListResult); err != nil {
+ return CloudServiceRoleInstancesClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginRebuild - The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles
+// or worker roles and initializes the storage resources that are used by them. If you do not
+// want to initialize storage resources, you can use Reimage Role Instance.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - roleInstanceName - Name of the role instance.
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServiceRoleInstancesClientBeginRebuildOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginRebuild
+// method.
+func (client *CloudServiceRoleInstancesClient) BeginRebuild(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientBeginRebuildOptions) (*runtime.Poller[CloudServiceRoleInstancesClientRebuildResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.rebuild(ctx, roleInstanceName, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServiceRoleInstancesClientRebuildResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServiceRoleInstancesClientRebuildResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Rebuild - The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or
+// worker roles and initializes the storage resources that are used by them. If you do not
+// want to initialize storage resources, you can use Reimage Role Instance.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+func (client *CloudServiceRoleInstancesClient) rebuild(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientBeginRebuildOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CloudServiceRoleInstancesClient.BeginRebuild"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.rebuildCreateRequest(ctx, roleInstanceName, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// rebuildCreateRequest creates the Rebuild request.
+func (client *CloudServiceRoleInstancesClient) rebuildCreateRequest(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientBeginRebuildOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/rebuild"
+ if roleInstanceName == "" {
+ return nil, errors.New("parameter roleInstanceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginReimage - The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles
+// or worker roles.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - roleInstanceName - Name of the role instance.
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServiceRoleInstancesClientBeginReimageOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginReimage
+// method.
+func (client *CloudServiceRoleInstancesClient) BeginReimage(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientBeginReimageOptions) (*runtime.Poller[CloudServiceRoleInstancesClientReimageResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.reimage(ctx, roleInstanceName, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServiceRoleInstancesClientReimageResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServiceRoleInstancesClientReimageResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Reimage - The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or
+// worker roles.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+func (client *CloudServiceRoleInstancesClient) reimage(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientBeginReimageOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CloudServiceRoleInstancesClient.BeginReimage"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.reimageCreateRequest(ctx, roleInstanceName, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// reimageCreateRequest creates the Reimage request.
+func (client *CloudServiceRoleInstancesClient) reimageCreateRequest(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientBeginReimageOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/reimage"
+ if roleInstanceName == "" {
+ return nil, errors.New("parameter roleInstanceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginRestart - The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - roleInstanceName - Name of the role instance.
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServiceRoleInstancesClientBeginRestartOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginRestart
+// method.
+func (client *CloudServiceRoleInstancesClient) BeginRestart(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientBeginRestartOptions) (*runtime.Poller[CloudServiceRoleInstancesClientRestartResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.restart(ctx, roleInstanceName, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServiceRoleInstancesClientRestartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServiceRoleInstancesClientRestartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Restart - The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+func (client *CloudServiceRoleInstancesClient) restart(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientBeginRestartOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CloudServiceRoleInstancesClient.BeginRestart"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.restartCreateRequest(ctx, roleInstanceName, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// restartCreateRequest creates the Restart request.
+func (client *CloudServiceRoleInstancesClient) restartCreateRequest(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRoleInstancesClientBeginRestartOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/restart"
+ if roleInstanceName == "" {
+ return nil, errors.New("parameter roleInstanceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{roleInstanceName}", url.PathEscape(roleInstanceName))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudserviceroles_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudserviceroles_client.go
new file mode 100644
index 000000000..a4572cf14
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudserviceroles_client.go
@@ -0,0 +1,180 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// CloudServiceRolesClient contains the methods for the CloudServiceRoles group.
+// Don't use this type directly, use NewCloudServiceRolesClient() instead.
+type CloudServiceRolesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewCloudServiceRolesClient creates a new instance of CloudServiceRolesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewCloudServiceRolesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServiceRolesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &CloudServiceRolesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// Get - Gets a role from a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - roleName - Name of the role.
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServiceRolesClientGetOptions contains the optional parameters for the CloudServiceRolesClient.Get method.
+func (client *CloudServiceRolesClient) Get(ctx context.Context, roleName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRolesClientGetOptions) (CloudServiceRolesClientGetResponse, error) {
+ var err error
+ const operationName = "CloudServiceRolesClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, roleName, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return CloudServiceRolesClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CloudServiceRolesClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CloudServiceRolesClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *CloudServiceRolesClient) getCreateRequest(ctx context.Context, roleName string, resourceGroupName string, cloudServiceName string, options *CloudServiceRolesClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roles/{roleName}"
+ if roleName == "" {
+ return nil, errors.New("parameter roleName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{roleName}", url.PathEscape(roleName))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *CloudServiceRolesClient) getHandleResponse(resp *http.Response) (CloudServiceRolesClientGetResponse, error) {
+ result := CloudServiceRolesClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CloudServiceRole); err != nil {
+ return CloudServiceRolesClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next page
+// of roles. Do this till nextLink is null to fetch all the roles.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServiceRolesClientListOptions contains the optional parameters for the CloudServiceRolesClient.NewListPager
+// method.
+func (client *CloudServiceRolesClient) NewListPager(resourceGroupName string, cloudServiceName string, options *CloudServiceRolesClientListOptions) *runtime.Pager[CloudServiceRolesClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[CloudServiceRolesClientListResponse]{
+ More: func(page CloudServiceRolesClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *CloudServiceRolesClientListResponse) (CloudServiceRolesClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CloudServiceRolesClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, resourceGroupName, cloudServiceName, options)
+ }, nil)
+ if err != nil {
+ return CloudServiceRolesClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *CloudServiceRolesClient) listCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServiceRolesClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roles"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *CloudServiceRolesClient) listHandleResponse(resp *http.Response) (CloudServiceRolesClientListResponse, error) {
+ result := CloudServiceRolesClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CloudServiceRoleListResult); err != nil {
+ return CloudServiceRolesClientListResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudservices_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudservices_client.go
new file mode 100644
index 000000000..283d3a6fe
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudservices_client.go
@@ -0,0 +1,1013 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// CloudServicesClient contains the methods for the CloudServices group.
+// Don't use this type directly, use NewCloudServicesClient() instead.
+type CloudServicesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewCloudServicesClient creates a new instance of CloudServicesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewCloudServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServicesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &CloudServicesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - Create or update a cloud service. Please note some properties can be set only during cloud service
+// creation.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - parameters - The cloud service object.
+// - options - CloudServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the CloudServicesClient.BeginCreateOrUpdate
+// method.
+func (client *CloudServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters CloudService, options *CloudServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CloudServicesClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, cloudServiceName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - Create or update a cloud service. Please note some properties can be set only during cloud service creation.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+func (client *CloudServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters CloudService, options *CloudServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CloudServicesClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, cloudServiceName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *CloudServicesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters CloudService, options *CloudServicesClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - Deletes a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServicesClientBeginDeleteOptions contains the optional parameters for the CloudServicesClient.BeginDelete
+// method.
+func (client *CloudServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginDeleteOptions) (*runtime.Poller[CloudServicesClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Deletes a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+func (client *CloudServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CloudServicesClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *CloudServicesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginDeleteInstances - Deletes role instances in a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServicesClientBeginDeleteInstancesOptions contains the optional parameters for the CloudServicesClient.BeginDeleteInstances
+// method.
+func (client *CloudServicesClient) BeginDeleteInstances(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginDeleteInstancesOptions) (*runtime.Poller[CloudServicesClientDeleteInstancesResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteInstances(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientDeleteInstancesResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientDeleteInstancesResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// DeleteInstances - Deletes role instances in a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+func (client *CloudServicesClient) deleteInstances(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginDeleteInstancesOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CloudServicesClient.BeginDeleteInstances"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteInstancesCreateRequest(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteInstancesCreateRequest creates the DeleteInstances request.
+func (client *CloudServicesClient) deleteInstancesCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginDeleteInstancesOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/delete"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.Parameters != nil {
+ if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// Get - Display information about a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServicesClientGetOptions contains the optional parameters for the CloudServicesClient.Get method.
+func (client *CloudServicesClient) Get(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientGetOptions) (CloudServicesClientGetResponse, error) {
+ var err error
+ const operationName = "CloudServicesClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return CloudServicesClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CloudServicesClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CloudServicesClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *CloudServicesClient) getCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *CloudServicesClient) getHandleResponse(resp *http.Response) (CloudServicesClientGetResponse, error) {
+ result := CloudServicesClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CloudService); err != nil {
+ return CloudServicesClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// GetInstanceView - Gets the status of a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServicesClientGetInstanceViewOptions contains the optional parameters for the CloudServicesClient.GetInstanceView
+// method.
+func (client *CloudServicesClient) GetInstanceView(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientGetInstanceViewOptions) (CloudServicesClientGetInstanceViewResponse, error) {
+ var err error
+ const operationName = "CloudServicesClient.GetInstanceView"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getInstanceViewCreateRequest(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return CloudServicesClientGetInstanceViewResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CloudServicesClientGetInstanceViewResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CloudServicesClientGetInstanceViewResponse{}, err
+ }
+ resp, err := client.getInstanceViewHandleResponse(httpResp)
+ return resp, err
+}
+
+// getInstanceViewCreateRequest creates the GetInstanceView request.
+func (client *CloudServicesClient) getInstanceViewCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientGetInstanceViewOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/instanceView"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getInstanceViewHandleResponse handles the GetInstanceView response.
+func (client *CloudServicesClient) getInstanceViewHandleResponse(resp *http.Response) (CloudServicesClientGetInstanceViewResponse, error) {
+ result := CloudServicesClientGetInstanceViewResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CloudServiceInstanceView); err != nil {
+ return CloudServicesClientGetInstanceViewResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the
+// next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - options - CloudServicesClientListOptions contains the optional parameters for the CloudServicesClient.NewListPager method.
+func (client *CloudServicesClient) NewListPager(resourceGroupName string, options *CloudServicesClientListOptions) *runtime.Pager[CloudServicesClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[CloudServicesClientListResponse]{
+ More: func(page CloudServicesClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *CloudServicesClientListResponse) (CloudServicesClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CloudServicesClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return CloudServicesClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *CloudServicesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *CloudServicesClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *CloudServicesClient) listHandleResponse(resp *http.Response) (CloudServicesClientListResponse, error) {
+ result := CloudServicesClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CloudServiceListResult); err != nil {
+ return CloudServicesClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListAllPager - Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use
+// nextLink property in the response to get the next page of Cloud Services. Do this till nextLink
+// is null to fetch all the Cloud Services.
+//
+// Generated from API version 2022-09-04
+// - options - CloudServicesClientListAllOptions contains the optional parameters for the CloudServicesClient.NewListAllPager
+// method.
+func (client *CloudServicesClient) NewListAllPager(options *CloudServicesClientListAllOptions) *runtime.Pager[CloudServicesClientListAllResponse] {
+ return runtime.NewPager(runtime.PagingHandler[CloudServicesClientListAllResponse]{
+ More: func(page CloudServicesClientListAllResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *CloudServicesClientListAllResponse) (CloudServicesClientListAllResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CloudServicesClient.NewListAllPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listAllCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return CloudServicesClientListAllResponse{}, err
+ }
+ return client.listAllHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listAllCreateRequest creates the ListAll request.
+func (client *CloudServicesClient) listAllCreateRequest(ctx context.Context, options *CloudServicesClientListAllOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/cloudServices"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listAllHandleResponse handles the ListAll response.
+func (client *CloudServicesClient) listAllHandleResponse(resp *http.Response) (CloudServicesClientListAllResponse, error) {
+ result := CloudServicesClientListAllResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CloudServiceListResult); err != nil {
+ return CloudServicesClientListAllResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginPowerOff - Power off the cloud service. Note that resources are still attached and you are getting charged for the
+// resources.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServicesClientBeginPowerOffOptions contains the optional parameters for the CloudServicesClient.BeginPowerOff
+// method.
+func (client *CloudServicesClient) BeginPowerOff(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginPowerOffOptions) (*runtime.Poller[CloudServicesClientPowerOffResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.powerOff(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientPowerOffResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientPowerOffResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// PowerOff - Power off the cloud service. Note that resources are still attached and you are getting charged for the resources.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+func (client *CloudServicesClient) powerOff(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginPowerOffOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CloudServicesClient.BeginPowerOff"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.powerOffCreateRequest(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// powerOffCreateRequest creates the PowerOff request.
+func (client *CloudServicesClient) powerOffCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginPowerOffOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/poweroff"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginRebuild - Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes
+// the storage resources that are used by them. If you do not want to initialize storage
+// resources, you can use Reimage Role Instances.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServicesClientBeginRebuildOptions contains the optional parameters for the CloudServicesClient.BeginRebuild
+// method.
+func (client *CloudServicesClient) BeginRebuild(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginRebuildOptions) (*runtime.Poller[CloudServicesClientRebuildResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.rebuild(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientRebuildResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientRebuildResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Rebuild - Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes
+// the storage resources that are used by them. If you do not want to initialize storage
+// resources, you can use Reimage Role Instances.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+func (client *CloudServicesClient) rebuild(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginRebuildOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CloudServicesClient.BeginRebuild"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.rebuildCreateRequest(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// rebuildCreateRequest creates the Rebuild request.
+func (client *CloudServicesClient) rebuildCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginRebuildOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/rebuild"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.Parameters != nil {
+ if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// BeginReimage - Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServicesClientBeginReimageOptions contains the optional parameters for the CloudServicesClient.BeginReimage
+// method.
+func (client *CloudServicesClient) BeginReimage(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginReimageOptions) (*runtime.Poller[CloudServicesClientReimageResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.reimage(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientReimageResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientReimageResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Reimage - Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+func (client *CloudServicesClient) reimage(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginReimageOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CloudServicesClient.BeginReimage"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.reimageCreateRequest(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// reimageCreateRequest creates the Reimage request.
+func (client *CloudServicesClient) reimageCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginReimageOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/reimage"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.Parameters != nil {
+ if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// BeginRestart - Restarts one or more role instances in a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServicesClientBeginRestartOptions contains the optional parameters for the CloudServicesClient.BeginRestart
+// method.
+func (client *CloudServicesClient) BeginRestart(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginRestartOptions) (*runtime.Poller[CloudServicesClientRestartResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.restart(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientRestartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientRestartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Restart - Restarts one or more role instances in a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+func (client *CloudServicesClient) restart(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginRestartOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CloudServicesClient.BeginRestart"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.restartCreateRequest(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// restartCreateRequest creates the Restart request.
+func (client *CloudServicesClient) restartCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginRestartOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/restart"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.Parameters != nil {
+ if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// BeginStart - Starts the cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServicesClientBeginStartOptions contains the optional parameters for the CloudServicesClient.BeginStart
+// method.
+func (client *CloudServicesClient) BeginStart(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginStartOptions) (*runtime.Poller[CloudServicesClientStartResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.start(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientStartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientStartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Start - Starts the cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+func (client *CloudServicesClient) start(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginStartOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CloudServicesClient.BeginStart"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.startCreateRequest(ctx, resourceGroupName, cloudServiceName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// startCreateRequest creates the Start request.
+func (client *CloudServicesClient) startCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesClientBeginStartOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/start"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginUpdate - Update a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - parameters - The cloud service object.
+// - options - CloudServicesClientBeginUpdateOptions contains the optional parameters for the CloudServicesClient.BeginUpdate
+// method.
+func (client *CloudServicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters CloudServiceUpdate, options *CloudServicesClientBeginUpdateOptions) (*runtime.Poller[CloudServicesClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, cloudServiceName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Update a cloud service.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+func (client *CloudServicesClient) update(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters CloudServiceUpdate, options *CloudServicesClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CloudServicesClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, cloudServiceName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *CloudServicesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters CloudServiceUpdate, options *CloudServicesClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudservicesupdatedomain_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudservicesupdatedomain_client.go
new file mode 100644
index 000000000..a4bd1e7b1
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/cloudservicesupdatedomain_client.go
@@ -0,0 +1,263 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strconv"
+ "strings"
+)
+
+// CloudServicesUpdateDomainClient contains the methods for the CloudServicesUpdateDomain group.
+// Don't use this type directly, use NewCloudServicesUpdateDomainClient() instead.
+type CloudServicesUpdateDomainClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewCloudServicesUpdateDomainClient creates a new instance of CloudServicesUpdateDomainClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewCloudServicesUpdateDomainClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudServicesUpdateDomainClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &CloudServicesUpdateDomainClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// GetUpdateDomain - Gets the specified update domain of a cloud service. Use nextLink property in the response to get the
+// next page of update domains. Do this till nextLink is null to fetch all the update domains.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - updateDomain - Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based
+// index: the first update domain has an ID of 0, the second has an ID of 1, and so on.
+// - options - CloudServicesUpdateDomainClientGetUpdateDomainOptions contains the optional parameters for the CloudServicesUpdateDomainClient.GetUpdateDomain
+// method.
+func (client *CloudServicesUpdateDomainClient) GetUpdateDomain(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32, options *CloudServicesUpdateDomainClientGetUpdateDomainOptions) (CloudServicesUpdateDomainClientGetUpdateDomainResponse, error) {
+ var err error
+ const operationName = "CloudServicesUpdateDomainClient.GetUpdateDomain"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getUpdateDomainCreateRequest(ctx, resourceGroupName, cloudServiceName, updateDomain, options)
+ if err != nil {
+ return CloudServicesUpdateDomainClientGetUpdateDomainResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CloudServicesUpdateDomainClientGetUpdateDomainResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CloudServicesUpdateDomainClientGetUpdateDomainResponse{}, err
+ }
+ resp, err := client.getUpdateDomainHandleResponse(httpResp)
+ return resp, err
+}
+
+// getUpdateDomainCreateRequest creates the GetUpdateDomain request.
+func (client *CloudServicesUpdateDomainClient) getUpdateDomainCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32, options *CloudServicesUpdateDomainClientGetUpdateDomainOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ urlPath = strings.ReplaceAll(urlPath, "{updateDomain}", url.PathEscape(strconv.FormatInt(int64(updateDomain), 10)))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getUpdateDomainHandleResponse handles the GetUpdateDomain response.
+func (client *CloudServicesUpdateDomainClient) getUpdateDomainHandleResponse(resp *http.Response) (CloudServicesUpdateDomainClientGetUpdateDomainResponse, error) {
+ result := CloudServicesUpdateDomainClientGetUpdateDomainResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.UpdateDomain); err != nil {
+ return CloudServicesUpdateDomainClientGetUpdateDomainResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListUpdateDomainsPager - Gets a list of all update domains in a cloud service.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - options - CloudServicesUpdateDomainClientListUpdateDomainsOptions contains the optional parameters for the CloudServicesUpdateDomainClient.NewListUpdateDomainsPager
+// method.
+func (client *CloudServicesUpdateDomainClient) NewListUpdateDomainsPager(resourceGroupName string, cloudServiceName string, options *CloudServicesUpdateDomainClientListUpdateDomainsOptions) *runtime.Pager[CloudServicesUpdateDomainClientListUpdateDomainsResponse] {
+ return runtime.NewPager(runtime.PagingHandler[CloudServicesUpdateDomainClientListUpdateDomainsResponse]{
+ More: func(page CloudServicesUpdateDomainClientListUpdateDomainsResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *CloudServicesUpdateDomainClientListUpdateDomainsResponse) (CloudServicesUpdateDomainClientListUpdateDomainsResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CloudServicesUpdateDomainClient.NewListUpdateDomainsPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listUpdateDomainsCreateRequest(ctx, resourceGroupName, cloudServiceName, options)
+ }, nil)
+ if err != nil {
+ return CloudServicesUpdateDomainClientListUpdateDomainsResponse{}, err
+ }
+ return client.listUpdateDomainsHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listUpdateDomainsCreateRequest creates the ListUpdateDomains request.
+func (client *CloudServicesUpdateDomainClient) listUpdateDomainsCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, options *CloudServicesUpdateDomainClientListUpdateDomainsOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listUpdateDomainsHandleResponse handles the ListUpdateDomains response.
+func (client *CloudServicesUpdateDomainClient) listUpdateDomainsHandleResponse(resp *http.Response) (CloudServicesUpdateDomainClientListUpdateDomainsResponse, error) {
+ result := CloudServicesUpdateDomainClientListUpdateDomainsResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.UpdateDomainListResult); err != nil {
+ return CloudServicesUpdateDomainClientListUpdateDomainsResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginWalkUpdateDomain - Updates the role instances in the specified update domain.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+// - resourceGroupName - Name of the resource group.
+// - cloudServiceName - Name of the cloud service.
+// - updateDomain - Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based
+// index: the first update domain has an ID of 0, the second has an ID of 1, and so on.
+// - parameters - The update domain object.
+// - options - CloudServicesUpdateDomainClientBeginWalkUpdateDomainOptions contains the optional parameters for the CloudServicesUpdateDomainClient.BeginWalkUpdateDomain
+// method.
+func (client *CloudServicesUpdateDomainClient) BeginWalkUpdateDomain(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32, parameters UpdateDomain, options *CloudServicesUpdateDomainClientBeginWalkUpdateDomainOptions) (*runtime.Poller[CloudServicesUpdateDomainClientWalkUpdateDomainResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.walkUpdateDomain(ctx, resourceGroupName, cloudServiceName, updateDomain, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CloudServicesUpdateDomainClientWalkUpdateDomainResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CloudServicesUpdateDomainClientWalkUpdateDomainResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// WalkUpdateDomain - Updates the role instances in the specified update domain.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2022-09-04
+func (client *CloudServicesUpdateDomainClient) walkUpdateDomain(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32, parameters UpdateDomain, options *CloudServicesUpdateDomainClientBeginWalkUpdateDomainOptions) (*http.Response, error) {
+ var err error
+ const operationName = "CloudServicesUpdateDomainClient.BeginWalkUpdateDomain"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.walkUpdateDomainCreateRequest(ctx, resourceGroupName, cloudServiceName, updateDomain, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// walkUpdateDomainCreateRequest creates the WalkUpdateDomain request.
+func (client *CloudServicesUpdateDomainClient) walkUpdateDomainCreateRequest(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32, parameters UpdateDomain, options *CloudServicesUpdateDomainClientBeginWalkUpdateDomainOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if cloudServiceName == "" {
+ return nil, errors.New("parameter cloudServiceName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{cloudServiceName}", url.PathEscape(cloudServiceName))
+ urlPath = strings.ReplaceAll(urlPath, "{updateDomain}", url.PathEscape(strconv.FormatInt(int64(updateDomain), 10)))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2022-09-04")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/communitygalleries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/communitygalleries_client.go
new file mode 100644
index 000000000..431a26cde
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/communitygalleries_client.go
@@ -0,0 +1,109 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// CommunityGalleriesClient contains the methods for the CommunityGalleries group.
+// Don't use this type directly, use NewCommunityGalleriesClient() instead.
+type CommunityGalleriesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewCommunityGalleriesClient creates a new instance of CommunityGalleriesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewCommunityGalleriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CommunityGalleriesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &CommunityGalleriesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// Get - Get a community gallery by gallery public name.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - location - Resource location.
+// - publicGalleryName - The public name of the community gallery.
+// - options - CommunityGalleriesClientGetOptions contains the optional parameters for the CommunityGalleriesClient.Get method.
+func (client *CommunityGalleriesClient) Get(ctx context.Context, location string, publicGalleryName string, options *CommunityGalleriesClientGetOptions) (CommunityGalleriesClientGetResponse, error) {
+ var err error
+ const operationName = "CommunityGalleriesClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, location, publicGalleryName, options)
+ if err != nil {
+ return CommunityGalleriesClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CommunityGalleriesClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CommunityGalleriesClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *CommunityGalleriesClient) getCreateRequest(ctx context.Context, location string, publicGalleryName string, options *CommunityGalleriesClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if publicGalleryName == "" {
+ return nil, errors.New("parameter publicGalleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publicGalleryName}", url.PathEscape(publicGalleryName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *CommunityGalleriesClient) getHandleResponse(resp *http.Response) (CommunityGalleriesClientGetResponse, error) {
+ result := CommunityGalleriesClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CommunityGallery); err != nil {
+ return CommunityGalleriesClientGetResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/communitygalleryimages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/communitygalleryimages_client.go
new file mode 100644
index 000000000..4ecc005ca
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/communitygalleryimages_client.go
@@ -0,0 +1,180 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// CommunityGalleryImagesClient contains the methods for the CommunityGalleryImages group.
+// Don't use this type directly, use NewCommunityGalleryImagesClient() instead.
+type CommunityGalleryImagesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewCommunityGalleryImagesClient creates a new instance of CommunityGalleryImagesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewCommunityGalleryImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CommunityGalleryImagesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &CommunityGalleryImagesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// Get - Get a community gallery image.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - location - Resource location.
+// - publicGalleryName - The public name of the community gallery.
+// - galleryImageName - The name of the community gallery image definition.
+// - options - CommunityGalleryImagesClientGetOptions contains the optional parameters for the CommunityGalleryImagesClient.Get
+// method.
+func (client *CommunityGalleryImagesClient) Get(ctx context.Context, location string, publicGalleryName string, galleryImageName string, options *CommunityGalleryImagesClientGetOptions) (CommunityGalleryImagesClientGetResponse, error) {
+ var err error
+ const operationName = "CommunityGalleryImagesClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, location, publicGalleryName, galleryImageName, options)
+ if err != nil {
+ return CommunityGalleryImagesClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CommunityGalleryImagesClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CommunityGalleryImagesClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *CommunityGalleryImagesClient) getCreateRequest(ctx context.Context, location string, publicGalleryName string, galleryImageName string, options *CommunityGalleryImagesClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if publicGalleryName == "" {
+ return nil, errors.New("parameter publicGalleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publicGalleryName}", url.PathEscape(publicGalleryName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *CommunityGalleryImagesClient) getHandleResponse(resp *http.Response) (CommunityGalleryImagesClientGetResponse, error) {
+ result := CommunityGalleryImagesClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CommunityGalleryImage); err != nil {
+ return CommunityGalleryImagesClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - List community gallery images inside a gallery.
+//
+// Generated from API version 2023-07-03
+// - location - Resource location.
+// - publicGalleryName - The public name of the community gallery.
+// - options - CommunityGalleryImagesClientListOptions contains the optional parameters for the CommunityGalleryImagesClient.NewListPager
+// method.
+func (client *CommunityGalleryImagesClient) NewListPager(location string, publicGalleryName string, options *CommunityGalleryImagesClientListOptions) *runtime.Pager[CommunityGalleryImagesClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[CommunityGalleryImagesClientListResponse]{
+ More: func(page CommunityGalleryImagesClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *CommunityGalleryImagesClientListResponse) (CommunityGalleryImagesClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CommunityGalleryImagesClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, location, publicGalleryName, options)
+ }, nil)
+ if err != nil {
+ return CommunityGalleryImagesClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *CommunityGalleryImagesClient) listCreateRequest(ctx context.Context, location string, publicGalleryName string, options *CommunityGalleryImagesClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if publicGalleryName == "" {
+ return nil, errors.New("parameter publicGalleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publicGalleryName}", url.PathEscape(publicGalleryName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *CommunityGalleryImagesClient) listHandleResponse(resp *http.Response) (CommunityGalleryImagesClientListResponse, error) {
+ result := CommunityGalleryImagesClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CommunityGalleryImageList); err != nil {
+ return CommunityGalleryImagesClientListResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/communitygalleryimageversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/communitygalleryimageversions_client.go
new file mode 100644
index 000000000..e98cfa506
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/communitygalleryimageversions_client.go
@@ -0,0 +1,192 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// CommunityGalleryImageVersionsClient contains the methods for the CommunityGalleryImageVersions group.
+// Don't use this type directly, use NewCommunityGalleryImageVersionsClient() instead.
+type CommunityGalleryImageVersionsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewCommunityGalleryImageVersionsClient creates a new instance of CommunityGalleryImageVersionsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewCommunityGalleryImageVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CommunityGalleryImageVersionsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &CommunityGalleryImageVersionsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// Get - Get a community gallery image version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - location - Resource location.
+// - publicGalleryName - The public name of the community gallery.
+// - galleryImageName - The name of the community gallery image definition.
+// - galleryImageVersionName - The name of the community gallery image version. Needs to follow semantic version name pattern:
+// The allowed characters are digit and period. Digits must be within the range of a 32-bit integer.
+// Format: ..
+// - options - CommunityGalleryImageVersionsClientGetOptions contains the optional parameters for the CommunityGalleryImageVersionsClient.Get
+// method.
+func (client *CommunityGalleryImageVersionsClient) Get(ctx context.Context, location string, publicGalleryName string, galleryImageName string, galleryImageVersionName string, options *CommunityGalleryImageVersionsClientGetOptions) (CommunityGalleryImageVersionsClientGetResponse, error) {
+ var err error
+ const operationName = "CommunityGalleryImageVersionsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, location, publicGalleryName, galleryImageName, galleryImageVersionName, options)
+ if err != nil {
+ return CommunityGalleryImageVersionsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return CommunityGalleryImageVersionsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return CommunityGalleryImageVersionsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *CommunityGalleryImageVersionsClient) getCreateRequest(ctx context.Context, location string, publicGalleryName string, galleryImageName string, galleryImageVersionName string, options *CommunityGalleryImageVersionsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if publicGalleryName == "" {
+ return nil, errors.New("parameter publicGalleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publicGalleryName}", url.PathEscape(publicGalleryName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ if galleryImageVersionName == "" {
+ return nil, errors.New("parameter galleryImageVersionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageVersionName}", url.PathEscape(galleryImageVersionName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *CommunityGalleryImageVersionsClient) getHandleResponse(resp *http.Response) (CommunityGalleryImageVersionsClientGetResponse, error) {
+ result := CommunityGalleryImageVersionsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CommunityGalleryImageVersion); err != nil {
+ return CommunityGalleryImageVersionsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - List community gallery image versions inside an image.
+//
+// Generated from API version 2023-07-03
+// - location - Resource location.
+// - publicGalleryName - The public name of the community gallery.
+// - galleryImageName - The name of the community gallery image definition.
+// - options - CommunityGalleryImageVersionsClientListOptions contains the optional parameters for the CommunityGalleryImageVersionsClient.NewListPager
+// method.
+func (client *CommunityGalleryImageVersionsClient) NewListPager(location string, publicGalleryName string, galleryImageName string, options *CommunityGalleryImageVersionsClientListOptions) *runtime.Pager[CommunityGalleryImageVersionsClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[CommunityGalleryImageVersionsClientListResponse]{
+ More: func(page CommunityGalleryImageVersionsClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *CommunityGalleryImageVersionsClientListResponse) (CommunityGalleryImageVersionsClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CommunityGalleryImageVersionsClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, location, publicGalleryName, galleryImageName, options)
+ }, nil)
+ if err != nil {
+ return CommunityGalleryImageVersionsClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *CommunityGalleryImageVersionsClient) listCreateRequest(ctx context.Context, location string, publicGalleryName string, galleryImageName string, options *CommunityGalleryImageVersionsClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}/versions"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if publicGalleryName == "" {
+ return nil, errors.New("parameter publicGalleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publicGalleryName}", url.PathEscape(publicGalleryName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *CommunityGalleryImageVersionsClient) listHandleResponse(resp *http.Response) (CommunityGalleryImageVersionsClientListResponse, error) {
+ result := CommunityGalleryImageVersionsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.CommunityGalleryImageVersionList); err != nil {
+ return CommunityGalleryImageVersionsClientListResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/constants.go
new file mode 100644
index 000000000..a34229a44
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/constants.go
@@ -0,0 +1,2830 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+const (
+ moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
+ moduleVersion = "v6.0.0"
+)
+
+type AccessLevel string
+
+const (
+ AccessLevelNone AccessLevel = "None"
+ AccessLevelRead AccessLevel = "Read"
+ AccessLevelWrite AccessLevel = "Write"
+)
+
+// PossibleAccessLevelValues returns the possible values for the AccessLevel const type.
+func PossibleAccessLevelValues() []AccessLevel {
+ return []AccessLevel{
+ AccessLevelNone,
+ AccessLevelRead,
+ AccessLevelWrite,
+ }
+}
+
+// AggregatedReplicationState - This is the aggregated replication status based on all the regional replication status flags.
+type AggregatedReplicationState string
+
+const (
+ AggregatedReplicationStateCompleted AggregatedReplicationState = "Completed"
+ AggregatedReplicationStateFailed AggregatedReplicationState = "Failed"
+ AggregatedReplicationStateInProgress AggregatedReplicationState = "InProgress"
+ AggregatedReplicationStateUnknown AggregatedReplicationState = "Unknown"
+)
+
+// PossibleAggregatedReplicationStateValues returns the possible values for the AggregatedReplicationState const type.
+func PossibleAggregatedReplicationStateValues() []AggregatedReplicationState {
+ return []AggregatedReplicationState{
+ AggregatedReplicationStateCompleted,
+ AggregatedReplicationStateFailed,
+ AggregatedReplicationStateInProgress,
+ AggregatedReplicationStateUnknown,
+ }
+}
+
+// AlternativeType - Describes the type of the alternative option.
+type AlternativeType string
+
+const (
+ AlternativeTypeNone AlternativeType = "None"
+ AlternativeTypeOffer AlternativeType = "Offer"
+ AlternativeTypePlan AlternativeType = "Plan"
+)
+
+// PossibleAlternativeTypeValues returns the possible values for the AlternativeType const type.
+func PossibleAlternativeTypeValues() []AlternativeType {
+ return []AlternativeType{
+ AlternativeTypeNone,
+ AlternativeTypeOffer,
+ AlternativeTypePlan,
+ }
+}
+
+// Architecture - The architecture of the image. Applicable to OS disks only.
+type Architecture string
+
+const (
+ ArchitectureArm64 Architecture = "Arm64"
+ ArchitectureX64 Architecture = "x64"
+)
+
+// PossibleArchitectureValues returns the possible values for the Architecture const type.
+func PossibleArchitectureValues() []Architecture {
+ return []Architecture{
+ ArchitectureArm64,
+ ArchitectureX64,
+ }
+}
+
+// ArchitectureTypes - Specifies the Architecture Type
+type ArchitectureTypes string
+
+const (
+ ArchitectureTypesArm64 ArchitectureTypes = "Arm64"
+ ArchitectureTypesX64 ArchitectureTypes = "x64"
+)
+
+// PossibleArchitectureTypesValues returns the possible values for the ArchitectureTypes const type.
+func PossibleArchitectureTypesValues() []ArchitectureTypes {
+ return []ArchitectureTypes{
+ ArchitectureTypesArm64,
+ ArchitectureTypesX64,
+ }
+}
+
+// AvailabilitySetSKUTypes - Specifies the sku of an Availability Set. Use 'Aligned' for virtual machines with managed disks
+// and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'.
+type AvailabilitySetSKUTypes string
+
+const (
+ AvailabilitySetSKUTypesAligned AvailabilitySetSKUTypes = "Aligned"
+ AvailabilitySetSKUTypesClassic AvailabilitySetSKUTypes = "Classic"
+)
+
+// PossibleAvailabilitySetSKUTypesValues returns the possible values for the AvailabilitySetSKUTypes const type.
+func PossibleAvailabilitySetSKUTypesValues() []AvailabilitySetSKUTypes {
+ return []AvailabilitySetSKUTypes{
+ AvailabilitySetSKUTypesAligned,
+ AvailabilitySetSKUTypesClassic,
+ }
+}
+
+// CachingTypes - Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are:
+// None for Standard storage. ReadOnly for Premium storage
+type CachingTypes string
+
+const (
+ CachingTypesNone CachingTypes = "None"
+ CachingTypesReadOnly CachingTypes = "ReadOnly"
+ CachingTypesReadWrite CachingTypes = "ReadWrite"
+)
+
+// PossibleCachingTypesValues returns the possible values for the CachingTypes const type.
+func PossibleCachingTypesValues() []CachingTypes {
+ return []CachingTypes{
+ CachingTypesNone,
+ CachingTypesReadOnly,
+ CachingTypesReadWrite,
+ }
+}
+
+type CapacityReservationGroupInstanceViewTypes string
+
+const (
+ CapacityReservationGroupInstanceViewTypesInstanceView CapacityReservationGroupInstanceViewTypes = "instanceView"
+)
+
+// PossibleCapacityReservationGroupInstanceViewTypesValues returns the possible values for the CapacityReservationGroupInstanceViewTypes const type.
+func PossibleCapacityReservationGroupInstanceViewTypesValues() []CapacityReservationGroupInstanceViewTypes {
+ return []CapacityReservationGroupInstanceViewTypes{
+ CapacityReservationGroupInstanceViewTypesInstanceView,
+ }
+}
+
+type CapacityReservationInstanceViewTypes string
+
+const (
+ CapacityReservationInstanceViewTypesInstanceView CapacityReservationInstanceViewTypes = "instanceView"
+)
+
+// PossibleCapacityReservationInstanceViewTypesValues returns the possible values for the CapacityReservationInstanceViewTypes const type.
+func PossibleCapacityReservationInstanceViewTypesValues() []CapacityReservationInstanceViewTypes {
+ return []CapacityReservationInstanceViewTypes{
+ CapacityReservationInstanceViewTypesInstanceView,
+ }
+}
+
+// CloudServiceSlotType - Slot type for the cloud service. Possible values are
+// Production
+// Staging
+// If not specified, the default value is Production.
+type CloudServiceSlotType string
+
+const (
+ CloudServiceSlotTypeProduction CloudServiceSlotType = "Production"
+ CloudServiceSlotTypeStaging CloudServiceSlotType = "Staging"
+)
+
+// PossibleCloudServiceSlotTypeValues returns the possible values for the CloudServiceSlotType const type.
+func PossibleCloudServiceSlotTypeValues() []CloudServiceSlotType {
+ return []CloudServiceSlotType{
+ CloudServiceSlotTypeProduction,
+ CloudServiceSlotTypeStaging,
+ }
+}
+
+// CloudServiceUpgradeMode - Update mode for the cloud service. Role instances are allocated to update domains when the service
+// is deployed. Updates can be initiated manually in each update domain or initiated automatically in
+// all update domains. Possible Values are
+// Auto
+// Manual
+// Simultaneous
+// If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If
+// set to Auto, the update is automatically applied to each update domain in
+// sequence.
+type CloudServiceUpgradeMode string
+
+const (
+ CloudServiceUpgradeModeAuto CloudServiceUpgradeMode = "Auto"
+ CloudServiceUpgradeModeManual CloudServiceUpgradeMode = "Manual"
+ CloudServiceUpgradeModeSimultaneous CloudServiceUpgradeMode = "Simultaneous"
+)
+
+// PossibleCloudServiceUpgradeModeValues returns the possible values for the CloudServiceUpgradeMode const type.
+func PossibleCloudServiceUpgradeModeValues() []CloudServiceUpgradeMode {
+ return []CloudServiceUpgradeMode{
+ CloudServiceUpgradeModeAuto,
+ CloudServiceUpgradeModeManual,
+ CloudServiceUpgradeModeSimultaneous,
+ }
+}
+
+// ConfidentialVMEncryptionType - confidential VM encryption types
+type ConfidentialVMEncryptionType string
+
+const (
+ ConfidentialVMEncryptionTypeEncryptedVMGuestStateOnlyWithPmk ConfidentialVMEncryptionType = "EncryptedVMGuestStateOnlyWithPmk"
+ ConfidentialVMEncryptionTypeEncryptedWithCmk ConfidentialVMEncryptionType = "EncryptedWithCmk"
+ ConfidentialVMEncryptionTypeEncryptedWithPmk ConfidentialVMEncryptionType = "EncryptedWithPmk"
+ ConfidentialVMEncryptionTypeNonPersistedTPM ConfidentialVMEncryptionType = "NonPersistedTPM"
+)
+
+// PossibleConfidentialVMEncryptionTypeValues returns the possible values for the ConfidentialVMEncryptionType const type.
+func PossibleConfidentialVMEncryptionTypeValues() []ConfidentialVMEncryptionType {
+ return []ConfidentialVMEncryptionType{
+ ConfidentialVMEncryptionTypeEncryptedVMGuestStateOnlyWithPmk,
+ ConfidentialVMEncryptionTypeEncryptedWithCmk,
+ ConfidentialVMEncryptionTypeEncryptedWithPmk,
+ ConfidentialVMEncryptionTypeNonPersistedTPM,
+ }
+}
+
+// ConsistencyModeTypes - ConsistencyMode of the RestorePoint. Can be specified in the input while creating a restore point.
+// For now, only CrashConsistent is accepted as a valid input. Please refer to
+// https://aka.ms/RestorePoints for more details.
+type ConsistencyModeTypes string
+
+const (
+ ConsistencyModeTypesApplicationConsistent ConsistencyModeTypes = "ApplicationConsistent"
+ ConsistencyModeTypesCrashConsistent ConsistencyModeTypes = "CrashConsistent"
+ ConsistencyModeTypesFileSystemConsistent ConsistencyModeTypes = "FileSystemConsistent"
+)
+
+// PossibleConsistencyModeTypesValues returns the possible values for the ConsistencyModeTypes const type.
+func PossibleConsistencyModeTypesValues() []ConsistencyModeTypes {
+ return []ConsistencyModeTypes{
+ ConsistencyModeTypesApplicationConsistent,
+ ConsistencyModeTypesCrashConsistent,
+ ConsistencyModeTypesFileSystemConsistent,
+ }
+}
+
+// CopyCompletionErrorReason - Indicates the error code if the background copy of a resource created via the CopyStart operation
+// fails.
+type CopyCompletionErrorReason string
+
+const (
+ // CopyCompletionErrorReasonCopySourceNotFound - Indicates that the source snapshot was deleted while the background copy
+ // of the resource created via CopyStart operation was in progress.
+ CopyCompletionErrorReasonCopySourceNotFound CopyCompletionErrorReason = "CopySourceNotFound"
+)
+
+// PossibleCopyCompletionErrorReasonValues returns the possible values for the CopyCompletionErrorReason const type.
+func PossibleCopyCompletionErrorReasonValues() []CopyCompletionErrorReason {
+ return []CopyCompletionErrorReason{
+ CopyCompletionErrorReasonCopySourceNotFound,
+ }
+}
+
+// DataAccessAuthMode - Additional authentication requirements when exporting or uploading to a disk or snapshot.
+type DataAccessAuthMode string
+
+const (
+ // DataAccessAuthModeAzureActiveDirectory - When export/upload URL is used, the system checks if the user has an identity
+ // in Azure Active Directory and has necessary permissions to export/upload the data. Please refer to aka.ms/DisksAzureADAuth.
+ DataAccessAuthModeAzureActiveDirectory DataAccessAuthMode = "AzureActiveDirectory"
+ // DataAccessAuthModeNone - No additional authentication would be performed when accessing export/upload URL.
+ DataAccessAuthModeNone DataAccessAuthMode = "None"
+)
+
+// PossibleDataAccessAuthModeValues returns the possible values for the DataAccessAuthMode const type.
+func PossibleDataAccessAuthModeValues() []DataAccessAuthMode {
+ return []DataAccessAuthMode{
+ DataAccessAuthModeAzureActiveDirectory,
+ DataAccessAuthModeNone,
+ }
+}
+
+// DedicatedHostLicenseTypes - Specifies the software license type that will be applied to the VMs deployed on the dedicated
+// host. Possible values are: None, WindowsServerHybrid, WindowsServerPerpetual. The default value is: None.
+type DedicatedHostLicenseTypes string
+
+const (
+ DedicatedHostLicenseTypesNone DedicatedHostLicenseTypes = "None"
+ DedicatedHostLicenseTypesWindowsServerHybrid DedicatedHostLicenseTypes = "Windows_Server_Hybrid"
+ DedicatedHostLicenseTypesWindowsServerPerpetual DedicatedHostLicenseTypes = "Windows_Server_Perpetual"
+)
+
+// PossibleDedicatedHostLicenseTypesValues returns the possible values for the DedicatedHostLicenseTypes const type.
+func PossibleDedicatedHostLicenseTypesValues() []DedicatedHostLicenseTypes {
+ return []DedicatedHostLicenseTypes{
+ DedicatedHostLicenseTypesNone,
+ DedicatedHostLicenseTypesWindowsServerHybrid,
+ DedicatedHostLicenseTypesWindowsServerPerpetual,
+ }
+}
+
+// DeleteOptions - Specify what happens to the network interface when the VM is deleted
+type DeleteOptions string
+
+const (
+ DeleteOptionsDelete DeleteOptions = "Delete"
+ DeleteOptionsDetach DeleteOptions = "Detach"
+)
+
+// PossibleDeleteOptionsValues returns the possible values for the DeleteOptions const type.
+func PossibleDeleteOptionsValues() []DeleteOptions {
+ return []DeleteOptions{
+ DeleteOptionsDelete,
+ DeleteOptionsDetach,
+ }
+}
+
+// DiffDiskOptions - Specifies the ephemeral disk option for operating system disk.
+type DiffDiskOptions string
+
+const (
+ DiffDiskOptionsLocal DiffDiskOptions = "Local"
+)
+
+// PossibleDiffDiskOptionsValues returns the possible values for the DiffDiskOptions const type.
+func PossibleDiffDiskOptionsValues() []DiffDiskOptions {
+ return []DiffDiskOptions{
+ DiffDiskOptionsLocal,
+ }
+}
+
+// DiffDiskPlacement - Specifies the ephemeral disk placement for operating system disk. This property can be used by user
+// in the request to choose the location i.e, cache disk, resource disk or nvme disk space for
+// Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer Ephemeral OS
+// disk size requirements for Windows VM at
+// https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VM at
+// https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. Minimum api-version for NvmeDisk:
+// 2024-03-01.
+type DiffDiskPlacement string
+
+const (
+ DiffDiskPlacementCacheDisk DiffDiskPlacement = "CacheDisk"
+ DiffDiskPlacementNvmeDisk DiffDiskPlacement = "NvmeDisk"
+ DiffDiskPlacementResourceDisk DiffDiskPlacement = "ResourceDisk"
+)
+
+// PossibleDiffDiskPlacementValues returns the possible values for the DiffDiskPlacement const type.
+func PossibleDiffDiskPlacementValues() []DiffDiskPlacement {
+ return []DiffDiskPlacement{
+ DiffDiskPlacementCacheDisk,
+ DiffDiskPlacementNvmeDisk,
+ DiffDiskPlacementResourceDisk,
+ }
+}
+
+// DiskControllerTypes - Specifies the disk controller type configured for the VM and VirtualMachineScaleSet. This property
+// is only supported for virtual machines whose operating system disk and VM sku supports Generation 2
+// (https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2), please check the HyperVGenerations capability returned
+// as part of VM sku capabilities in the response of Microsoft.Compute SKUs
+// api for the region contains V2 (https://docs.microsoft.com/rest/api/compute/resourceskus/list). For more information about
+// Disk Controller Types supported please refer to
+// https://aka.ms/azure-diskcontrollertypes.
+type DiskControllerTypes string
+
+const (
+ DiskControllerTypesNVMe DiskControllerTypes = "NVMe"
+ DiskControllerTypesSCSI DiskControllerTypes = "SCSI"
+)
+
+// PossibleDiskControllerTypesValues returns the possible values for the DiskControllerTypes const type.
+func PossibleDiskControllerTypesValues() []DiskControllerTypes {
+ return []DiskControllerTypes{
+ DiskControllerTypesNVMe,
+ DiskControllerTypesSCSI,
+ }
+}
+
+// DiskCreateOption - This enumerates the possible sources of a disk's creation.
+type DiskCreateOption string
+
+const (
+ // DiskCreateOptionAttach - Disk will be attached to a VM.
+ DiskCreateOptionAttach DiskCreateOption = "Attach"
+ // DiskCreateOptionCopy - Create a new disk or snapshot by copying from a disk or snapshot specified by the given sourceResourceId.
+ DiskCreateOptionCopy DiskCreateOption = "Copy"
+ // DiskCreateOptionCopyFromSanSnapshot - Create a new disk by exporting from elastic san volume snapshot
+ DiskCreateOptionCopyFromSanSnapshot DiskCreateOption = "CopyFromSanSnapshot"
+ // DiskCreateOptionCopyStart - Create a new disk by using a deep copy process, where the resource creation is considered complete
+ // only after all data has been copied from the source.
+ DiskCreateOptionCopyStart DiskCreateOption = "CopyStart"
+ // DiskCreateOptionEmpty - Create an empty data disk of a size given by diskSizeGB.
+ DiskCreateOptionEmpty DiskCreateOption = "Empty"
+ // DiskCreateOptionFromImage - Create a new disk from a platform image specified by the given imageReference or galleryImageReference.
+ DiskCreateOptionFromImage DiskCreateOption = "FromImage"
+ // DiskCreateOptionImport - Create a disk by importing from a blob specified by a sourceUri in a storage account specified
+ // by storageAccountId.
+ DiskCreateOptionImport DiskCreateOption = "Import"
+ // DiskCreateOptionImportSecure - Similar to Import create option. Create a new Trusted Launch VM or Confidential VM supported
+ // disk by importing additional blob for VM guest state specified by securityDataUri in storage account specified by storageAccountId
+ DiskCreateOptionImportSecure DiskCreateOption = "ImportSecure"
+ // DiskCreateOptionRestore - Create a new disk by copying from a backup recovery point.
+ DiskCreateOptionRestore DiskCreateOption = "Restore"
+ // DiskCreateOptionUpload - Create a new disk by obtaining a write token and using it to directly upload the contents of the
+ // disk.
+ DiskCreateOptionUpload DiskCreateOption = "Upload"
+ // DiskCreateOptionUploadPreparedSecure - Similar to Upload create option. Create a new Trusted Launch VM or Confidential
+ // VM supported disk and upload using write token in both disk and VM guest state
+ DiskCreateOptionUploadPreparedSecure DiskCreateOption = "UploadPreparedSecure"
+)
+
+// PossibleDiskCreateOptionValues returns the possible values for the DiskCreateOption const type.
+func PossibleDiskCreateOptionValues() []DiskCreateOption {
+ return []DiskCreateOption{
+ DiskCreateOptionAttach,
+ DiskCreateOptionCopy,
+ DiskCreateOptionCopyFromSanSnapshot,
+ DiskCreateOptionCopyStart,
+ DiskCreateOptionEmpty,
+ DiskCreateOptionFromImage,
+ DiskCreateOptionImport,
+ DiskCreateOptionImportSecure,
+ DiskCreateOptionRestore,
+ DiskCreateOptionUpload,
+ DiskCreateOptionUploadPreparedSecure,
+ }
+}
+
+// DiskCreateOptionTypes - Specifies how the virtual machine disk should be created. Possible values are Attach: This value
+// is used when you are using a specialized disk to create the virtual machine. FromImage: This value is
+// used when you are using an image to create the virtual machine. If you are using a platform image, you should also use
+// the imageReference element described above. If you are using a marketplace image,
+// you should also use the plan element previously described. Empty: This value is used when creating an empty data disk.
+// Copy: This value is used to create a data disk from a snapshot or another disk.
+// Restore: This value is used to create a data disk from a disk restore point.
+type DiskCreateOptionTypes string
+
+const (
+ DiskCreateOptionTypesAttach DiskCreateOptionTypes = "Attach"
+ DiskCreateOptionTypesCopy DiskCreateOptionTypes = "Copy"
+ DiskCreateOptionTypesEmpty DiskCreateOptionTypes = "Empty"
+ DiskCreateOptionTypesFromImage DiskCreateOptionTypes = "FromImage"
+ DiskCreateOptionTypesRestore DiskCreateOptionTypes = "Restore"
+)
+
+// PossibleDiskCreateOptionTypesValues returns the possible values for the DiskCreateOptionTypes const type.
+func PossibleDiskCreateOptionTypesValues() []DiskCreateOptionTypes {
+ return []DiskCreateOptionTypes{
+ DiskCreateOptionTypesAttach,
+ DiskCreateOptionTypesCopy,
+ DiskCreateOptionTypesEmpty,
+ DiskCreateOptionTypesFromImage,
+ DiskCreateOptionTypesRestore,
+ }
+}
+
+// DiskDeleteOptionTypes - Specifies the behavior of the managed disk when the VM gets deleted, for example whether the managed
+// disk is deleted or detached. Supported values are: Delete. If this value is used, the managed disk
+// is deleted when VM gets deleted. Detach. If this value is used, the managed disk is retained after VM gets deleted. Minimum
+// api-version: 2021-03-01.
+type DiskDeleteOptionTypes string
+
+const (
+ DiskDeleteOptionTypesDelete DiskDeleteOptionTypes = "Delete"
+ DiskDeleteOptionTypesDetach DiskDeleteOptionTypes = "Detach"
+)
+
+// PossibleDiskDeleteOptionTypesValues returns the possible values for the DiskDeleteOptionTypes const type.
+func PossibleDiskDeleteOptionTypesValues() []DiskDeleteOptionTypes {
+ return []DiskDeleteOptionTypes{
+ DiskDeleteOptionTypesDelete,
+ DiskDeleteOptionTypesDetach,
+ }
+}
+
+// DiskDetachOptionTypes - Specifies the detach behavior to be used while detaching a disk or which is already in the process
+// of detachment from the virtual machine. Supported values are: ForceDetach. detachOption: ForceDetach
+// is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an
+// unexpected failure from the virtual machine and the disk is still not released
+// then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed
+// when using this detach behavior. This feature is still in preview mode and
+// is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting
+// detachOption: 'ForceDetach'.
+type DiskDetachOptionTypes string
+
+const (
+ DiskDetachOptionTypesForceDetach DiskDetachOptionTypes = "ForceDetach"
+)
+
+// PossibleDiskDetachOptionTypesValues returns the possible values for the DiskDetachOptionTypes const type.
+func PossibleDiskDetachOptionTypesValues() []DiskDetachOptionTypes {
+ return []DiskDetachOptionTypes{
+ DiskDetachOptionTypesForceDetach,
+ }
+}
+
+// DiskEncryptionSetIdentityType - The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported
+// for new creations. Disk Encryption Sets can be updated with Identity type None during migration of
+// subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys.
+type DiskEncryptionSetIdentityType string
+
+const (
+ DiskEncryptionSetIdentityTypeNone DiskEncryptionSetIdentityType = "None"
+ DiskEncryptionSetIdentityTypeSystemAssigned DiskEncryptionSetIdentityType = "SystemAssigned"
+ DiskEncryptionSetIdentityTypeSystemAssignedUserAssigned DiskEncryptionSetIdentityType = "SystemAssigned, UserAssigned"
+ DiskEncryptionSetIdentityTypeUserAssigned DiskEncryptionSetIdentityType = "UserAssigned"
+)
+
+// PossibleDiskEncryptionSetIdentityTypeValues returns the possible values for the DiskEncryptionSetIdentityType const type.
+func PossibleDiskEncryptionSetIdentityTypeValues() []DiskEncryptionSetIdentityType {
+ return []DiskEncryptionSetIdentityType{
+ DiskEncryptionSetIdentityTypeNone,
+ DiskEncryptionSetIdentityTypeSystemAssigned,
+ DiskEncryptionSetIdentityTypeSystemAssignedUserAssigned,
+ DiskEncryptionSetIdentityTypeUserAssigned,
+ }
+}
+
+// DiskEncryptionSetType - The type of key used to encrypt the data of the disk.
+type DiskEncryptionSetType string
+
+const (
+ // DiskEncryptionSetTypeConfidentialVMEncryptedWithCustomerKey - Confidential VM supported disk and VM guest state would be
+ // encrypted with customer managed key.
+ DiskEncryptionSetTypeConfidentialVMEncryptedWithCustomerKey DiskEncryptionSetType = "ConfidentialVmEncryptedWithCustomerKey"
+ // DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey - Resource using diskEncryptionSet would be encrypted at rest with
+ // Customer managed key that can be changed and revoked by a customer.
+ DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey DiskEncryptionSetType = "EncryptionAtRestWithCustomerKey"
+ // DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys - Resource using diskEncryptionSet would be encrypted
+ // at rest with two layers of encryption. One of the keys is Customer managed and the other key is Platform managed.
+ DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys DiskEncryptionSetType = "EncryptionAtRestWithPlatformAndCustomerKeys"
+)
+
+// PossibleDiskEncryptionSetTypeValues returns the possible values for the DiskEncryptionSetType const type.
+func PossibleDiskEncryptionSetTypeValues() []DiskEncryptionSetType {
+ return []DiskEncryptionSetType{
+ DiskEncryptionSetTypeConfidentialVMEncryptedWithCustomerKey,
+ DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey,
+ DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys,
+ }
+}
+
+// DiskSecurityTypes - Specifies the SecurityType of the VM. Applicable for OS disks only.
+type DiskSecurityTypes string
+
+const (
+ // DiskSecurityTypesConfidentialVMDiskEncryptedWithCustomerKey - Indicates Confidential VM disk with both OS disk and VM guest
+ // state encrypted with a customer managed key
+ DiskSecurityTypesConfidentialVMDiskEncryptedWithCustomerKey DiskSecurityTypes = "ConfidentialVM_DiskEncryptedWithCustomerKey"
+ // DiskSecurityTypesConfidentialVMDiskEncryptedWithPlatformKey - Indicates Confidential VM disk with both OS disk and VM guest
+ // state encrypted with a platform managed key
+ DiskSecurityTypesConfidentialVMDiskEncryptedWithPlatformKey DiskSecurityTypes = "ConfidentialVM_DiskEncryptedWithPlatformKey"
+ // DiskSecurityTypesConfidentialVMNonPersistedTPM - Indicates Confidential VM disk with a ephemeral vTPM. vTPM state is not
+ // persisted across VM reboots.
+ DiskSecurityTypesConfidentialVMNonPersistedTPM DiskSecurityTypes = "ConfidentialVM_NonPersistedTPM"
+ // DiskSecurityTypesConfidentialVMVmguestStateOnlyEncryptedWithPlatformKey - Indicates Confidential VM disk with only VM guest
+ // state encrypted
+ DiskSecurityTypesConfidentialVMVmguestStateOnlyEncryptedWithPlatformKey DiskSecurityTypes = "ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey"
+ // DiskSecurityTypesTrustedLaunch - Trusted Launch provides security features such as secure boot and virtual Trusted Platform
+ // Module (vTPM)
+ DiskSecurityTypesTrustedLaunch DiskSecurityTypes = "TrustedLaunch"
+)
+
+// PossibleDiskSecurityTypesValues returns the possible values for the DiskSecurityTypes const type.
+func PossibleDiskSecurityTypesValues() []DiskSecurityTypes {
+ return []DiskSecurityTypes{
+ DiskSecurityTypesConfidentialVMDiskEncryptedWithCustomerKey,
+ DiskSecurityTypesConfidentialVMDiskEncryptedWithPlatformKey,
+ DiskSecurityTypesConfidentialVMNonPersistedTPM,
+ DiskSecurityTypesConfidentialVMVmguestStateOnlyEncryptedWithPlatformKey,
+ DiskSecurityTypesTrustedLaunch,
+ }
+}
+
+// DiskState - This enumerates the possible state of the disk.
+type DiskState string
+
+const (
+ // DiskStateActiveSAS - The disk currently has an Active SAS Uri associated with it.
+ DiskStateActiveSAS DiskState = "ActiveSAS"
+ // DiskStateActiveSASFrozen - The disk is attached to a VM in hibernated state and has an active SAS URI associated with it.
+ DiskStateActiveSASFrozen DiskState = "ActiveSASFrozen"
+ // DiskStateActiveUpload - A disk is created for upload and a write token has been issued for uploading to it.
+ DiskStateActiveUpload DiskState = "ActiveUpload"
+ // DiskStateAttached - The disk is currently attached to a running VM.
+ DiskStateAttached DiskState = "Attached"
+ // DiskStateFrozen - The disk is attached to a VM which is in hibernated state.
+ DiskStateFrozen DiskState = "Frozen"
+ // DiskStateReadyToUpload - A disk is ready to be created by upload by requesting a write token.
+ DiskStateReadyToUpload DiskState = "ReadyToUpload"
+ // DiskStateReserved - The disk is attached to a stopped-deallocated VM.
+ DiskStateReserved DiskState = "Reserved"
+ // DiskStateUnattached - The disk is not being used and can be attached to a VM.
+ DiskStateUnattached DiskState = "Unattached"
+)
+
+// PossibleDiskStateValues returns the possible values for the DiskState const type.
+func PossibleDiskStateValues() []DiskState {
+ return []DiskState{
+ DiskStateActiveSAS,
+ DiskStateActiveSASFrozen,
+ DiskStateActiveUpload,
+ DiskStateAttached,
+ DiskStateFrozen,
+ DiskStateReadyToUpload,
+ DiskStateReserved,
+ DiskStateUnattached,
+ }
+}
+
+// DiskStorageAccountTypes - The sku name.
+type DiskStorageAccountTypes string
+
+const (
+ // DiskStorageAccountTypesPremiumLRS - Premium SSD locally redundant storage. Best for production and performance sensitive
+ // workloads.
+ DiskStorageAccountTypesPremiumLRS DiskStorageAccountTypes = "Premium_LRS"
+ // DiskStorageAccountTypesPremiumV2LRS - Premium SSD v2 locally redundant storage. Best for production and performance-sensitive
+ // workloads that consistently require low latency and high IOPS and throughput.
+ DiskStorageAccountTypesPremiumV2LRS DiskStorageAccountTypes = "PremiumV2_LRS"
+ // DiskStorageAccountTypesPremiumZRS - Premium SSD zone redundant storage. Best for the production workloads that need storage
+ // resiliency against zone failures.
+ DiskStorageAccountTypesPremiumZRS DiskStorageAccountTypes = "Premium_ZRS"
+ // DiskStorageAccountTypesStandardLRS - Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent
+ // access.
+ DiskStorageAccountTypesStandardLRS DiskStorageAccountTypes = "Standard_LRS"
+ // DiskStorageAccountTypesStandardSSDLRS - Standard SSD locally redundant storage. Best for web servers, lightly used enterprise
+ // applications and dev/test.
+ DiskStorageAccountTypesStandardSSDLRS DiskStorageAccountTypes = "StandardSSD_LRS"
+ // DiskStorageAccountTypesStandardSSDZRS - Standard SSD zone redundant storage. Best for web servers, lightly used enterprise
+ // applications and dev/test that need storage resiliency against zone failures.
+ DiskStorageAccountTypesStandardSSDZRS DiskStorageAccountTypes = "StandardSSD_ZRS"
+ // DiskStorageAccountTypesUltraSSDLRS - Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA,
+ // top tier databases (for example, SQL, Oracle), and other transaction-heavy workloads.
+ DiskStorageAccountTypesUltraSSDLRS DiskStorageAccountTypes = "UltraSSD_LRS"
+)
+
+// PossibleDiskStorageAccountTypesValues returns the possible values for the DiskStorageAccountTypes const type.
+func PossibleDiskStorageAccountTypesValues() []DiskStorageAccountTypes {
+ return []DiskStorageAccountTypes{
+ DiskStorageAccountTypesPremiumLRS,
+ DiskStorageAccountTypesPremiumV2LRS,
+ DiskStorageAccountTypesPremiumZRS,
+ DiskStorageAccountTypesStandardLRS,
+ DiskStorageAccountTypesStandardSSDLRS,
+ DiskStorageAccountTypesStandardSSDZRS,
+ DiskStorageAccountTypesUltraSSDLRS,
+ }
+}
+
+// DomainNameLabelScopeTypes - The Domain name label scope.The concatenation of the hashed domain name label that generated
+// according to the policy from domain name label scope and vm index will be the domain name labels of the
+// PublicIPAddress resources that will be created
+type DomainNameLabelScopeTypes string
+
+const (
+ DomainNameLabelScopeTypesNoReuse DomainNameLabelScopeTypes = "NoReuse"
+ DomainNameLabelScopeTypesResourceGroupReuse DomainNameLabelScopeTypes = "ResourceGroupReuse"
+ DomainNameLabelScopeTypesSubscriptionReuse DomainNameLabelScopeTypes = "SubscriptionReuse"
+ DomainNameLabelScopeTypesTenantReuse DomainNameLabelScopeTypes = "TenantReuse"
+)
+
+// PossibleDomainNameLabelScopeTypesValues returns the possible values for the DomainNameLabelScopeTypes const type.
+func PossibleDomainNameLabelScopeTypesValues() []DomainNameLabelScopeTypes {
+ return []DomainNameLabelScopeTypes{
+ DomainNameLabelScopeTypesNoReuse,
+ DomainNameLabelScopeTypesResourceGroupReuse,
+ DomainNameLabelScopeTypesSubscriptionReuse,
+ DomainNameLabelScopeTypesTenantReuse,
+ }
+}
+
+// EdgeZoneStorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable.
+type EdgeZoneStorageAccountType string
+
+const (
+ EdgeZoneStorageAccountTypePremiumLRS EdgeZoneStorageAccountType = "Premium_LRS"
+ EdgeZoneStorageAccountTypeStandardLRS EdgeZoneStorageAccountType = "Standard_LRS"
+ EdgeZoneStorageAccountTypeStandardSSDLRS EdgeZoneStorageAccountType = "StandardSSD_LRS"
+ EdgeZoneStorageAccountTypeStandardZRS EdgeZoneStorageAccountType = "Standard_ZRS"
+)
+
+// PossibleEdgeZoneStorageAccountTypeValues returns the possible values for the EdgeZoneStorageAccountType const type.
+func PossibleEdgeZoneStorageAccountTypeValues() []EdgeZoneStorageAccountType {
+ return []EdgeZoneStorageAccountType{
+ EdgeZoneStorageAccountTypePremiumLRS,
+ EdgeZoneStorageAccountTypeStandardLRS,
+ EdgeZoneStorageAccountTypeStandardSSDLRS,
+ EdgeZoneStorageAccountTypeStandardZRS,
+ }
+}
+
+// EncryptionType - The type of key used to encrypt the data of the disk.
+type EncryptionType string
+
+const (
+ // EncryptionTypeEncryptionAtRestWithCustomerKey - Disk is encrypted at rest with Customer managed key that can be changed
+ // and revoked by a customer.
+ EncryptionTypeEncryptionAtRestWithCustomerKey EncryptionType = "EncryptionAtRestWithCustomerKey"
+ // EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys - Disk is encrypted at rest with 2 layers of encryption. One
+ // of the keys is Customer managed and the other key is Platform managed.
+ EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys EncryptionType = "EncryptionAtRestWithPlatformAndCustomerKeys"
+ // EncryptionTypeEncryptionAtRestWithPlatformKey - Disk is encrypted at rest with Platform managed key. It is the default
+ // encryption type. This is not a valid encryption type for disk encryption sets.
+ EncryptionTypeEncryptionAtRestWithPlatformKey EncryptionType = "EncryptionAtRestWithPlatformKey"
+)
+
+// PossibleEncryptionTypeValues returns the possible values for the EncryptionType const type.
+func PossibleEncryptionTypeValues() []EncryptionType {
+ return []EncryptionType{
+ EncryptionTypeEncryptionAtRestWithCustomerKey,
+ EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys,
+ EncryptionTypeEncryptionAtRestWithPlatformKey,
+ }
+}
+
+// ExecutionState - Script execution status.
+type ExecutionState string
+
+const (
+ ExecutionStateCanceled ExecutionState = "Canceled"
+ ExecutionStateFailed ExecutionState = "Failed"
+ ExecutionStatePending ExecutionState = "Pending"
+ ExecutionStateRunning ExecutionState = "Running"
+ ExecutionStateSucceeded ExecutionState = "Succeeded"
+ ExecutionStateTimedOut ExecutionState = "TimedOut"
+ ExecutionStateUnknown ExecutionState = "Unknown"
+)
+
+// PossibleExecutionStateValues returns the possible values for the ExecutionState const type.
+func PossibleExecutionStateValues() []ExecutionState {
+ return []ExecutionState{
+ ExecutionStateCanceled,
+ ExecutionStateFailed,
+ ExecutionStatePending,
+ ExecutionStateRunning,
+ ExecutionStateSucceeded,
+ ExecutionStateTimedOut,
+ ExecutionStateUnknown,
+ }
+}
+
+type ExpandTypeForListVMs string
+
+const (
+ ExpandTypeForListVMsInstanceView ExpandTypeForListVMs = "instanceView"
+)
+
+// PossibleExpandTypeForListVMsValues returns the possible values for the ExpandTypeForListVMs const type.
+func PossibleExpandTypeForListVMsValues() []ExpandTypeForListVMs {
+ return []ExpandTypeForListVMs{
+ ExpandTypeForListVMsInstanceView,
+ }
+}
+
+type ExpandTypesForGetCapacityReservationGroups string
+
+const (
+ ExpandTypesForGetCapacityReservationGroupsVirtualMachineScaleSetVMsRef ExpandTypesForGetCapacityReservationGroups = "virtualMachineScaleSetVMs/$ref"
+ ExpandTypesForGetCapacityReservationGroupsVirtualMachinesRef ExpandTypesForGetCapacityReservationGroups = "virtualMachines/$ref"
+)
+
+// PossibleExpandTypesForGetCapacityReservationGroupsValues returns the possible values for the ExpandTypesForGetCapacityReservationGroups const type.
+func PossibleExpandTypesForGetCapacityReservationGroupsValues() []ExpandTypesForGetCapacityReservationGroups {
+ return []ExpandTypesForGetCapacityReservationGroups{
+ ExpandTypesForGetCapacityReservationGroupsVirtualMachineScaleSetVMsRef,
+ ExpandTypesForGetCapacityReservationGroupsVirtualMachinesRef,
+ }
+}
+
+type ExpandTypesForGetVMScaleSets string
+
+const (
+ ExpandTypesForGetVMScaleSetsUserData ExpandTypesForGetVMScaleSets = "userData"
+)
+
+// PossibleExpandTypesForGetVMScaleSetsValues returns the possible values for the ExpandTypesForGetVMScaleSets const type.
+func PossibleExpandTypesForGetVMScaleSetsValues() []ExpandTypesForGetVMScaleSets {
+ return []ExpandTypesForGetVMScaleSets{
+ ExpandTypesForGetVMScaleSetsUserData,
+ }
+}
+
+type ExpandTypesForListVMs string
+
+const (
+ ExpandTypesForListVMsInstanceView ExpandTypesForListVMs = "instanceView"
+)
+
+// PossibleExpandTypesForListVMsValues returns the possible values for the ExpandTypesForListVMs const type.
+func PossibleExpandTypesForListVMsValues() []ExpandTypesForListVMs {
+ return []ExpandTypesForListVMs{
+ ExpandTypesForListVMsInstanceView,
+ }
+}
+
+// ExtendedLocationType - The type of the extended location.
+type ExtendedLocationType string
+
+const (
+ ExtendedLocationTypeEdgeZone ExtendedLocationType = "EdgeZone"
+)
+
+// PossibleExtendedLocationTypeValues returns the possible values for the ExtendedLocationType const type.
+func PossibleExtendedLocationTypeValues() []ExtendedLocationType {
+ return []ExtendedLocationType{
+ ExtendedLocationTypeEdgeZone,
+ }
+}
+
+// ExtendedLocationTypes - The type of extendedLocation.
+type ExtendedLocationTypes string
+
+const (
+ ExtendedLocationTypesEdgeZone ExtendedLocationTypes = "EdgeZone"
+)
+
+// PossibleExtendedLocationTypesValues returns the possible values for the ExtendedLocationTypes const type.
+func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes {
+ return []ExtendedLocationTypes{
+ ExtendedLocationTypesEdgeZone,
+ }
+}
+
+// FileFormat - Used to specify the file format when making request for SAS on a VHDX file format snapshot
+type FileFormat string
+
+const (
+ // FileFormatVHD - A VHD file is a disk image file in the Virtual Hard Disk file format.
+ FileFormatVHD FileFormat = "VHD"
+ // FileFormatVHDX - A VHDX file is a disk image file in the Virtual Hard Disk v2 file format.
+ FileFormatVHDX FileFormat = "VHDX"
+)
+
+// PossibleFileFormatValues returns the possible values for the FileFormat const type.
+func PossibleFileFormatValues() []FileFormat {
+ return []FileFormat{
+ FileFormatVHD,
+ FileFormatVHDX,
+ }
+}
+
+// GalleryApplicationCustomActionParameterType - Specifies the type of the custom action parameter. Possible values are: String,
+// ConfigurationDataBlob or LogOutputBlob
+type GalleryApplicationCustomActionParameterType string
+
+const (
+ GalleryApplicationCustomActionParameterTypeConfigurationDataBlob GalleryApplicationCustomActionParameterType = "ConfigurationDataBlob"
+ GalleryApplicationCustomActionParameterTypeLogOutputBlob GalleryApplicationCustomActionParameterType = "LogOutputBlob"
+ GalleryApplicationCustomActionParameterTypeString GalleryApplicationCustomActionParameterType = "String"
+)
+
+// PossibleGalleryApplicationCustomActionParameterTypeValues returns the possible values for the GalleryApplicationCustomActionParameterType const type.
+func PossibleGalleryApplicationCustomActionParameterTypeValues() []GalleryApplicationCustomActionParameterType {
+ return []GalleryApplicationCustomActionParameterType{
+ GalleryApplicationCustomActionParameterTypeConfigurationDataBlob,
+ GalleryApplicationCustomActionParameterTypeLogOutputBlob,
+ GalleryApplicationCustomActionParameterTypeString,
+ }
+}
+
+type GalleryExpandParams string
+
+const (
+ GalleryExpandParamsSharingProfileGroups GalleryExpandParams = "SharingProfile/Groups"
+)
+
+// PossibleGalleryExpandParamsValues returns the possible values for the GalleryExpandParams const type.
+func PossibleGalleryExpandParamsValues() []GalleryExpandParams {
+ return []GalleryExpandParams{
+ GalleryExpandParamsSharingProfileGroups,
+ }
+}
+
+// GalleryExtendedLocationType - It is type of the extended location.
+type GalleryExtendedLocationType string
+
+const (
+ GalleryExtendedLocationTypeEdgeZone GalleryExtendedLocationType = "EdgeZone"
+ GalleryExtendedLocationTypeUnknown GalleryExtendedLocationType = "Unknown"
+)
+
+// PossibleGalleryExtendedLocationTypeValues returns the possible values for the GalleryExtendedLocationType const type.
+func PossibleGalleryExtendedLocationTypeValues() []GalleryExtendedLocationType {
+ return []GalleryExtendedLocationType{
+ GalleryExtendedLocationTypeEdgeZone,
+ GalleryExtendedLocationTypeUnknown,
+ }
+}
+
+// GalleryProvisioningState - The provisioning state, which only appears in the response.
+type GalleryProvisioningState string
+
+const (
+ GalleryProvisioningStateCreating GalleryProvisioningState = "Creating"
+ GalleryProvisioningStateDeleting GalleryProvisioningState = "Deleting"
+ GalleryProvisioningStateFailed GalleryProvisioningState = "Failed"
+ GalleryProvisioningStateMigrating GalleryProvisioningState = "Migrating"
+ GalleryProvisioningStateSucceeded GalleryProvisioningState = "Succeeded"
+ GalleryProvisioningStateUpdating GalleryProvisioningState = "Updating"
+)
+
+// PossibleGalleryProvisioningStateValues returns the possible values for the GalleryProvisioningState const type.
+func PossibleGalleryProvisioningStateValues() []GalleryProvisioningState {
+ return []GalleryProvisioningState{
+ GalleryProvisioningStateCreating,
+ GalleryProvisioningStateDeleting,
+ GalleryProvisioningStateFailed,
+ GalleryProvisioningStateMigrating,
+ GalleryProvisioningStateSucceeded,
+ GalleryProvisioningStateUpdating,
+ }
+}
+
+// GallerySharingPermissionTypes - This property allows you to specify the permission of sharing gallery. Possible values
+// are: Private, Groups, Community.
+type GallerySharingPermissionTypes string
+
+const (
+ GallerySharingPermissionTypesCommunity GallerySharingPermissionTypes = "Community"
+ GallerySharingPermissionTypesGroups GallerySharingPermissionTypes = "Groups"
+ GallerySharingPermissionTypesPrivate GallerySharingPermissionTypes = "Private"
+)
+
+// PossibleGallerySharingPermissionTypesValues returns the possible values for the GallerySharingPermissionTypes const type.
+func PossibleGallerySharingPermissionTypesValues() []GallerySharingPermissionTypes {
+ return []GallerySharingPermissionTypes{
+ GallerySharingPermissionTypesCommunity,
+ GallerySharingPermissionTypesGroups,
+ GallerySharingPermissionTypesPrivate,
+ }
+}
+
+// HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
+type HostCaching string
+
+const (
+ HostCachingNone HostCaching = "None"
+ HostCachingReadOnly HostCaching = "ReadOnly"
+ HostCachingReadWrite HostCaching = "ReadWrite"
+)
+
+// PossibleHostCachingValues returns the possible values for the HostCaching const type.
+func PossibleHostCachingValues() []HostCaching {
+ return []HostCaching{
+ HostCachingNone,
+ HostCachingReadOnly,
+ HostCachingReadWrite,
+ }
+}
+
+// HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
+type HyperVGeneration string
+
+const (
+ HyperVGenerationV1 HyperVGeneration = "V1"
+ HyperVGenerationV2 HyperVGeneration = "V2"
+)
+
+// PossibleHyperVGenerationValues returns the possible values for the HyperVGeneration const type.
+func PossibleHyperVGenerationValues() []HyperVGeneration {
+ return []HyperVGeneration{
+ HyperVGenerationV1,
+ HyperVGenerationV2,
+ }
+}
+
+// HyperVGenerationType - Specifies the HyperVGeneration Type associated with a resource
+type HyperVGenerationType string
+
+const (
+ HyperVGenerationTypeV1 HyperVGenerationType = "V1"
+ HyperVGenerationTypeV2 HyperVGenerationType = "V2"
+)
+
+// PossibleHyperVGenerationTypeValues returns the possible values for the HyperVGenerationType const type.
+func PossibleHyperVGenerationTypeValues() []HyperVGenerationType {
+ return []HyperVGenerationType{
+ HyperVGenerationTypeV1,
+ HyperVGenerationTypeV2,
+ }
+}
+
+// HyperVGenerationTypes - Specifies the HyperVGeneration Type
+type HyperVGenerationTypes string
+
+const (
+ HyperVGenerationTypesV1 HyperVGenerationTypes = "V1"
+ HyperVGenerationTypesV2 HyperVGenerationTypes = "V2"
+)
+
+// PossibleHyperVGenerationTypesValues returns the possible values for the HyperVGenerationTypes const type.
+func PossibleHyperVGenerationTypesValues() []HyperVGenerationTypes {
+ return []HyperVGenerationTypes{
+ HyperVGenerationTypesV1,
+ HyperVGenerationTypesV2,
+ }
+}
+
+// IPVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or
+// IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+type IPVersion string
+
+const (
+ IPVersionIPv4 IPVersion = "IPv4"
+ IPVersionIPv6 IPVersion = "IPv6"
+)
+
+// PossibleIPVersionValues returns the possible values for the IPVersion const type.
+func PossibleIPVersionValues() []IPVersion {
+ return []IPVersion{
+ IPVersionIPv4,
+ IPVersionIPv6,
+ }
+}
+
+// IPVersions - Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4
+// or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+type IPVersions string
+
+const (
+ IPVersionsIPv4 IPVersions = "IPv4"
+ IPVersionsIPv6 IPVersions = "IPv6"
+)
+
+// PossibleIPVersionsValues returns the possible values for the IPVersions const type.
+func PossibleIPVersionsValues() []IPVersions {
+ return []IPVersions{
+ IPVersionsIPv4,
+ IPVersionsIPv6,
+ }
+}
+
+// ImageState - Describes the state of the image.
+type ImageState string
+
+const (
+ ImageStateActive ImageState = "Active"
+ ImageStateDeprecated ImageState = "Deprecated"
+ ImageStateScheduledForDeprecation ImageState = "ScheduledForDeprecation"
+)
+
+// PossibleImageStateValues returns the possible values for the ImageState const type.
+func PossibleImageStateValues() []ImageState {
+ return []ImageState{
+ ImageStateActive,
+ ImageStateDeprecated,
+ ImageStateScheduledForDeprecation,
+ }
+}
+
+type InstanceViewTypes string
+
+const (
+ InstanceViewTypesInstanceView InstanceViewTypes = "instanceView"
+ InstanceViewTypesUserData InstanceViewTypes = "userData"
+)
+
+// PossibleInstanceViewTypesValues returns the possible values for the InstanceViewTypes const type.
+func PossibleInstanceViewTypesValues() []InstanceViewTypes {
+ return []InstanceViewTypes{
+ InstanceViewTypesInstanceView,
+ InstanceViewTypesUserData,
+ }
+}
+
+// IntervalInMins - Interval value in minutes used to create LogAnalytics call rate logs.
+type IntervalInMins string
+
+const (
+ IntervalInMinsFiveMins IntervalInMins = "FiveMins"
+ IntervalInMinsSixtyMins IntervalInMins = "SixtyMins"
+ IntervalInMinsThirtyMins IntervalInMins = "ThirtyMins"
+ IntervalInMinsThreeMins IntervalInMins = "ThreeMins"
+)
+
+// PossibleIntervalInMinsValues returns the possible values for the IntervalInMins const type.
+func PossibleIntervalInMinsValues() []IntervalInMins {
+ return []IntervalInMins{
+ IntervalInMinsFiveMins,
+ IntervalInMinsSixtyMins,
+ IntervalInMinsThirtyMins,
+ IntervalInMinsThreeMins,
+ }
+}
+
+// LinuxPatchAssessmentMode - Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.
+// Possible values are:
+// ImageDefault - You control the timing of patch assessments on a virtual machine.
+// AutomaticByPlatform - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.
+type LinuxPatchAssessmentMode string
+
+const (
+ LinuxPatchAssessmentModeAutomaticByPlatform LinuxPatchAssessmentMode = "AutomaticByPlatform"
+ LinuxPatchAssessmentModeImageDefault LinuxPatchAssessmentMode = "ImageDefault"
+)
+
+// PossibleLinuxPatchAssessmentModeValues returns the possible values for the LinuxPatchAssessmentMode const type.
+func PossibleLinuxPatchAssessmentModeValues() []LinuxPatchAssessmentMode {
+ return []LinuxPatchAssessmentMode{
+ LinuxPatchAssessmentModeAutomaticByPlatform,
+ LinuxPatchAssessmentModeImageDefault,
+ }
+}
+
+// LinuxVMGuestPatchAutomaticByPlatformRebootSetting - Specifies the reboot setting for all AutomaticByPlatform patch installation
+// operations.
+type LinuxVMGuestPatchAutomaticByPlatformRebootSetting string
+
+const (
+ LinuxVMGuestPatchAutomaticByPlatformRebootSettingAlways LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Always"
+ LinuxVMGuestPatchAutomaticByPlatformRebootSettingIfRequired LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "IfRequired"
+ LinuxVMGuestPatchAutomaticByPlatformRebootSettingNever LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Never"
+ LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown LinuxVMGuestPatchAutomaticByPlatformRebootSetting = "Unknown"
+)
+
+// PossibleLinuxVMGuestPatchAutomaticByPlatformRebootSettingValues returns the possible values for the LinuxVMGuestPatchAutomaticByPlatformRebootSetting const type.
+func PossibleLinuxVMGuestPatchAutomaticByPlatformRebootSettingValues() []LinuxVMGuestPatchAutomaticByPlatformRebootSetting {
+ return []LinuxVMGuestPatchAutomaticByPlatformRebootSetting{
+ LinuxVMGuestPatchAutomaticByPlatformRebootSettingAlways,
+ LinuxVMGuestPatchAutomaticByPlatformRebootSettingIfRequired,
+ LinuxVMGuestPatchAutomaticByPlatformRebootSettingNever,
+ LinuxVMGuestPatchAutomaticByPlatformRebootSettingUnknown,
+ }
+}
+
+// LinuxVMGuestPatchMode - Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated
+// to virtual machine scale set with OrchestrationMode as Flexible.
+// Possible values are:
+// ImageDefault - The virtual machine's default patching configuration is used.
+// AutomaticByPlatform - The virtual machine will be automatically updated by the platform. The property provisionVMAgent
+// must be true
+type LinuxVMGuestPatchMode string
+
+const (
+ LinuxVMGuestPatchModeAutomaticByPlatform LinuxVMGuestPatchMode = "AutomaticByPlatform"
+ LinuxVMGuestPatchModeImageDefault LinuxVMGuestPatchMode = "ImageDefault"
+)
+
+// PossibleLinuxVMGuestPatchModeValues returns the possible values for the LinuxVMGuestPatchMode const type.
+func PossibleLinuxVMGuestPatchModeValues() []LinuxVMGuestPatchMode {
+ return []LinuxVMGuestPatchMode{
+ LinuxVMGuestPatchModeAutomaticByPlatform,
+ LinuxVMGuestPatchModeImageDefault,
+ }
+}
+
+// MaintenanceOperationResultCodeTypes - The Last Maintenance Operation Result Code.
+type MaintenanceOperationResultCodeTypes string
+
+const (
+ MaintenanceOperationResultCodeTypesMaintenanceAborted MaintenanceOperationResultCodeTypes = "MaintenanceAborted"
+ MaintenanceOperationResultCodeTypesMaintenanceCompleted MaintenanceOperationResultCodeTypes = "MaintenanceCompleted"
+ MaintenanceOperationResultCodeTypesNone MaintenanceOperationResultCodeTypes = "None"
+ MaintenanceOperationResultCodeTypesRetryLater MaintenanceOperationResultCodeTypes = "RetryLater"
+)
+
+// PossibleMaintenanceOperationResultCodeTypesValues returns the possible values for the MaintenanceOperationResultCodeTypes const type.
+func PossibleMaintenanceOperationResultCodeTypesValues() []MaintenanceOperationResultCodeTypes {
+ return []MaintenanceOperationResultCodeTypes{
+ MaintenanceOperationResultCodeTypesMaintenanceAborted,
+ MaintenanceOperationResultCodeTypesMaintenanceCompleted,
+ MaintenanceOperationResultCodeTypesNone,
+ MaintenanceOperationResultCodeTypesRetryLater,
+ }
+}
+
+// Mode - Specifies the mode that ProxyAgent will execute on if the feature is enabled. ProxyAgent will start to audit or
+// monitor but not enforce access control over requests to host endpoints in Audit mode,
+// while in Enforce mode it will enforce access control. The default value is Enforce mode.
+type Mode string
+
+const (
+ ModeAudit Mode = "Audit"
+ ModeEnforce Mode = "Enforce"
+)
+
+// PossibleModeValues returns the possible values for the Mode const type.
+func PossibleModeValues() []Mode {
+ return []Mode{
+ ModeAudit,
+ ModeEnforce,
+ }
+}
+
+// NetworkAPIVersion - specifies the Microsoft.Network API version used when creating networking resources in the Network
+// Interface Configurations
+type NetworkAPIVersion string
+
+const (
+ NetworkAPIVersionTwoThousandTwenty1101 NetworkAPIVersion = "2020-11-01"
+)
+
+// PossibleNetworkAPIVersionValues returns the possible values for the NetworkAPIVersion const type.
+func PossibleNetworkAPIVersionValues() []NetworkAPIVersion {
+ return []NetworkAPIVersion{
+ NetworkAPIVersionTwoThousandTwenty1101,
+ }
+}
+
+// NetworkAccessPolicy - Policy for accessing the disk via network.
+type NetworkAccessPolicy string
+
+const (
+ // NetworkAccessPolicyAllowAll - The disk can be exported or uploaded to from any network.
+ NetworkAccessPolicyAllowAll NetworkAccessPolicy = "AllowAll"
+ // NetworkAccessPolicyAllowPrivate - The disk can be exported or uploaded to using a DiskAccess resource's private endpoints.
+ NetworkAccessPolicyAllowPrivate NetworkAccessPolicy = "AllowPrivate"
+ // NetworkAccessPolicyDenyAll - The disk cannot be exported.
+ NetworkAccessPolicyDenyAll NetworkAccessPolicy = "DenyAll"
+)
+
+// PossibleNetworkAccessPolicyValues returns the possible values for the NetworkAccessPolicy const type.
+func PossibleNetworkAccessPolicyValues() []NetworkAccessPolicy {
+ return []NetworkAccessPolicy{
+ NetworkAccessPolicyAllowAll,
+ NetworkAccessPolicyAllowPrivate,
+ NetworkAccessPolicyDenyAll,
+ }
+}
+
+// NetworkInterfaceAuxiliaryMode - Specifies whether the Auxiliary mode is enabled for the Network Interface resource.
+type NetworkInterfaceAuxiliaryMode string
+
+const (
+ NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections"
+ NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating"
+ NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None"
+)
+
+// PossibleNetworkInterfaceAuxiliaryModeValues returns the possible values for the NetworkInterfaceAuxiliaryMode const type.
+func PossibleNetworkInterfaceAuxiliaryModeValues() []NetworkInterfaceAuxiliaryMode {
+ return []NetworkInterfaceAuxiliaryMode{
+ NetworkInterfaceAuxiliaryModeAcceleratedConnections,
+ NetworkInterfaceAuxiliaryModeFloating,
+ NetworkInterfaceAuxiliaryModeNone,
+ }
+}
+
+// NetworkInterfaceAuxiliarySKU - Specifies whether the Auxiliary sku is enabled for the Network Interface resource.
+type NetworkInterfaceAuxiliarySKU string
+
+const (
+ NetworkInterfaceAuxiliarySKUA1 NetworkInterfaceAuxiliarySKU = "A1"
+ NetworkInterfaceAuxiliarySKUA2 NetworkInterfaceAuxiliarySKU = "A2"
+ NetworkInterfaceAuxiliarySKUA4 NetworkInterfaceAuxiliarySKU = "A4"
+ NetworkInterfaceAuxiliarySKUA8 NetworkInterfaceAuxiliarySKU = "A8"
+ NetworkInterfaceAuxiliarySKUNone NetworkInterfaceAuxiliarySKU = "None"
+)
+
+// PossibleNetworkInterfaceAuxiliarySKUValues returns the possible values for the NetworkInterfaceAuxiliarySKU const type.
+func PossibleNetworkInterfaceAuxiliarySKUValues() []NetworkInterfaceAuxiliarySKU {
+ return []NetworkInterfaceAuxiliarySKU{
+ NetworkInterfaceAuxiliarySKUA1,
+ NetworkInterfaceAuxiliarySKUA2,
+ NetworkInterfaceAuxiliarySKUA4,
+ NetworkInterfaceAuxiliarySKUA8,
+ NetworkInterfaceAuxiliarySKUNone,
+ }
+}
+
+// OperatingSystemStateTypes - This property allows the user to specify whether the virtual machines created under this image
+// are 'Generalized' or 'Specialized'.
+type OperatingSystemStateTypes string
+
+const (
+ OperatingSystemStateTypesGeneralized OperatingSystemStateTypes = "Generalized"
+ OperatingSystemStateTypesSpecialized OperatingSystemStateTypes = "Specialized"
+)
+
+// PossibleOperatingSystemStateTypesValues returns the possible values for the OperatingSystemStateTypes const type.
+func PossibleOperatingSystemStateTypesValues() []OperatingSystemStateTypes {
+ return []OperatingSystemStateTypes{
+ OperatingSystemStateTypesGeneralized,
+ OperatingSystemStateTypesSpecialized,
+ }
+}
+
+// OperatingSystemType - Gets the Operating System type.
+type OperatingSystemType string
+
+const (
+ OperatingSystemTypeLinux OperatingSystemType = "Linux"
+ OperatingSystemTypeWindows OperatingSystemType = "Windows"
+)
+
+// PossibleOperatingSystemTypeValues returns the possible values for the OperatingSystemType const type.
+func PossibleOperatingSystemTypeValues() []OperatingSystemType {
+ return []OperatingSystemType{
+ OperatingSystemTypeLinux,
+ OperatingSystemTypeWindows,
+ }
+}
+
+// OperatingSystemTypes - This property allows you to specify the supported type of the OS that application is built for.
+// Possible values are: Windows, Linux.
+type OperatingSystemTypes string
+
+const (
+ OperatingSystemTypesLinux OperatingSystemTypes = "Linux"
+ OperatingSystemTypesWindows OperatingSystemTypes = "Windows"
+)
+
+// PossibleOperatingSystemTypesValues returns the possible values for the OperatingSystemTypes const type.
+func PossibleOperatingSystemTypesValues() []OperatingSystemTypes {
+ return []OperatingSystemTypes{
+ OperatingSystemTypesLinux,
+ OperatingSystemTypesWindows,
+ }
+}
+
+// OrchestrationMode - Specifies the orchestration mode for the virtual machine scale set.
+type OrchestrationMode string
+
+const (
+ OrchestrationModeFlexible OrchestrationMode = "Flexible"
+ OrchestrationModeUniform OrchestrationMode = "Uniform"
+)
+
+// PossibleOrchestrationModeValues returns the possible values for the OrchestrationMode const type.
+func PossibleOrchestrationModeValues() []OrchestrationMode {
+ return []OrchestrationMode{
+ OrchestrationModeFlexible,
+ OrchestrationModeUniform,
+ }
+}
+
+// OrchestrationServiceNames - The name of the service.
+type OrchestrationServiceNames string
+
+const (
+ OrchestrationServiceNamesAutomaticRepairs OrchestrationServiceNames = "AutomaticRepairs"
+)
+
+// PossibleOrchestrationServiceNamesValues returns the possible values for the OrchestrationServiceNames const type.
+func PossibleOrchestrationServiceNamesValues() []OrchestrationServiceNames {
+ return []OrchestrationServiceNames{
+ OrchestrationServiceNamesAutomaticRepairs,
+ }
+}
+
+// OrchestrationServiceState - The current state of the service.
+type OrchestrationServiceState string
+
+const (
+ OrchestrationServiceStateNotRunning OrchestrationServiceState = "NotRunning"
+ OrchestrationServiceStateRunning OrchestrationServiceState = "Running"
+ OrchestrationServiceStateSuspended OrchestrationServiceState = "Suspended"
+)
+
+// PossibleOrchestrationServiceStateValues returns the possible values for the OrchestrationServiceState const type.
+func PossibleOrchestrationServiceStateValues() []OrchestrationServiceState {
+ return []OrchestrationServiceState{
+ OrchestrationServiceStateNotRunning,
+ OrchestrationServiceStateRunning,
+ OrchestrationServiceStateSuspended,
+ }
+}
+
+// OrchestrationServiceStateAction - The action to be performed.
+type OrchestrationServiceStateAction string
+
+const (
+ OrchestrationServiceStateActionResume OrchestrationServiceStateAction = "Resume"
+ OrchestrationServiceStateActionSuspend OrchestrationServiceStateAction = "Suspend"
+)
+
+// PossibleOrchestrationServiceStateActionValues returns the possible values for the OrchestrationServiceStateAction const type.
+func PossibleOrchestrationServiceStateActionValues() []OrchestrationServiceStateAction {
+ return []OrchestrationServiceStateAction{
+ OrchestrationServiceStateActionResume,
+ OrchestrationServiceStateActionSuspend,
+ }
+}
+
+// PatchAssessmentState - Describes the availability of a given patch.
+type PatchAssessmentState string
+
+const (
+ PatchAssessmentStateAvailable PatchAssessmentState = "Available"
+ PatchAssessmentStateUnknown PatchAssessmentState = "Unknown"
+)
+
+// PossiblePatchAssessmentStateValues returns the possible values for the PatchAssessmentState const type.
+func PossiblePatchAssessmentStateValues() []PatchAssessmentState {
+ return []PatchAssessmentState{
+ PatchAssessmentStateAvailable,
+ PatchAssessmentStateUnknown,
+ }
+}
+
+// PatchInstallationState - The state of the patch after the installation operation completed.
+type PatchInstallationState string
+
+const (
+ PatchInstallationStateExcluded PatchInstallationState = "Excluded"
+ PatchInstallationStateFailed PatchInstallationState = "Failed"
+ PatchInstallationStateInstalled PatchInstallationState = "Installed"
+ PatchInstallationStateNotSelected PatchInstallationState = "NotSelected"
+ PatchInstallationStatePending PatchInstallationState = "Pending"
+ PatchInstallationStateUnknown PatchInstallationState = "Unknown"
+)
+
+// PossiblePatchInstallationStateValues returns the possible values for the PatchInstallationState const type.
+func PossiblePatchInstallationStateValues() []PatchInstallationState {
+ return []PatchInstallationState{
+ PatchInstallationStateExcluded,
+ PatchInstallationStateFailed,
+ PatchInstallationStateInstalled,
+ PatchInstallationStateNotSelected,
+ PatchInstallationStatePending,
+ PatchInstallationStateUnknown,
+ }
+}
+
+// PatchOperationStatus - The overall success or failure status of the operation. It remains "InProgress" until the operation
+// completes. At that point it will become "Unknown", "Failed", "Succeeded", or
+// "CompletedWithWarnings."
+type PatchOperationStatus string
+
+const (
+ PatchOperationStatusCompletedWithWarnings PatchOperationStatus = "CompletedWithWarnings"
+ PatchOperationStatusFailed PatchOperationStatus = "Failed"
+ PatchOperationStatusInProgress PatchOperationStatus = "InProgress"
+ PatchOperationStatusSucceeded PatchOperationStatus = "Succeeded"
+ PatchOperationStatusUnknown PatchOperationStatus = "Unknown"
+)
+
+// PossiblePatchOperationStatusValues returns the possible values for the PatchOperationStatus const type.
+func PossiblePatchOperationStatusValues() []PatchOperationStatus {
+ return []PatchOperationStatus{
+ PatchOperationStatusCompletedWithWarnings,
+ PatchOperationStatusFailed,
+ PatchOperationStatusInProgress,
+ PatchOperationStatusSucceeded,
+ PatchOperationStatusUnknown,
+ }
+}
+
+// PolicyViolationCategory - Describes the nature of the policy violation.
+type PolicyViolationCategory string
+
+const (
+ PolicyViolationCategoryCopyrightValidation PolicyViolationCategory = "CopyrightValidation"
+ PolicyViolationCategoryIPTheft PolicyViolationCategory = "IpTheft"
+ PolicyViolationCategoryImageFlaggedUnsafe PolicyViolationCategory = "ImageFlaggedUnsafe"
+ PolicyViolationCategoryOther PolicyViolationCategory = "Other"
+)
+
+// PossiblePolicyViolationCategoryValues returns the possible values for the PolicyViolationCategory const type.
+func PossiblePolicyViolationCategoryValues() []PolicyViolationCategory {
+ return []PolicyViolationCategory{
+ PolicyViolationCategoryCopyrightValidation,
+ PolicyViolationCategoryIPTheft,
+ PolicyViolationCategoryImageFlaggedUnsafe,
+ PolicyViolationCategoryOther,
+ }
+}
+
+// PrivateEndpointConnectionProvisioningState - The current provisioning state.
+type PrivateEndpointConnectionProvisioningState string
+
+const (
+ PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating"
+ PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting"
+ PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed"
+ PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
+)
+
+// PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.
+func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState {
+ return []PrivateEndpointConnectionProvisioningState{
+ PrivateEndpointConnectionProvisioningStateCreating,
+ PrivateEndpointConnectionProvisioningStateDeleting,
+ PrivateEndpointConnectionProvisioningStateFailed,
+ PrivateEndpointConnectionProvisioningStateSucceeded,
+ }
+}
+
+// PrivateEndpointServiceConnectionStatus - The private endpoint connection status.
+type PrivateEndpointServiceConnectionStatus string
+
+const (
+ PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
+ PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending"
+ PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
+)
+
+// PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.
+func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus {
+ return []PrivateEndpointServiceConnectionStatus{
+ PrivateEndpointServiceConnectionStatusApproved,
+ PrivateEndpointServiceConnectionStatusPending,
+ PrivateEndpointServiceConnectionStatusRejected,
+ }
+}
+
+// ProtocolTypes - Specifies the protocol of WinRM listener. Possible values are: http, https.
+type ProtocolTypes string
+
+const (
+ ProtocolTypesHTTP ProtocolTypes = "Http"
+ ProtocolTypesHTTPS ProtocolTypes = "Https"
+)
+
+// PossibleProtocolTypesValues returns the possible values for the ProtocolTypes const type.
+func PossibleProtocolTypesValues() []ProtocolTypes {
+ return []ProtocolTypes{
+ ProtocolTypesHTTP,
+ ProtocolTypesHTTPS,
+ }
+}
+
+// ProvisionedBandwidthCopyOption - If this field is set on a snapshot and createOption is CopyStart, the snapshot will be
+// copied at a quicker speed.
+type ProvisionedBandwidthCopyOption string
+
+const (
+ ProvisionedBandwidthCopyOptionEnhanced ProvisionedBandwidthCopyOption = "Enhanced"
+ ProvisionedBandwidthCopyOptionNone ProvisionedBandwidthCopyOption = "None"
+)
+
+// PossibleProvisionedBandwidthCopyOptionValues returns the possible values for the ProvisionedBandwidthCopyOption const type.
+func PossibleProvisionedBandwidthCopyOptionValues() []ProvisionedBandwidthCopyOption {
+ return []ProvisionedBandwidthCopyOption{
+ ProvisionedBandwidthCopyOptionEnhanced,
+ ProvisionedBandwidthCopyOptionNone,
+ }
+}
+
+// ProximityPlacementGroupType - Specifies the type of the proximity placement group. Possible values are: Standard : Co-locate
+// resources within an Azure region or Availability Zone. Ultra : For future use.
+type ProximityPlacementGroupType string
+
+const (
+ ProximityPlacementGroupTypeStandard ProximityPlacementGroupType = "Standard"
+ ProximityPlacementGroupTypeUltra ProximityPlacementGroupType = "Ultra"
+)
+
+// PossibleProximityPlacementGroupTypeValues returns the possible values for the ProximityPlacementGroupType const type.
+func PossibleProximityPlacementGroupTypeValues() []ProximityPlacementGroupType {
+ return []ProximityPlacementGroupType{
+ ProximityPlacementGroupTypeStandard,
+ ProximityPlacementGroupTypeUltra,
+ }
+}
+
+// PublicIPAddressSKUName - Specify public IP sku name
+type PublicIPAddressSKUName string
+
+const (
+ PublicIPAddressSKUNameBasic PublicIPAddressSKUName = "Basic"
+ PublicIPAddressSKUNameStandard PublicIPAddressSKUName = "Standard"
+)
+
+// PossiblePublicIPAddressSKUNameValues returns the possible values for the PublicIPAddressSKUName const type.
+func PossiblePublicIPAddressSKUNameValues() []PublicIPAddressSKUName {
+ return []PublicIPAddressSKUName{
+ PublicIPAddressSKUNameBasic,
+ PublicIPAddressSKUNameStandard,
+ }
+}
+
+// PublicIPAddressSKUTier - Specify public IP sku tier
+type PublicIPAddressSKUTier string
+
+const (
+ PublicIPAddressSKUTierGlobal PublicIPAddressSKUTier = "Global"
+ PublicIPAddressSKUTierRegional PublicIPAddressSKUTier = "Regional"
+)
+
+// PossiblePublicIPAddressSKUTierValues returns the possible values for the PublicIPAddressSKUTier const type.
+func PossiblePublicIPAddressSKUTierValues() []PublicIPAddressSKUTier {
+ return []PublicIPAddressSKUTier{
+ PublicIPAddressSKUTierGlobal,
+ PublicIPAddressSKUTierRegional,
+ }
+}
+
+// PublicIPAllocationMethod - Specify the public IP allocation type
+type PublicIPAllocationMethod string
+
+const (
+ PublicIPAllocationMethodDynamic PublicIPAllocationMethod = "Dynamic"
+ PublicIPAllocationMethodStatic PublicIPAllocationMethod = "Static"
+)
+
+// PossiblePublicIPAllocationMethodValues returns the possible values for the PublicIPAllocationMethod const type.
+func PossiblePublicIPAllocationMethodValues() []PublicIPAllocationMethod {
+ return []PublicIPAllocationMethod{
+ PublicIPAllocationMethodDynamic,
+ PublicIPAllocationMethodStatic,
+ }
+}
+
+// PublicNetworkAccess - Policy for controlling export on the disk.
+type PublicNetworkAccess string
+
+const (
+ // PublicNetworkAccessDisabled - You cannot access the underlying data of the disk publicly on the internet even when NetworkAccessPolicy
+ // is set to AllowAll. You can access the data via the SAS URI only from your trusted Azure VNET when NetworkAccessPolicy
+ // is set to AllowPrivate.
+ PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
+ // PublicNetworkAccessEnabled - You can generate a SAS URI to access the underlying data of the disk publicly on the internet
+ // when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your trusted Azure VNET
+ // when NetworkAccessPolicy is set to AllowPrivate.
+ PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled"
+)
+
+// PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.
+func PossiblePublicNetworkAccessValues() []PublicNetworkAccess {
+ return []PublicNetworkAccess{
+ PublicNetworkAccessDisabled,
+ PublicNetworkAccessEnabled,
+ }
+}
+
+// RepairAction - Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines
+// in the scale set. Default value is replace.
+type RepairAction string
+
+const (
+ RepairActionReimage RepairAction = "Reimage"
+ RepairActionReplace RepairAction = "Replace"
+ RepairActionRestart RepairAction = "Restart"
+)
+
+// PossibleRepairActionValues returns the possible values for the RepairAction const type.
+func PossibleRepairActionValues() []RepairAction {
+ return []RepairAction{
+ RepairActionReimage,
+ RepairActionReplace,
+ RepairActionRestart,
+ }
+}
+
+// ReplicationMode - Optional parameter which specifies the mode to be used for replication. This property is not updatable.
+type ReplicationMode string
+
+const (
+ ReplicationModeFull ReplicationMode = "Full"
+ ReplicationModeShallow ReplicationMode = "Shallow"
+)
+
+// PossibleReplicationModeValues returns the possible values for the ReplicationMode const type.
+func PossibleReplicationModeValues() []ReplicationMode {
+ return []ReplicationMode{
+ ReplicationModeFull,
+ ReplicationModeShallow,
+ }
+}
+
+// ReplicationState - This is the regional replication state.
+type ReplicationState string
+
+const (
+ ReplicationStateCompleted ReplicationState = "Completed"
+ ReplicationStateFailed ReplicationState = "Failed"
+ ReplicationStateReplicating ReplicationState = "Replicating"
+ ReplicationStateUnknown ReplicationState = "Unknown"
+)
+
+// PossibleReplicationStateValues returns the possible values for the ReplicationState const type.
+func PossibleReplicationStateValues() []ReplicationState {
+ return []ReplicationState{
+ ReplicationStateCompleted,
+ ReplicationStateFailed,
+ ReplicationStateReplicating,
+ ReplicationStateUnknown,
+ }
+}
+
+type ReplicationStatusTypes string
+
+const (
+ ReplicationStatusTypesReplicationStatus ReplicationStatusTypes = "ReplicationStatus"
+ ReplicationStatusTypesUefiSettings ReplicationStatusTypes = "UefiSettings"
+)
+
+// PossibleReplicationStatusTypesValues returns the possible values for the ReplicationStatusTypes const type.
+func PossibleReplicationStatusTypesValues() []ReplicationStatusTypes {
+ return []ReplicationStatusTypes{
+ ReplicationStatusTypesReplicationStatus,
+ ReplicationStatusTypesUefiSettings,
+ }
+}
+
+type ResourceIDOptionsForGetCapacityReservationGroups string
+
+const (
+ ResourceIDOptionsForGetCapacityReservationGroupsAll ResourceIDOptionsForGetCapacityReservationGroups = "All"
+ ResourceIDOptionsForGetCapacityReservationGroupsCreatedInSubscription ResourceIDOptionsForGetCapacityReservationGroups = "CreatedInSubscription"
+ ResourceIDOptionsForGetCapacityReservationGroupsSharedWithSubscription ResourceIDOptionsForGetCapacityReservationGroups = "SharedWithSubscription"
+)
+
+// PossibleResourceIDOptionsForGetCapacityReservationGroupsValues returns the possible values for the ResourceIDOptionsForGetCapacityReservationGroups const type.
+func PossibleResourceIDOptionsForGetCapacityReservationGroupsValues() []ResourceIDOptionsForGetCapacityReservationGroups {
+ return []ResourceIDOptionsForGetCapacityReservationGroups{
+ ResourceIDOptionsForGetCapacityReservationGroupsAll,
+ ResourceIDOptionsForGetCapacityReservationGroupsCreatedInSubscription,
+ ResourceIDOptionsForGetCapacityReservationGroupsSharedWithSubscription,
+ }
+}
+
+// ResourceIdentityType - The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned'
+// includes both an implicitly created identity and a set of user assigned identities. The type 'None'
+// will remove any identities from the virtual machine scale set.
+type ResourceIdentityType string
+
+const (
+ ResourceIdentityTypeNone ResourceIdentityType = "None"
+ ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned"
+ ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned"
+ ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned"
+)
+
+// PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return []ResourceIdentityType{
+ ResourceIdentityTypeNone,
+ ResourceIdentityTypeSystemAssigned,
+ ResourceIdentityTypeSystemAssignedUserAssigned,
+ ResourceIdentityTypeUserAssigned,
+ }
+}
+
+// ResourceSKUCapacityScaleType - The scale type applicable to the sku.
+type ResourceSKUCapacityScaleType string
+
+const (
+ ResourceSKUCapacityScaleTypeAutomatic ResourceSKUCapacityScaleType = "Automatic"
+ ResourceSKUCapacityScaleTypeManual ResourceSKUCapacityScaleType = "Manual"
+ ResourceSKUCapacityScaleTypeNone ResourceSKUCapacityScaleType = "None"
+)
+
+// PossibleResourceSKUCapacityScaleTypeValues returns the possible values for the ResourceSKUCapacityScaleType const type.
+func PossibleResourceSKUCapacityScaleTypeValues() []ResourceSKUCapacityScaleType {
+ return []ResourceSKUCapacityScaleType{
+ ResourceSKUCapacityScaleTypeAutomatic,
+ ResourceSKUCapacityScaleTypeManual,
+ ResourceSKUCapacityScaleTypeNone,
+ }
+}
+
+// ResourceSKURestrictionsReasonCode - The reason for restriction.
+type ResourceSKURestrictionsReasonCode string
+
+const (
+ ResourceSKURestrictionsReasonCodeNotAvailableForSubscription ResourceSKURestrictionsReasonCode = "NotAvailableForSubscription"
+ ResourceSKURestrictionsReasonCodeQuotaID ResourceSKURestrictionsReasonCode = "QuotaId"
+)
+
+// PossibleResourceSKURestrictionsReasonCodeValues returns the possible values for the ResourceSKURestrictionsReasonCode const type.
+func PossibleResourceSKURestrictionsReasonCodeValues() []ResourceSKURestrictionsReasonCode {
+ return []ResourceSKURestrictionsReasonCode{
+ ResourceSKURestrictionsReasonCodeNotAvailableForSubscription,
+ ResourceSKURestrictionsReasonCodeQuotaID,
+ }
+}
+
+// ResourceSKURestrictionsType - The type of restrictions.
+type ResourceSKURestrictionsType string
+
+const (
+ ResourceSKURestrictionsTypeLocation ResourceSKURestrictionsType = "Location"
+ ResourceSKURestrictionsTypeZone ResourceSKURestrictionsType = "Zone"
+)
+
+// PossibleResourceSKURestrictionsTypeValues returns the possible values for the ResourceSKURestrictionsType const type.
+func PossibleResourceSKURestrictionsTypeValues() []ResourceSKURestrictionsType {
+ return []ResourceSKURestrictionsType{
+ ResourceSKURestrictionsTypeLocation,
+ ResourceSKURestrictionsTypeZone,
+ }
+}
+
+type RestorePointCollectionExpandOptions string
+
+const (
+ RestorePointCollectionExpandOptionsRestorePoints RestorePointCollectionExpandOptions = "restorePoints"
+)
+
+// PossibleRestorePointCollectionExpandOptionsValues returns the possible values for the RestorePointCollectionExpandOptions const type.
+func PossibleRestorePointCollectionExpandOptionsValues() []RestorePointCollectionExpandOptions {
+ return []RestorePointCollectionExpandOptions{
+ RestorePointCollectionExpandOptionsRestorePoints,
+ }
+}
+
+// RestorePointEncryptionType - The type of key used to encrypt the data of the disk restore point.
+type RestorePointEncryptionType string
+
+const (
+ // RestorePointEncryptionTypeEncryptionAtRestWithCustomerKey - Disk Restore Point is encrypted at rest with Customer managed
+ // key that can be changed and revoked by a customer.
+ RestorePointEncryptionTypeEncryptionAtRestWithCustomerKey RestorePointEncryptionType = "EncryptionAtRestWithCustomerKey"
+ // RestorePointEncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys - Disk Restore Point is encrypted at rest with 2
+ // layers of encryption. One of the keys is Customer managed and the other key is Platform managed.
+ RestorePointEncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys RestorePointEncryptionType = "EncryptionAtRestWithPlatformAndCustomerKeys"
+ // RestorePointEncryptionTypeEncryptionAtRestWithPlatformKey - Disk Restore Point is encrypted at rest with Platform managed
+ // key.
+ RestorePointEncryptionTypeEncryptionAtRestWithPlatformKey RestorePointEncryptionType = "EncryptionAtRestWithPlatformKey"
+)
+
+// PossibleRestorePointEncryptionTypeValues returns the possible values for the RestorePointEncryptionType const type.
+func PossibleRestorePointEncryptionTypeValues() []RestorePointEncryptionType {
+ return []RestorePointEncryptionType{
+ RestorePointEncryptionTypeEncryptionAtRestWithCustomerKey,
+ RestorePointEncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys,
+ RestorePointEncryptionTypeEncryptionAtRestWithPlatformKey,
+ }
+}
+
+type RestorePointExpandOptions string
+
+const (
+ RestorePointExpandOptionsInstanceView RestorePointExpandOptions = "instanceView"
+)
+
+// PossibleRestorePointExpandOptionsValues returns the possible values for the RestorePointExpandOptions const type.
+func PossibleRestorePointExpandOptionsValues() []RestorePointExpandOptions {
+ return []RestorePointExpandOptions{
+ RestorePointExpandOptionsInstanceView,
+ }
+}
+
+// RollingUpgradeActionType - The last action performed on the rolling upgrade.
+type RollingUpgradeActionType string
+
+const (
+ RollingUpgradeActionTypeCancel RollingUpgradeActionType = "Cancel"
+ RollingUpgradeActionTypeStart RollingUpgradeActionType = "Start"
+)
+
+// PossibleRollingUpgradeActionTypeValues returns the possible values for the RollingUpgradeActionType const type.
+func PossibleRollingUpgradeActionTypeValues() []RollingUpgradeActionType {
+ return []RollingUpgradeActionType{
+ RollingUpgradeActionTypeCancel,
+ RollingUpgradeActionTypeStart,
+ }
+}
+
+// RollingUpgradeStatusCode - Code indicating the current status of the upgrade.
+type RollingUpgradeStatusCode string
+
+const (
+ RollingUpgradeStatusCodeCancelled RollingUpgradeStatusCode = "Cancelled"
+ RollingUpgradeStatusCodeCompleted RollingUpgradeStatusCode = "Completed"
+ RollingUpgradeStatusCodeFaulted RollingUpgradeStatusCode = "Faulted"
+ RollingUpgradeStatusCodeRollingForward RollingUpgradeStatusCode = "RollingForward"
+)
+
+// PossibleRollingUpgradeStatusCodeValues returns the possible values for the RollingUpgradeStatusCode const type.
+func PossibleRollingUpgradeStatusCodeValues() []RollingUpgradeStatusCode {
+ return []RollingUpgradeStatusCode{
+ RollingUpgradeStatusCodeCancelled,
+ RollingUpgradeStatusCodeCompleted,
+ RollingUpgradeStatusCodeFaulted,
+ RollingUpgradeStatusCodeRollingForward,
+ }
+}
+
+// SSHEncryptionTypes - The encryption type of the SSH keys to be generated. See SshEncryptionTypes for possible set of values.
+// If not provided, will default to RSA
+type SSHEncryptionTypes string
+
+const (
+ SSHEncryptionTypesEd25519 SSHEncryptionTypes = "Ed25519"
+ SSHEncryptionTypesRSA SSHEncryptionTypes = "RSA"
+)
+
+// PossibleSSHEncryptionTypesValues returns the possible values for the SSHEncryptionTypes const type.
+func PossibleSSHEncryptionTypesValues() []SSHEncryptionTypes {
+ return []SSHEncryptionTypes{
+ SSHEncryptionTypesEd25519,
+ SSHEncryptionTypesRSA,
+ }
+}
+
+// SecurityEncryptionTypes - Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption
+// of the managed disk along with VMGuestState blob, VMGuestStateOnly for encryption of just the
+// VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the VMGuestState blob.. Note: It can be set
+// for only Confidential VMs.
+type SecurityEncryptionTypes string
+
+const (
+ SecurityEncryptionTypesDiskWithVMGuestState SecurityEncryptionTypes = "DiskWithVMGuestState"
+ SecurityEncryptionTypesNonPersistedTPM SecurityEncryptionTypes = "NonPersistedTPM"
+ SecurityEncryptionTypesVMGuestStateOnly SecurityEncryptionTypes = "VMGuestStateOnly"
+)
+
+// PossibleSecurityEncryptionTypesValues returns the possible values for the SecurityEncryptionTypes const type.
+func PossibleSecurityEncryptionTypesValues() []SecurityEncryptionTypes {
+ return []SecurityEncryptionTypes{
+ SecurityEncryptionTypesDiskWithVMGuestState,
+ SecurityEncryptionTypesNonPersistedTPM,
+ SecurityEncryptionTypesVMGuestStateOnly,
+ }
+}
+
+// SecurityTypes - Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings.
+// The default behavior is: UefiSettings will not be enabled unless this property is
+// set.
+type SecurityTypes string
+
+const (
+ SecurityTypesConfidentialVM SecurityTypes = "ConfidentialVM"
+ SecurityTypesTrustedLaunch SecurityTypes = "TrustedLaunch"
+)
+
+// PossibleSecurityTypesValues returns the possible values for the SecurityTypes const type.
+func PossibleSecurityTypesValues() []SecurityTypes {
+ return []SecurityTypes{
+ SecurityTypesConfidentialVM,
+ SecurityTypesTrustedLaunch,
+ }
+}
+
+type SelectPermissions string
+
+const (
+ SelectPermissionsPermissions SelectPermissions = "Permissions"
+)
+
+// PossibleSelectPermissionsValues returns the possible values for the SelectPermissions const type.
+func PossibleSelectPermissionsValues() []SelectPermissions {
+ return []SelectPermissions{
+ SelectPermissionsPermissions,
+ }
+}
+
+// SettingNames - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands
+// and AutoLogon.
+type SettingNames string
+
+const (
+ SettingNamesAutoLogon SettingNames = "AutoLogon"
+ SettingNamesFirstLogonCommands SettingNames = "FirstLogonCommands"
+)
+
+// PossibleSettingNamesValues returns the possible values for the SettingNames const type.
+func PossibleSettingNamesValues() []SettingNames {
+ return []SettingNames{
+ SettingNamesAutoLogon,
+ SettingNamesFirstLogonCommands,
+ }
+}
+
+// SharedGalleryHostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
+type SharedGalleryHostCaching string
+
+const (
+ SharedGalleryHostCachingNone SharedGalleryHostCaching = "None"
+ SharedGalleryHostCachingReadOnly SharedGalleryHostCaching = "ReadOnly"
+ SharedGalleryHostCachingReadWrite SharedGalleryHostCaching = "ReadWrite"
+)
+
+// PossibleSharedGalleryHostCachingValues returns the possible values for the SharedGalleryHostCaching const type.
+func PossibleSharedGalleryHostCachingValues() []SharedGalleryHostCaching {
+ return []SharedGalleryHostCaching{
+ SharedGalleryHostCachingNone,
+ SharedGalleryHostCachingReadOnly,
+ SharedGalleryHostCachingReadWrite,
+ }
+}
+
+type SharedToValues string
+
+const (
+ SharedToValuesTenant SharedToValues = "tenant"
+)
+
+// PossibleSharedToValuesValues returns the possible values for the SharedToValues const type.
+func PossibleSharedToValuesValues() []SharedToValues {
+ return []SharedToValues{
+ SharedToValuesTenant,
+ }
+}
+
+// SharingProfileGroupTypes - This property allows you to specify the type of sharing group. Possible values are: Subscriptions,
+// AADTenants.
+type SharingProfileGroupTypes string
+
+const (
+ SharingProfileGroupTypesAADTenants SharingProfileGroupTypes = "AADTenants"
+ SharingProfileGroupTypesSubscriptions SharingProfileGroupTypes = "Subscriptions"
+)
+
+// PossibleSharingProfileGroupTypesValues returns the possible values for the SharingProfileGroupTypes const type.
+func PossibleSharingProfileGroupTypesValues() []SharingProfileGroupTypes {
+ return []SharingProfileGroupTypes{
+ SharingProfileGroupTypesAADTenants,
+ SharingProfileGroupTypesSubscriptions,
+ }
+}
+
+// SharingState - The sharing state of the gallery, which only appears in the response.
+type SharingState string
+
+const (
+ SharingStateFailed SharingState = "Failed"
+ SharingStateInProgress SharingState = "InProgress"
+ SharingStateSucceeded SharingState = "Succeeded"
+ SharingStateUnknown SharingState = "Unknown"
+)
+
+// PossibleSharingStateValues returns the possible values for the SharingState const type.
+func PossibleSharingStateValues() []SharingState {
+ return []SharingState{
+ SharingStateFailed,
+ SharingStateInProgress,
+ SharingStateSucceeded,
+ SharingStateUnknown,
+ }
+}
+
+// SharingUpdateOperationTypes - This property allows you to specify the operation type of gallery sharing update. Possible
+// values are: Add, Remove, Reset.
+type SharingUpdateOperationTypes string
+
+const (
+ SharingUpdateOperationTypesAdd SharingUpdateOperationTypes = "Add"
+ SharingUpdateOperationTypesEnableCommunity SharingUpdateOperationTypes = "EnableCommunity"
+ SharingUpdateOperationTypesRemove SharingUpdateOperationTypes = "Remove"
+ SharingUpdateOperationTypesReset SharingUpdateOperationTypes = "Reset"
+)
+
+// PossibleSharingUpdateOperationTypesValues returns the possible values for the SharingUpdateOperationTypes const type.
+func PossibleSharingUpdateOperationTypesValues() []SharingUpdateOperationTypes {
+ return []SharingUpdateOperationTypes{
+ SharingUpdateOperationTypesAdd,
+ SharingUpdateOperationTypesEnableCommunity,
+ SharingUpdateOperationTypesRemove,
+ SharingUpdateOperationTypesReset,
+ }
+}
+
+// SnapshotStorageAccountTypes - The sku name.
+type SnapshotStorageAccountTypes string
+
+const (
+ // SnapshotStorageAccountTypesPremiumLRS - Premium SSD locally redundant storage
+ SnapshotStorageAccountTypesPremiumLRS SnapshotStorageAccountTypes = "Premium_LRS"
+ // SnapshotStorageAccountTypesStandardLRS - Standard HDD locally redundant storage
+ SnapshotStorageAccountTypesStandardLRS SnapshotStorageAccountTypes = "Standard_LRS"
+ // SnapshotStorageAccountTypesStandardZRS - Standard zone redundant storage
+ SnapshotStorageAccountTypesStandardZRS SnapshotStorageAccountTypes = "Standard_ZRS"
+)
+
+// PossibleSnapshotStorageAccountTypesValues returns the possible values for the SnapshotStorageAccountTypes const type.
+func PossibleSnapshotStorageAccountTypesValues() []SnapshotStorageAccountTypes {
+ return []SnapshotStorageAccountTypes{
+ SnapshotStorageAccountTypesPremiumLRS,
+ SnapshotStorageAccountTypesStandardLRS,
+ SnapshotStorageAccountTypesStandardZRS,
+ }
+}
+
+// StatusLevelTypes - The level code.
+type StatusLevelTypes string
+
+const (
+ StatusLevelTypesError StatusLevelTypes = "Error"
+ StatusLevelTypesInfo StatusLevelTypes = "Info"
+ StatusLevelTypesWarning StatusLevelTypes = "Warning"
+)
+
+// PossibleStatusLevelTypesValues returns the possible values for the StatusLevelTypes const type.
+func PossibleStatusLevelTypesValues() []StatusLevelTypes {
+ return []StatusLevelTypes{
+ StatusLevelTypesError,
+ StatusLevelTypesInfo,
+ StatusLevelTypesWarning,
+ }
+}
+
+// StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable.
+type StorageAccountType string
+
+const (
+ StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS"
+ StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS"
+ StorageAccountTypeStandardZRS StorageAccountType = "Standard_ZRS"
+)
+
+// PossibleStorageAccountTypeValues returns the possible values for the StorageAccountType const type.
+func PossibleStorageAccountTypeValues() []StorageAccountType {
+ return []StorageAccountType{
+ StorageAccountTypePremiumLRS,
+ StorageAccountTypeStandardLRS,
+ StorageAccountTypeStandardZRS,
+ }
+}
+
+// StorageAccountTypes - Specifies the storage account type for the managed disk. Managed OS disk storage account type can
+// only be set when you create the scale set. NOTE: UltraSSDLRS can only be used with data disks. It
+// cannot be used with OS Disk. StandardLRS uses Standard HDD. StandardSSDLRS uses Standard SSD. PremiumLRS uses Premium SSD.
+// UltraSSDLRS uses Ultra disk. PremiumZRS uses Premium SSD zone redundant
+// storage. StandardSSD_ZRS uses Standard SSD zone redundant storage. For more information regarding disks supported for Windows
+// Virtual Machines, refer to
+// https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for Linux Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/linux/disks-types
+type StorageAccountTypes string
+
+const (
+ StorageAccountTypesPremiumLRS StorageAccountTypes = "Premium_LRS"
+ StorageAccountTypesPremiumV2LRS StorageAccountTypes = "PremiumV2_LRS"
+ StorageAccountTypesPremiumZRS StorageAccountTypes = "Premium_ZRS"
+ StorageAccountTypesStandardLRS StorageAccountTypes = "Standard_LRS"
+ StorageAccountTypesStandardSSDLRS StorageAccountTypes = "StandardSSD_LRS"
+ StorageAccountTypesStandardSSDZRS StorageAccountTypes = "StandardSSD_ZRS"
+ StorageAccountTypesUltraSSDLRS StorageAccountTypes = "UltraSSD_LRS"
+)
+
+// PossibleStorageAccountTypesValues returns the possible values for the StorageAccountTypes const type.
+func PossibleStorageAccountTypesValues() []StorageAccountTypes {
+ return []StorageAccountTypes{
+ StorageAccountTypesPremiumLRS,
+ StorageAccountTypesPremiumV2LRS,
+ StorageAccountTypesPremiumZRS,
+ StorageAccountTypesStandardLRS,
+ StorageAccountTypesStandardSSDLRS,
+ StorageAccountTypesStandardSSDZRS,
+ StorageAccountTypesUltraSSDLRS,
+ }
+}
+
+// UefiKeyType - The type of key signature.
+type UefiKeyType string
+
+const (
+ UefiKeyTypeSHA256 UefiKeyType = "sha256"
+ UefiKeyTypeX509 UefiKeyType = "x509"
+)
+
+// PossibleUefiKeyTypeValues returns the possible values for the UefiKeyType const type.
+func PossibleUefiKeyTypeValues() []UefiKeyType {
+ return []UefiKeyType{
+ UefiKeyTypeSHA256,
+ UefiKeyTypeX509,
+ }
+}
+
+// UefiSignatureTemplateName - The name of the signature template that contains default UEFI keys.
+type UefiSignatureTemplateName string
+
+const (
+ UefiSignatureTemplateNameMicrosoftUefiCertificateAuthorityTemplate UefiSignatureTemplateName = "MicrosoftUefiCertificateAuthorityTemplate"
+ UefiSignatureTemplateNameMicrosoftWindowsTemplate UefiSignatureTemplateName = "MicrosoftWindowsTemplate"
+ UefiSignatureTemplateNameNoSignatureTemplate UefiSignatureTemplateName = "NoSignatureTemplate"
+)
+
+// PossibleUefiSignatureTemplateNameValues returns the possible values for the UefiSignatureTemplateName const type.
+func PossibleUefiSignatureTemplateNameValues() []UefiSignatureTemplateName {
+ return []UefiSignatureTemplateName{
+ UefiSignatureTemplateNameMicrosoftUefiCertificateAuthorityTemplate,
+ UefiSignatureTemplateNameMicrosoftWindowsTemplate,
+ UefiSignatureTemplateNameNoSignatureTemplate,
+ }
+}
+
+// UpgradeMode - Specifies the mode of an upgrade to virtual machines in the scale set.
+// Possible values are:
+// Manual - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade
+// action.
+// Automatic - All virtual machines in the scale set are automatically updated at the same time.
+type UpgradeMode string
+
+const (
+ UpgradeModeAutomatic UpgradeMode = "Automatic"
+ UpgradeModeManual UpgradeMode = "Manual"
+ UpgradeModeRolling UpgradeMode = "Rolling"
+)
+
+// PossibleUpgradeModeValues returns the possible values for the UpgradeMode const type.
+func PossibleUpgradeModeValues() []UpgradeMode {
+ return []UpgradeMode{
+ UpgradeModeAutomatic,
+ UpgradeModeManual,
+ UpgradeModeRolling,
+ }
+}
+
+// UpgradeOperationInvoker - Invoker of the Upgrade Operation
+type UpgradeOperationInvoker string
+
+const (
+ UpgradeOperationInvokerPlatform UpgradeOperationInvoker = "Platform"
+ UpgradeOperationInvokerUnknown UpgradeOperationInvoker = "Unknown"
+ UpgradeOperationInvokerUser UpgradeOperationInvoker = "User"
+)
+
+// PossibleUpgradeOperationInvokerValues returns the possible values for the UpgradeOperationInvoker const type.
+func PossibleUpgradeOperationInvokerValues() []UpgradeOperationInvoker {
+ return []UpgradeOperationInvoker{
+ UpgradeOperationInvokerPlatform,
+ UpgradeOperationInvokerUnknown,
+ UpgradeOperationInvokerUser,
+ }
+}
+
+// UpgradeState - Code indicating the current status of the upgrade.
+type UpgradeState string
+
+const (
+ UpgradeStateCancelled UpgradeState = "Cancelled"
+ UpgradeStateCompleted UpgradeState = "Completed"
+ UpgradeStateFaulted UpgradeState = "Faulted"
+ UpgradeStateRollingForward UpgradeState = "RollingForward"
+)
+
+// PossibleUpgradeStateValues returns the possible values for the UpgradeState const type.
+func PossibleUpgradeStateValues() []UpgradeState {
+ return []UpgradeState{
+ UpgradeStateCancelled,
+ UpgradeStateCompleted,
+ UpgradeStateFaulted,
+ UpgradeStateRollingForward,
+ }
+}
+
+// VMDiskTypes - VM disk types which are disallowed.
+type VMDiskTypes string
+
+const (
+ VMDiskTypesNone VMDiskTypes = "None"
+ VMDiskTypesUnmanaged VMDiskTypes = "Unmanaged"
+)
+
+// PossibleVMDiskTypesValues returns the possible values for the VMDiskTypes const type.
+func PossibleVMDiskTypesValues() []VMDiskTypes {
+ return []VMDiskTypes{
+ VMDiskTypesNone,
+ VMDiskTypesUnmanaged,
+ }
+}
+
+type VMGuestPatchClassificationLinux string
+
+const (
+ VMGuestPatchClassificationLinuxCritical VMGuestPatchClassificationLinux = "Critical"
+ VMGuestPatchClassificationLinuxOther VMGuestPatchClassificationLinux = "Other"
+ VMGuestPatchClassificationLinuxSecurity VMGuestPatchClassificationLinux = "Security"
+)
+
+// PossibleVMGuestPatchClassificationLinuxValues returns the possible values for the VMGuestPatchClassificationLinux const type.
+func PossibleVMGuestPatchClassificationLinuxValues() []VMGuestPatchClassificationLinux {
+ return []VMGuestPatchClassificationLinux{
+ VMGuestPatchClassificationLinuxCritical,
+ VMGuestPatchClassificationLinuxOther,
+ VMGuestPatchClassificationLinuxSecurity,
+ }
+}
+
+type VMGuestPatchClassificationWindows string
+
+const (
+ VMGuestPatchClassificationWindowsCritical VMGuestPatchClassificationWindows = "Critical"
+ VMGuestPatchClassificationWindowsDefinition VMGuestPatchClassificationWindows = "Definition"
+ VMGuestPatchClassificationWindowsFeaturePack VMGuestPatchClassificationWindows = "FeaturePack"
+ VMGuestPatchClassificationWindowsSecurity VMGuestPatchClassificationWindows = "Security"
+ VMGuestPatchClassificationWindowsServicePack VMGuestPatchClassificationWindows = "ServicePack"
+ VMGuestPatchClassificationWindowsTools VMGuestPatchClassificationWindows = "Tools"
+ VMGuestPatchClassificationWindowsUpdateRollUp VMGuestPatchClassificationWindows = "UpdateRollUp"
+ VMGuestPatchClassificationWindowsUpdates VMGuestPatchClassificationWindows = "Updates"
+)
+
+// PossibleVMGuestPatchClassificationWindowsValues returns the possible values for the VMGuestPatchClassificationWindows const type.
+func PossibleVMGuestPatchClassificationWindowsValues() []VMGuestPatchClassificationWindows {
+ return []VMGuestPatchClassificationWindows{
+ VMGuestPatchClassificationWindowsCritical,
+ VMGuestPatchClassificationWindowsDefinition,
+ VMGuestPatchClassificationWindowsFeaturePack,
+ VMGuestPatchClassificationWindowsSecurity,
+ VMGuestPatchClassificationWindowsServicePack,
+ VMGuestPatchClassificationWindowsTools,
+ VMGuestPatchClassificationWindowsUpdateRollUp,
+ VMGuestPatchClassificationWindowsUpdates,
+ }
+}
+
+// VMGuestPatchRebootBehavior - Describes the reboot requirements of the patch.
+type VMGuestPatchRebootBehavior string
+
+const (
+ VMGuestPatchRebootBehaviorAlwaysRequiresReboot VMGuestPatchRebootBehavior = "AlwaysRequiresReboot"
+ VMGuestPatchRebootBehaviorCanRequestReboot VMGuestPatchRebootBehavior = "CanRequestReboot"
+ VMGuestPatchRebootBehaviorNeverReboots VMGuestPatchRebootBehavior = "NeverReboots"
+ VMGuestPatchRebootBehaviorUnknown VMGuestPatchRebootBehavior = "Unknown"
+)
+
+// PossibleVMGuestPatchRebootBehaviorValues returns the possible values for the VMGuestPatchRebootBehavior const type.
+func PossibleVMGuestPatchRebootBehaviorValues() []VMGuestPatchRebootBehavior {
+ return []VMGuestPatchRebootBehavior{
+ VMGuestPatchRebootBehaviorAlwaysRequiresReboot,
+ VMGuestPatchRebootBehaviorCanRequestReboot,
+ VMGuestPatchRebootBehaviorNeverReboots,
+ VMGuestPatchRebootBehaviorUnknown,
+ }
+}
+
+// VMGuestPatchRebootSetting - Defines when it is acceptable to reboot a VM during a software update operation.
+type VMGuestPatchRebootSetting string
+
+const (
+ VMGuestPatchRebootSettingAlways VMGuestPatchRebootSetting = "Always"
+ VMGuestPatchRebootSettingIfRequired VMGuestPatchRebootSetting = "IfRequired"
+ VMGuestPatchRebootSettingNever VMGuestPatchRebootSetting = "Never"
+)
+
+// PossibleVMGuestPatchRebootSettingValues returns the possible values for the VMGuestPatchRebootSetting const type.
+func PossibleVMGuestPatchRebootSettingValues() []VMGuestPatchRebootSetting {
+ return []VMGuestPatchRebootSetting{
+ VMGuestPatchRebootSettingAlways,
+ VMGuestPatchRebootSettingIfRequired,
+ VMGuestPatchRebootSettingNever,
+ }
+}
+
+// VMGuestPatchRebootStatus - The reboot state of the VM following completion of the operation.
+type VMGuestPatchRebootStatus string
+
+const (
+ VMGuestPatchRebootStatusCompleted VMGuestPatchRebootStatus = "Completed"
+ VMGuestPatchRebootStatusFailed VMGuestPatchRebootStatus = "Failed"
+ VMGuestPatchRebootStatusNotNeeded VMGuestPatchRebootStatus = "NotNeeded"
+ VMGuestPatchRebootStatusRequired VMGuestPatchRebootStatus = "Required"
+ VMGuestPatchRebootStatusStarted VMGuestPatchRebootStatus = "Started"
+ VMGuestPatchRebootStatusUnknown VMGuestPatchRebootStatus = "Unknown"
+)
+
+// PossibleVMGuestPatchRebootStatusValues returns the possible values for the VMGuestPatchRebootStatus const type.
+func PossibleVMGuestPatchRebootStatusValues() []VMGuestPatchRebootStatus {
+ return []VMGuestPatchRebootStatus{
+ VMGuestPatchRebootStatusCompleted,
+ VMGuestPatchRebootStatusFailed,
+ VMGuestPatchRebootStatusNotNeeded,
+ VMGuestPatchRebootStatusRequired,
+ VMGuestPatchRebootStatusStarted,
+ VMGuestPatchRebootStatusUnknown,
+ }
+}
+
+// VirtualMachineEvictionPolicyTypes - Specifies the eviction policy for the Azure Spot VM/VMSS
+type VirtualMachineEvictionPolicyTypes string
+
+const (
+ VirtualMachineEvictionPolicyTypesDeallocate VirtualMachineEvictionPolicyTypes = "Deallocate"
+ VirtualMachineEvictionPolicyTypesDelete VirtualMachineEvictionPolicyTypes = "Delete"
+)
+
+// PossibleVirtualMachineEvictionPolicyTypesValues returns the possible values for the VirtualMachineEvictionPolicyTypes const type.
+func PossibleVirtualMachineEvictionPolicyTypesValues() []VirtualMachineEvictionPolicyTypes {
+ return []VirtualMachineEvictionPolicyTypes{
+ VirtualMachineEvictionPolicyTypesDeallocate,
+ VirtualMachineEvictionPolicyTypesDelete,
+ }
+}
+
+// VirtualMachinePriorityTypes - Specifies the priority for a standalone virtual machine or the virtual machines in the scale
+// set. 'Low' enum will be deprecated in the future, please use 'Spot' as the enum to deploy Azure Spot
+// VM/VMSS.
+type VirtualMachinePriorityTypes string
+
+const (
+ VirtualMachinePriorityTypesLow VirtualMachinePriorityTypes = "Low"
+ VirtualMachinePriorityTypesRegular VirtualMachinePriorityTypes = "Regular"
+ VirtualMachinePriorityTypesSpot VirtualMachinePriorityTypes = "Spot"
+)
+
+// PossibleVirtualMachinePriorityTypesValues returns the possible values for the VirtualMachinePriorityTypes const type.
+func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes {
+ return []VirtualMachinePriorityTypes{
+ VirtualMachinePriorityTypesLow,
+ VirtualMachinePriorityTypesRegular,
+ VirtualMachinePriorityTypesSpot,
+ }
+}
+
+// VirtualMachineScaleSetSKUScaleType - The scale type applicable to the sku.
+type VirtualMachineScaleSetSKUScaleType string
+
+const (
+ VirtualMachineScaleSetSKUScaleTypeAutomatic VirtualMachineScaleSetSKUScaleType = "Automatic"
+ VirtualMachineScaleSetSKUScaleTypeNone VirtualMachineScaleSetSKUScaleType = "None"
+)
+
+// PossibleVirtualMachineScaleSetSKUScaleTypeValues returns the possible values for the VirtualMachineScaleSetSKUScaleType const type.
+func PossibleVirtualMachineScaleSetSKUScaleTypeValues() []VirtualMachineScaleSetSKUScaleType {
+ return []VirtualMachineScaleSetSKUScaleType{
+ VirtualMachineScaleSetSKUScaleTypeAutomatic,
+ VirtualMachineScaleSetSKUScaleTypeNone,
+ }
+}
+
+type VirtualMachineScaleSetScaleInRules string
+
+const (
+ VirtualMachineScaleSetScaleInRulesDefault VirtualMachineScaleSetScaleInRules = "Default"
+ VirtualMachineScaleSetScaleInRulesNewestVM VirtualMachineScaleSetScaleInRules = "NewestVM"
+ VirtualMachineScaleSetScaleInRulesOldestVM VirtualMachineScaleSetScaleInRules = "OldestVM"
+)
+
+// PossibleVirtualMachineScaleSetScaleInRulesValues returns the possible values for the VirtualMachineScaleSetScaleInRules const type.
+func PossibleVirtualMachineScaleSetScaleInRulesValues() []VirtualMachineScaleSetScaleInRules {
+ return []VirtualMachineScaleSetScaleInRules{
+ VirtualMachineScaleSetScaleInRulesDefault,
+ VirtualMachineScaleSetScaleInRulesNewestVM,
+ VirtualMachineScaleSetScaleInRulesOldestVM,
+ }
+}
+
+// VirtualMachineSizeTypes - Specifies the size of the virtual machine. The enum data type is currently deprecated and will
+// be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these
+// APIs: List all available virtual machine sizes in an availability set [https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes],
+// List all available virtual machine sizes in a
+// region [https://docs.microsoft.com/rest/api/compute/resourceskus/list], List all available virtual machine sizes for resizing
+// [https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes]. For more information about virtual machine
+// sizes, see Sizes for virtual machines
+// [https://docs.microsoft.com/azure/virtual-machines/sizes]. The available VM sizes depend on region and availability set.
+type VirtualMachineSizeTypes string
+
+const (
+ VirtualMachineSizeTypesBasicA0 VirtualMachineSizeTypes = "Basic_A0"
+ VirtualMachineSizeTypesBasicA1 VirtualMachineSizeTypes = "Basic_A1"
+ VirtualMachineSizeTypesBasicA2 VirtualMachineSizeTypes = "Basic_A2"
+ VirtualMachineSizeTypesBasicA3 VirtualMachineSizeTypes = "Basic_A3"
+ VirtualMachineSizeTypesBasicA4 VirtualMachineSizeTypes = "Basic_A4"
+ VirtualMachineSizeTypesStandardA0 VirtualMachineSizeTypes = "Standard_A0"
+ VirtualMachineSizeTypesStandardA1 VirtualMachineSizeTypes = "Standard_A1"
+ VirtualMachineSizeTypesStandardA10 VirtualMachineSizeTypes = "Standard_A10"
+ VirtualMachineSizeTypesStandardA11 VirtualMachineSizeTypes = "Standard_A11"
+ VirtualMachineSizeTypesStandardA1V2 VirtualMachineSizeTypes = "Standard_A1_v2"
+ VirtualMachineSizeTypesStandardA2 VirtualMachineSizeTypes = "Standard_A2"
+ VirtualMachineSizeTypesStandardA2MV2 VirtualMachineSizeTypes = "Standard_A2m_v2"
+ VirtualMachineSizeTypesStandardA2V2 VirtualMachineSizeTypes = "Standard_A2_v2"
+ VirtualMachineSizeTypesStandardA3 VirtualMachineSizeTypes = "Standard_A3"
+ VirtualMachineSizeTypesStandardA4 VirtualMachineSizeTypes = "Standard_A4"
+ VirtualMachineSizeTypesStandardA4MV2 VirtualMachineSizeTypes = "Standard_A4m_v2"
+ VirtualMachineSizeTypesStandardA4V2 VirtualMachineSizeTypes = "Standard_A4_v2"
+ VirtualMachineSizeTypesStandardA5 VirtualMachineSizeTypes = "Standard_A5"
+ VirtualMachineSizeTypesStandardA6 VirtualMachineSizeTypes = "Standard_A6"
+ VirtualMachineSizeTypesStandardA7 VirtualMachineSizeTypes = "Standard_A7"
+ VirtualMachineSizeTypesStandardA8 VirtualMachineSizeTypes = "Standard_A8"
+ VirtualMachineSizeTypesStandardA8MV2 VirtualMachineSizeTypes = "Standard_A8m_v2"
+ VirtualMachineSizeTypesStandardA8V2 VirtualMachineSizeTypes = "Standard_A8_v2"
+ VirtualMachineSizeTypesStandardA9 VirtualMachineSizeTypes = "Standard_A9"
+ VirtualMachineSizeTypesStandardB1Ms VirtualMachineSizeTypes = "Standard_B1ms"
+ VirtualMachineSizeTypesStandardB1S VirtualMachineSizeTypes = "Standard_B1s"
+ VirtualMachineSizeTypesStandardB2Ms VirtualMachineSizeTypes = "Standard_B2ms"
+ VirtualMachineSizeTypesStandardB2S VirtualMachineSizeTypes = "Standard_B2s"
+ VirtualMachineSizeTypesStandardB4Ms VirtualMachineSizeTypes = "Standard_B4ms"
+ VirtualMachineSizeTypesStandardB8Ms VirtualMachineSizeTypes = "Standard_B8ms"
+ VirtualMachineSizeTypesStandardD1 VirtualMachineSizeTypes = "Standard_D1"
+ VirtualMachineSizeTypesStandardD11 VirtualMachineSizeTypes = "Standard_D11"
+ VirtualMachineSizeTypesStandardD11V2 VirtualMachineSizeTypes = "Standard_D11_v2"
+ VirtualMachineSizeTypesStandardD12 VirtualMachineSizeTypes = "Standard_D12"
+ VirtualMachineSizeTypesStandardD12V2 VirtualMachineSizeTypes = "Standard_D12_v2"
+ VirtualMachineSizeTypesStandardD13 VirtualMachineSizeTypes = "Standard_D13"
+ VirtualMachineSizeTypesStandardD13V2 VirtualMachineSizeTypes = "Standard_D13_v2"
+ VirtualMachineSizeTypesStandardD14 VirtualMachineSizeTypes = "Standard_D14"
+ VirtualMachineSizeTypesStandardD14V2 VirtualMachineSizeTypes = "Standard_D14_v2"
+ VirtualMachineSizeTypesStandardD15V2 VirtualMachineSizeTypes = "Standard_D15_v2"
+ VirtualMachineSizeTypesStandardD16SV3 VirtualMachineSizeTypes = "Standard_D16s_v3"
+ VirtualMachineSizeTypesStandardD16V3 VirtualMachineSizeTypes = "Standard_D16_v3"
+ VirtualMachineSizeTypesStandardD1V2 VirtualMachineSizeTypes = "Standard_D1_v2"
+ VirtualMachineSizeTypesStandardD2 VirtualMachineSizeTypes = "Standard_D2"
+ VirtualMachineSizeTypesStandardD2SV3 VirtualMachineSizeTypes = "Standard_D2s_v3"
+ VirtualMachineSizeTypesStandardD2V2 VirtualMachineSizeTypes = "Standard_D2_v2"
+ VirtualMachineSizeTypesStandardD2V3 VirtualMachineSizeTypes = "Standard_D2_v3"
+ VirtualMachineSizeTypesStandardD3 VirtualMachineSizeTypes = "Standard_D3"
+ VirtualMachineSizeTypesStandardD32SV3 VirtualMachineSizeTypes = "Standard_D32s_v3"
+ VirtualMachineSizeTypesStandardD32V3 VirtualMachineSizeTypes = "Standard_D32_v3"
+ VirtualMachineSizeTypesStandardD3V2 VirtualMachineSizeTypes = "Standard_D3_v2"
+ VirtualMachineSizeTypesStandardD4 VirtualMachineSizeTypes = "Standard_D4"
+ VirtualMachineSizeTypesStandardD4SV3 VirtualMachineSizeTypes = "Standard_D4s_v3"
+ VirtualMachineSizeTypesStandardD4V2 VirtualMachineSizeTypes = "Standard_D4_v2"
+ VirtualMachineSizeTypesStandardD4V3 VirtualMachineSizeTypes = "Standard_D4_v3"
+ VirtualMachineSizeTypesStandardD5V2 VirtualMachineSizeTypes = "Standard_D5_v2"
+ VirtualMachineSizeTypesStandardD64SV3 VirtualMachineSizeTypes = "Standard_D64s_v3"
+ VirtualMachineSizeTypesStandardD64V3 VirtualMachineSizeTypes = "Standard_D64_v3"
+ VirtualMachineSizeTypesStandardD8SV3 VirtualMachineSizeTypes = "Standard_D8s_v3"
+ VirtualMachineSizeTypesStandardD8V3 VirtualMachineSizeTypes = "Standard_D8_v3"
+ VirtualMachineSizeTypesStandardDS1 VirtualMachineSizeTypes = "Standard_DS1"
+ VirtualMachineSizeTypesStandardDS11 VirtualMachineSizeTypes = "Standard_DS11"
+ VirtualMachineSizeTypesStandardDS11V2 VirtualMachineSizeTypes = "Standard_DS11_v2"
+ VirtualMachineSizeTypesStandardDS12 VirtualMachineSizeTypes = "Standard_DS12"
+ VirtualMachineSizeTypesStandardDS12V2 VirtualMachineSizeTypes = "Standard_DS12_v2"
+ VirtualMachineSizeTypesStandardDS13 VirtualMachineSizeTypes = "Standard_DS13"
+ VirtualMachineSizeTypesStandardDS132V2 VirtualMachineSizeTypes = "Standard_DS13-2_v2"
+ VirtualMachineSizeTypesStandardDS134V2 VirtualMachineSizeTypes = "Standard_DS13-4_v2"
+ VirtualMachineSizeTypesStandardDS13V2 VirtualMachineSizeTypes = "Standard_DS13_v2"
+ VirtualMachineSizeTypesStandardDS14 VirtualMachineSizeTypes = "Standard_DS14"
+ VirtualMachineSizeTypesStandardDS144V2 VirtualMachineSizeTypes = "Standard_DS14-4_v2"
+ VirtualMachineSizeTypesStandardDS148V2 VirtualMachineSizeTypes = "Standard_DS14-8_v2"
+ VirtualMachineSizeTypesStandardDS14V2 VirtualMachineSizeTypes = "Standard_DS14_v2"
+ VirtualMachineSizeTypesStandardDS15V2 VirtualMachineSizeTypes = "Standard_DS15_v2"
+ VirtualMachineSizeTypesStandardDS1V2 VirtualMachineSizeTypes = "Standard_DS1_v2"
+ VirtualMachineSizeTypesStandardDS2 VirtualMachineSizeTypes = "Standard_DS2"
+ VirtualMachineSizeTypesStandardDS2V2 VirtualMachineSizeTypes = "Standard_DS2_v2"
+ VirtualMachineSizeTypesStandardDS3 VirtualMachineSizeTypes = "Standard_DS3"
+ VirtualMachineSizeTypesStandardDS3V2 VirtualMachineSizeTypes = "Standard_DS3_v2"
+ VirtualMachineSizeTypesStandardDS4 VirtualMachineSizeTypes = "Standard_DS4"
+ VirtualMachineSizeTypesStandardDS4V2 VirtualMachineSizeTypes = "Standard_DS4_v2"
+ VirtualMachineSizeTypesStandardDS5V2 VirtualMachineSizeTypes = "Standard_DS5_v2"
+ VirtualMachineSizeTypesStandardE16SV3 VirtualMachineSizeTypes = "Standard_E16s_v3"
+ VirtualMachineSizeTypesStandardE16V3 VirtualMachineSizeTypes = "Standard_E16_v3"
+ VirtualMachineSizeTypesStandardE2SV3 VirtualMachineSizeTypes = "Standard_E2s_v3"
+ VirtualMachineSizeTypesStandardE2V3 VirtualMachineSizeTypes = "Standard_E2_v3"
+ VirtualMachineSizeTypesStandardE3216V3 VirtualMachineSizeTypes = "Standard_E32-16_v3"
+ VirtualMachineSizeTypesStandardE328SV3 VirtualMachineSizeTypes = "Standard_E32-8s_v3"
+ VirtualMachineSizeTypesStandardE32SV3 VirtualMachineSizeTypes = "Standard_E32s_v3"
+ VirtualMachineSizeTypesStandardE32V3 VirtualMachineSizeTypes = "Standard_E32_v3"
+ VirtualMachineSizeTypesStandardE4SV3 VirtualMachineSizeTypes = "Standard_E4s_v3"
+ VirtualMachineSizeTypesStandardE4V3 VirtualMachineSizeTypes = "Standard_E4_v3"
+ VirtualMachineSizeTypesStandardE6416SV3 VirtualMachineSizeTypes = "Standard_E64-16s_v3"
+ VirtualMachineSizeTypesStandardE6432SV3 VirtualMachineSizeTypes = "Standard_E64-32s_v3"
+ VirtualMachineSizeTypesStandardE64SV3 VirtualMachineSizeTypes = "Standard_E64s_v3"
+ VirtualMachineSizeTypesStandardE64V3 VirtualMachineSizeTypes = "Standard_E64_v3"
+ VirtualMachineSizeTypesStandardE8SV3 VirtualMachineSizeTypes = "Standard_E8s_v3"
+ VirtualMachineSizeTypesStandardE8V3 VirtualMachineSizeTypes = "Standard_E8_v3"
+ VirtualMachineSizeTypesStandardF1 VirtualMachineSizeTypes = "Standard_F1"
+ VirtualMachineSizeTypesStandardF16 VirtualMachineSizeTypes = "Standard_F16"
+ VirtualMachineSizeTypesStandardF16S VirtualMachineSizeTypes = "Standard_F16s"
+ VirtualMachineSizeTypesStandardF16SV2 VirtualMachineSizeTypes = "Standard_F16s_v2"
+ VirtualMachineSizeTypesStandardF1S VirtualMachineSizeTypes = "Standard_F1s"
+ VirtualMachineSizeTypesStandardF2 VirtualMachineSizeTypes = "Standard_F2"
+ VirtualMachineSizeTypesStandardF2S VirtualMachineSizeTypes = "Standard_F2s"
+ VirtualMachineSizeTypesStandardF2SV2 VirtualMachineSizeTypes = "Standard_F2s_v2"
+ VirtualMachineSizeTypesStandardF32SV2 VirtualMachineSizeTypes = "Standard_F32s_v2"
+ VirtualMachineSizeTypesStandardF4 VirtualMachineSizeTypes = "Standard_F4"
+ VirtualMachineSizeTypesStandardF4S VirtualMachineSizeTypes = "Standard_F4s"
+ VirtualMachineSizeTypesStandardF4SV2 VirtualMachineSizeTypes = "Standard_F4s_v2"
+ VirtualMachineSizeTypesStandardF64SV2 VirtualMachineSizeTypes = "Standard_F64s_v2"
+ VirtualMachineSizeTypesStandardF72SV2 VirtualMachineSizeTypes = "Standard_F72s_v2"
+ VirtualMachineSizeTypesStandardF8 VirtualMachineSizeTypes = "Standard_F8"
+ VirtualMachineSizeTypesStandardF8S VirtualMachineSizeTypes = "Standard_F8s"
+ VirtualMachineSizeTypesStandardF8SV2 VirtualMachineSizeTypes = "Standard_F8s_v2"
+ VirtualMachineSizeTypesStandardG1 VirtualMachineSizeTypes = "Standard_G1"
+ VirtualMachineSizeTypesStandardG2 VirtualMachineSizeTypes = "Standard_G2"
+ VirtualMachineSizeTypesStandardG3 VirtualMachineSizeTypes = "Standard_G3"
+ VirtualMachineSizeTypesStandardG4 VirtualMachineSizeTypes = "Standard_G4"
+ VirtualMachineSizeTypesStandardG5 VirtualMachineSizeTypes = "Standard_G5"
+ VirtualMachineSizeTypesStandardGS1 VirtualMachineSizeTypes = "Standard_GS1"
+ VirtualMachineSizeTypesStandardGS2 VirtualMachineSizeTypes = "Standard_GS2"
+ VirtualMachineSizeTypesStandardGS3 VirtualMachineSizeTypes = "Standard_GS3"
+ VirtualMachineSizeTypesStandardGS4 VirtualMachineSizeTypes = "Standard_GS4"
+ VirtualMachineSizeTypesStandardGS44 VirtualMachineSizeTypes = "Standard_GS4-4"
+ VirtualMachineSizeTypesStandardGS48 VirtualMachineSizeTypes = "Standard_GS4-8"
+ VirtualMachineSizeTypesStandardGS5 VirtualMachineSizeTypes = "Standard_GS5"
+ VirtualMachineSizeTypesStandardGS516 VirtualMachineSizeTypes = "Standard_GS5-16"
+ VirtualMachineSizeTypesStandardGS58 VirtualMachineSizeTypes = "Standard_GS5-8"
+ VirtualMachineSizeTypesStandardH16 VirtualMachineSizeTypes = "Standard_H16"
+ VirtualMachineSizeTypesStandardH16M VirtualMachineSizeTypes = "Standard_H16m"
+ VirtualMachineSizeTypesStandardH16Mr VirtualMachineSizeTypes = "Standard_H16mr"
+ VirtualMachineSizeTypesStandardH16R VirtualMachineSizeTypes = "Standard_H16r"
+ VirtualMachineSizeTypesStandardH8 VirtualMachineSizeTypes = "Standard_H8"
+ VirtualMachineSizeTypesStandardH8M VirtualMachineSizeTypes = "Standard_H8m"
+ VirtualMachineSizeTypesStandardL16S VirtualMachineSizeTypes = "Standard_L16s"
+ VirtualMachineSizeTypesStandardL32S VirtualMachineSizeTypes = "Standard_L32s"
+ VirtualMachineSizeTypesStandardL4S VirtualMachineSizeTypes = "Standard_L4s"
+ VirtualMachineSizeTypesStandardL8S VirtualMachineSizeTypes = "Standard_L8s"
+ VirtualMachineSizeTypesStandardM12832Ms VirtualMachineSizeTypes = "Standard_M128-32ms"
+ VirtualMachineSizeTypesStandardM12864Ms VirtualMachineSizeTypes = "Standard_M128-64ms"
+ VirtualMachineSizeTypesStandardM128Ms VirtualMachineSizeTypes = "Standard_M128ms"
+ VirtualMachineSizeTypesStandardM128S VirtualMachineSizeTypes = "Standard_M128s"
+ VirtualMachineSizeTypesStandardM6416Ms VirtualMachineSizeTypes = "Standard_M64-16ms"
+ VirtualMachineSizeTypesStandardM6432Ms VirtualMachineSizeTypes = "Standard_M64-32ms"
+ VirtualMachineSizeTypesStandardM64Ms VirtualMachineSizeTypes = "Standard_M64ms"
+ VirtualMachineSizeTypesStandardM64S VirtualMachineSizeTypes = "Standard_M64s"
+ VirtualMachineSizeTypesStandardNC12 VirtualMachineSizeTypes = "Standard_NC12"
+ VirtualMachineSizeTypesStandardNC12SV2 VirtualMachineSizeTypes = "Standard_NC12s_v2"
+ VirtualMachineSizeTypesStandardNC12SV3 VirtualMachineSizeTypes = "Standard_NC12s_v3"
+ VirtualMachineSizeTypesStandardNC24 VirtualMachineSizeTypes = "Standard_NC24"
+ VirtualMachineSizeTypesStandardNC24R VirtualMachineSizeTypes = "Standard_NC24r"
+ VirtualMachineSizeTypesStandardNC24RsV2 VirtualMachineSizeTypes = "Standard_NC24rs_v2"
+ VirtualMachineSizeTypesStandardNC24RsV3 VirtualMachineSizeTypes = "Standard_NC24rs_v3"
+ VirtualMachineSizeTypesStandardNC24SV2 VirtualMachineSizeTypes = "Standard_NC24s_v2"
+ VirtualMachineSizeTypesStandardNC24SV3 VirtualMachineSizeTypes = "Standard_NC24s_v3"
+ VirtualMachineSizeTypesStandardNC6 VirtualMachineSizeTypes = "Standard_NC6"
+ VirtualMachineSizeTypesStandardNC6SV2 VirtualMachineSizeTypes = "Standard_NC6s_v2"
+ VirtualMachineSizeTypesStandardNC6SV3 VirtualMachineSizeTypes = "Standard_NC6s_v3"
+ VirtualMachineSizeTypesStandardND12S VirtualMachineSizeTypes = "Standard_ND12s"
+ VirtualMachineSizeTypesStandardND24Rs VirtualMachineSizeTypes = "Standard_ND24rs"
+ VirtualMachineSizeTypesStandardND24S VirtualMachineSizeTypes = "Standard_ND24s"
+ VirtualMachineSizeTypesStandardND6S VirtualMachineSizeTypes = "Standard_ND6s"
+ VirtualMachineSizeTypesStandardNV12 VirtualMachineSizeTypes = "Standard_NV12"
+ VirtualMachineSizeTypesStandardNV24 VirtualMachineSizeTypes = "Standard_NV24"
+ VirtualMachineSizeTypesStandardNV6 VirtualMachineSizeTypes = "Standard_NV6"
+)
+
+// PossibleVirtualMachineSizeTypesValues returns the possible values for the VirtualMachineSizeTypes const type.
+func PossibleVirtualMachineSizeTypesValues() []VirtualMachineSizeTypes {
+ return []VirtualMachineSizeTypes{
+ VirtualMachineSizeTypesBasicA0,
+ VirtualMachineSizeTypesBasicA1,
+ VirtualMachineSizeTypesBasicA2,
+ VirtualMachineSizeTypesBasicA3,
+ VirtualMachineSizeTypesBasicA4,
+ VirtualMachineSizeTypesStandardA0,
+ VirtualMachineSizeTypesStandardA1,
+ VirtualMachineSizeTypesStandardA10,
+ VirtualMachineSizeTypesStandardA11,
+ VirtualMachineSizeTypesStandardA1V2,
+ VirtualMachineSizeTypesStandardA2,
+ VirtualMachineSizeTypesStandardA2MV2,
+ VirtualMachineSizeTypesStandardA2V2,
+ VirtualMachineSizeTypesStandardA3,
+ VirtualMachineSizeTypesStandardA4,
+ VirtualMachineSizeTypesStandardA4MV2,
+ VirtualMachineSizeTypesStandardA4V2,
+ VirtualMachineSizeTypesStandardA5,
+ VirtualMachineSizeTypesStandardA6,
+ VirtualMachineSizeTypesStandardA7,
+ VirtualMachineSizeTypesStandardA8,
+ VirtualMachineSizeTypesStandardA8MV2,
+ VirtualMachineSizeTypesStandardA8V2,
+ VirtualMachineSizeTypesStandardA9,
+ VirtualMachineSizeTypesStandardB1Ms,
+ VirtualMachineSizeTypesStandardB1S,
+ VirtualMachineSizeTypesStandardB2Ms,
+ VirtualMachineSizeTypesStandardB2S,
+ VirtualMachineSizeTypesStandardB4Ms,
+ VirtualMachineSizeTypesStandardB8Ms,
+ VirtualMachineSizeTypesStandardD1,
+ VirtualMachineSizeTypesStandardD11,
+ VirtualMachineSizeTypesStandardD11V2,
+ VirtualMachineSizeTypesStandardD12,
+ VirtualMachineSizeTypesStandardD12V2,
+ VirtualMachineSizeTypesStandardD13,
+ VirtualMachineSizeTypesStandardD13V2,
+ VirtualMachineSizeTypesStandardD14,
+ VirtualMachineSizeTypesStandardD14V2,
+ VirtualMachineSizeTypesStandardD15V2,
+ VirtualMachineSizeTypesStandardD16SV3,
+ VirtualMachineSizeTypesStandardD16V3,
+ VirtualMachineSizeTypesStandardD1V2,
+ VirtualMachineSizeTypesStandardD2,
+ VirtualMachineSizeTypesStandardD2SV3,
+ VirtualMachineSizeTypesStandardD2V2,
+ VirtualMachineSizeTypesStandardD2V3,
+ VirtualMachineSizeTypesStandardD3,
+ VirtualMachineSizeTypesStandardD32SV3,
+ VirtualMachineSizeTypesStandardD32V3,
+ VirtualMachineSizeTypesStandardD3V2,
+ VirtualMachineSizeTypesStandardD4,
+ VirtualMachineSizeTypesStandardD4SV3,
+ VirtualMachineSizeTypesStandardD4V2,
+ VirtualMachineSizeTypesStandardD4V3,
+ VirtualMachineSizeTypesStandardD5V2,
+ VirtualMachineSizeTypesStandardD64SV3,
+ VirtualMachineSizeTypesStandardD64V3,
+ VirtualMachineSizeTypesStandardD8SV3,
+ VirtualMachineSizeTypesStandardD8V3,
+ VirtualMachineSizeTypesStandardDS1,
+ VirtualMachineSizeTypesStandardDS11,
+ VirtualMachineSizeTypesStandardDS11V2,
+ VirtualMachineSizeTypesStandardDS12,
+ VirtualMachineSizeTypesStandardDS12V2,
+ VirtualMachineSizeTypesStandardDS13,
+ VirtualMachineSizeTypesStandardDS132V2,
+ VirtualMachineSizeTypesStandardDS134V2,
+ VirtualMachineSizeTypesStandardDS13V2,
+ VirtualMachineSizeTypesStandardDS14,
+ VirtualMachineSizeTypesStandardDS144V2,
+ VirtualMachineSizeTypesStandardDS148V2,
+ VirtualMachineSizeTypesStandardDS14V2,
+ VirtualMachineSizeTypesStandardDS15V2,
+ VirtualMachineSizeTypesStandardDS1V2,
+ VirtualMachineSizeTypesStandardDS2,
+ VirtualMachineSizeTypesStandardDS2V2,
+ VirtualMachineSizeTypesStandardDS3,
+ VirtualMachineSizeTypesStandardDS3V2,
+ VirtualMachineSizeTypesStandardDS4,
+ VirtualMachineSizeTypesStandardDS4V2,
+ VirtualMachineSizeTypesStandardDS5V2,
+ VirtualMachineSizeTypesStandardE16SV3,
+ VirtualMachineSizeTypesStandardE16V3,
+ VirtualMachineSizeTypesStandardE2SV3,
+ VirtualMachineSizeTypesStandardE2V3,
+ VirtualMachineSizeTypesStandardE3216V3,
+ VirtualMachineSizeTypesStandardE328SV3,
+ VirtualMachineSizeTypesStandardE32SV3,
+ VirtualMachineSizeTypesStandardE32V3,
+ VirtualMachineSizeTypesStandardE4SV3,
+ VirtualMachineSizeTypesStandardE4V3,
+ VirtualMachineSizeTypesStandardE6416SV3,
+ VirtualMachineSizeTypesStandardE6432SV3,
+ VirtualMachineSizeTypesStandardE64SV3,
+ VirtualMachineSizeTypesStandardE64V3,
+ VirtualMachineSizeTypesStandardE8SV3,
+ VirtualMachineSizeTypesStandardE8V3,
+ VirtualMachineSizeTypesStandardF1,
+ VirtualMachineSizeTypesStandardF16,
+ VirtualMachineSizeTypesStandardF16S,
+ VirtualMachineSizeTypesStandardF16SV2,
+ VirtualMachineSizeTypesStandardF1S,
+ VirtualMachineSizeTypesStandardF2,
+ VirtualMachineSizeTypesStandardF2S,
+ VirtualMachineSizeTypesStandardF2SV2,
+ VirtualMachineSizeTypesStandardF32SV2,
+ VirtualMachineSizeTypesStandardF4,
+ VirtualMachineSizeTypesStandardF4S,
+ VirtualMachineSizeTypesStandardF4SV2,
+ VirtualMachineSizeTypesStandardF64SV2,
+ VirtualMachineSizeTypesStandardF72SV2,
+ VirtualMachineSizeTypesStandardF8,
+ VirtualMachineSizeTypesStandardF8S,
+ VirtualMachineSizeTypesStandardF8SV2,
+ VirtualMachineSizeTypesStandardG1,
+ VirtualMachineSizeTypesStandardG2,
+ VirtualMachineSizeTypesStandardG3,
+ VirtualMachineSizeTypesStandardG4,
+ VirtualMachineSizeTypesStandardG5,
+ VirtualMachineSizeTypesStandardGS1,
+ VirtualMachineSizeTypesStandardGS2,
+ VirtualMachineSizeTypesStandardGS3,
+ VirtualMachineSizeTypesStandardGS4,
+ VirtualMachineSizeTypesStandardGS44,
+ VirtualMachineSizeTypesStandardGS48,
+ VirtualMachineSizeTypesStandardGS5,
+ VirtualMachineSizeTypesStandardGS516,
+ VirtualMachineSizeTypesStandardGS58,
+ VirtualMachineSizeTypesStandardH16,
+ VirtualMachineSizeTypesStandardH16M,
+ VirtualMachineSizeTypesStandardH16Mr,
+ VirtualMachineSizeTypesStandardH16R,
+ VirtualMachineSizeTypesStandardH8,
+ VirtualMachineSizeTypesStandardH8M,
+ VirtualMachineSizeTypesStandardL16S,
+ VirtualMachineSizeTypesStandardL32S,
+ VirtualMachineSizeTypesStandardL4S,
+ VirtualMachineSizeTypesStandardL8S,
+ VirtualMachineSizeTypesStandardM12832Ms,
+ VirtualMachineSizeTypesStandardM12864Ms,
+ VirtualMachineSizeTypesStandardM128Ms,
+ VirtualMachineSizeTypesStandardM128S,
+ VirtualMachineSizeTypesStandardM6416Ms,
+ VirtualMachineSizeTypesStandardM6432Ms,
+ VirtualMachineSizeTypesStandardM64Ms,
+ VirtualMachineSizeTypesStandardM64S,
+ VirtualMachineSizeTypesStandardNC12,
+ VirtualMachineSizeTypesStandardNC12SV2,
+ VirtualMachineSizeTypesStandardNC12SV3,
+ VirtualMachineSizeTypesStandardNC24,
+ VirtualMachineSizeTypesStandardNC24R,
+ VirtualMachineSizeTypesStandardNC24RsV2,
+ VirtualMachineSizeTypesStandardNC24RsV3,
+ VirtualMachineSizeTypesStandardNC24SV2,
+ VirtualMachineSizeTypesStandardNC24SV3,
+ VirtualMachineSizeTypesStandardNC6,
+ VirtualMachineSizeTypesStandardNC6SV2,
+ VirtualMachineSizeTypesStandardNC6SV3,
+ VirtualMachineSizeTypesStandardND12S,
+ VirtualMachineSizeTypesStandardND24Rs,
+ VirtualMachineSizeTypesStandardND24S,
+ VirtualMachineSizeTypesStandardND6S,
+ VirtualMachineSizeTypesStandardNV12,
+ VirtualMachineSizeTypesStandardNV24,
+ VirtualMachineSizeTypesStandardNV6,
+ }
+}
+
+// WindowsPatchAssessmentMode - Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.
+// Possible values are:
+// ImageDefault - You control the timing of patch assessments on a virtual machine.
+// AutomaticByPlatform - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.
+type WindowsPatchAssessmentMode string
+
+const (
+ WindowsPatchAssessmentModeAutomaticByPlatform WindowsPatchAssessmentMode = "AutomaticByPlatform"
+ WindowsPatchAssessmentModeImageDefault WindowsPatchAssessmentMode = "ImageDefault"
+)
+
+// PossibleWindowsPatchAssessmentModeValues returns the possible values for the WindowsPatchAssessmentMode const type.
+func PossibleWindowsPatchAssessmentModeValues() []WindowsPatchAssessmentMode {
+ return []WindowsPatchAssessmentMode{
+ WindowsPatchAssessmentModeAutomaticByPlatform,
+ WindowsPatchAssessmentModeImageDefault,
+ }
+}
+
+// WindowsVMGuestPatchAutomaticByPlatformRebootSetting - Specifies the reboot setting for all AutomaticByPlatform patch installation
+// operations.
+type WindowsVMGuestPatchAutomaticByPlatformRebootSetting string
+
+const (
+ WindowsVMGuestPatchAutomaticByPlatformRebootSettingAlways WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Always"
+ WindowsVMGuestPatchAutomaticByPlatformRebootSettingIfRequired WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "IfRequired"
+ WindowsVMGuestPatchAutomaticByPlatformRebootSettingNever WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Never"
+ WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown WindowsVMGuestPatchAutomaticByPlatformRebootSetting = "Unknown"
+)
+
+// PossibleWindowsVMGuestPatchAutomaticByPlatformRebootSettingValues returns the possible values for the WindowsVMGuestPatchAutomaticByPlatformRebootSetting const type.
+func PossibleWindowsVMGuestPatchAutomaticByPlatformRebootSettingValues() []WindowsVMGuestPatchAutomaticByPlatformRebootSetting {
+ return []WindowsVMGuestPatchAutomaticByPlatformRebootSetting{
+ WindowsVMGuestPatchAutomaticByPlatformRebootSettingAlways,
+ WindowsVMGuestPatchAutomaticByPlatformRebootSettingIfRequired,
+ WindowsVMGuestPatchAutomaticByPlatformRebootSettingNever,
+ WindowsVMGuestPatchAutomaticByPlatformRebootSettingUnknown,
+ }
+}
+
+// WindowsVMGuestPatchMode - Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated
+// to virtual machine scale set with OrchestrationMode as Flexible.
+// Possible values are:
+// Manual - You control the application of patches to a virtual machine. You do this by applying patches manually inside the
+// VM. In this mode, automatic updates are disabled; the property
+// WindowsConfiguration.enableAutomaticUpdates must be false
+// AutomaticByOS - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates
+// must be true.
+// AutomaticByPlatform - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and
+// WindowsConfiguration.enableAutomaticUpdates must be true
+type WindowsVMGuestPatchMode string
+
+const (
+ WindowsVMGuestPatchModeAutomaticByOS WindowsVMGuestPatchMode = "AutomaticByOS"
+ WindowsVMGuestPatchModeAutomaticByPlatform WindowsVMGuestPatchMode = "AutomaticByPlatform"
+ WindowsVMGuestPatchModeManual WindowsVMGuestPatchMode = "Manual"
+)
+
+// PossibleWindowsVMGuestPatchModeValues returns the possible values for the WindowsVMGuestPatchMode const type.
+func PossibleWindowsVMGuestPatchModeValues() []WindowsVMGuestPatchMode {
+ return []WindowsVMGuestPatchMode{
+ WindowsVMGuestPatchModeAutomaticByOS,
+ WindowsVMGuestPatchModeAutomaticByPlatform,
+ WindowsVMGuestPatchModeManual,
+ }
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/dedicatedhostgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/dedicatedhostgroups_client.go
new file mode 100644
index 000000000..ae2c4f366
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/dedicatedhostgroups_client.go
@@ -0,0 +1,423 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// DedicatedHostGroupsClient contains the methods for the DedicatedHostGroups group.
+// Don't use this type directly, use NewDedicatedHostGroupsClient() instead.
+type DedicatedHostGroupsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewDedicatedHostGroupsClient creates a new instance of DedicatedHostGroupsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewDedicatedHostGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DedicatedHostGroupsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &DedicatedHostGroupsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// CreateOrUpdate - Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please
+// see Dedicated Host Documentation [https://go.microsoft.com/fwlink/?linkid=2082596]
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - hostGroupName - The name of the dedicated host group.
+// - parameters - Parameters supplied to the Create Dedicated Host Group.
+// - options - DedicatedHostGroupsClientCreateOrUpdateOptions contains the optional parameters for the DedicatedHostGroupsClient.CreateOrUpdate
+// method.
+func (client *DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroup, options *DedicatedHostGroupsClientCreateOrUpdateOptions) (DedicatedHostGroupsClientCreateOrUpdateResponse, error) {
+ var err error
+ const operationName = "DedicatedHostGroupsClient.CreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, hostGroupName, parameters, options)
+ if err != nil {
+ return DedicatedHostGroupsClientCreateOrUpdateResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return DedicatedHostGroupsClientCreateOrUpdateResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return DedicatedHostGroupsClientCreateOrUpdateResponse{}, err
+ }
+ resp, err := client.createOrUpdateHandleResponse(httpResp)
+ return resp, err
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *DedicatedHostGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroup, options *DedicatedHostGroupsClientCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if hostGroupName == "" {
+ return nil, errors.New("parameter hostGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostGroupName}", url.PathEscape(hostGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// createOrUpdateHandleResponse handles the CreateOrUpdate response.
+func (client *DedicatedHostGroupsClient) createOrUpdateHandleResponse(resp *http.Response) (DedicatedHostGroupsClientCreateOrUpdateResponse, error) {
+ result := DedicatedHostGroupsClientCreateOrUpdateResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DedicatedHostGroup); err != nil {
+ return DedicatedHostGroupsClientCreateOrUpdateResponse{}, err
+ }
+ return result, nil
+}
+
+// Delete - Delete a dedicated host group.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - hostGroupName - The name of the dedicated host group.
+// - options - DedicatedHostGroupsClientDeleteOptions contains the optional parameters for the DedicatedHostGroupsClient.Delete
+// method.
+func (client *DedicatedHostGroupsClient) Delete(ctx context.Context, resourceGroupName string, hostGroupName string, options *DedicatedHostGroupsClientDeleteOptions) (DedicatedHostGroupsClientDeleteResponse, error) {
+ var err error
+ const operationName = "DedicatedHostGroupsClient.Delete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, hostGroupName, options)
+ if err != nil {
+ return DedicatedHostGroupsClientDeleteResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return DedicatedHostGroupsClientDeleteResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return DedicatedHostGroupsClientDeleteResponse{}, err
+ }
+ return DedicatedHostGroupsClientDeleteResponse{}, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *DedicatedHostGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, hostGroupName string, options *DedicatedHostGroupsClientDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if hostGroupName == "" {
+ return nil, errors.New("parameter hostGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostGroupName}", url.PathEscape(hostGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Retrieves information about a dedicated host group.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - hostGroupName - The name of the dedicated host group.
+// - options - DedicatedHostGroupsClientGetOptions contains the optional parameters for the DedicatedHostGroupsClient.Get method.
+func (client *DedicatedHostGroupsClient) Get(ctx context.Context, resourceGroupName string, hostGroupName string, options *DedicatedHostGroupsClientGetOptions) (DedicatedHostGroupsClientGetResponse, error) {
+ var err error
+ const operationName = "DedicatedHostGroupsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, hostGroupName, options)
+ if err != nil {
+ return DedicatedHostGroupsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return DedicatedHostGroupsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return DedicatedHostGroupsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *DedicatedHostGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, hostGroupName string, options *DedicatedHostGroupsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if hostGroupName == "" {
+ return nil, errors.New("parameter hostGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostGroupName}", url.PathEscape(hostGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *DedicatedHostGroupsClient) getHandleResponse(resp *http.Response) (DedicatedHostGroupsClientGetResponse, error) {
+ result := DedicatedHostGroupsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DedicatedHostGroup); err != nil {
+ return DedicatedHostGroupsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByResourceGroupPager - Lists all of the dedicated host groups in the specified resource group. Use the nextLink
+// property in the response to get the next page of dedicated host groups.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - options - DedicatedHostGroupsClientListByResourceGroupOptions contains the optional parameters for the DedicatedHostGroupsClient.NewListByResourceGroupPager
+// method.
+func (client *DedicatedHostGroupsClient) NewListByResourceGroupPager(resourceGroupName string, options *DedicatedHostGroupsClientListByResourceGroupOptions) *runtime.Pager[DedicatedHostGroupsClientListByResourceGroupResponse] {
+ return runtime.NewPager(runtime.PagingHandler[DedicatedHostGroupsClientListByResourceGroupResponse]{
+ More: func(page DedicatedHostGroupsClientListByResourceGroupResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *DedicatedHostGroupsClientListByResourceGroupResponse) (DedicatedHostGroupsClientListByResourceGroupResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DedicatedHostGroupsClient.NewListByResourceGroupPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return DedicatedHostGroupsClientListByResourceGroupResponse{}, err
+ }
+ return client.listByResourceGroupHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByResourceGroupCreateRequest creates the ListByResourceGroup request.
+func (client *DedicatedHostGroupsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *DedicatedHostGroupsClientListByResourceGroupOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByResourceGroupHandleResponse handles the ListByResourceGroup response.
+func (client *DedicatedHostGroupsClient) listByResourceGroupHandleResponse(resp *http.Response) (DedicatedHostGroupsClientListByResourceGroupResponse, error) {
+ result := DedicatedHostGroupsClientListByResourceGroupResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DedicatedHostGroupListResult); err != nil {
+ return DedicatedHostGroupsClientListByResourceGroupResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListBySubscriptionPager - Lists all of the dedicated host groups in the subscription. Use the nextLink property in the
+// response to get the next page of dedicated host groups.
+//
+// Generated from API version 2024-03-01
+// - options - DedicatedHostGroupsClientListBySubscriptionOptions contains the optional parameters for the DedicatedHostGroupsClient.NewListBySubscriptionPager
+// method.
+func (client *DedicatedHostGroupsClient) NewListBySubscriptionPager(options *DedicatedHostGroupsClientListBySubscriptionOptions) *runtime.Pager[DedicatedHostGroupsClientListBySubscriptionResponse] {
+ return runtime.NewPager(runtime.PagingHandler[DedicatedHostGroupsClientListBySubscriptionResponse]{
+ More: func(page DedicatedHostGroupsClientListBySubscriptionResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *DedicatedHostGroupsClientListBySubscriptionResponse) (DedicatedHostGroupsClientListBySubscriptionResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DedicatedHostGroupsClient.NewListBySubscriptionPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listBySubscriptionCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return DedicatedHostGroupsClientListBySubscriptionResponse{}, err
+ }
+ return client.listBySubscriptionHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listBySubscriptionCreateRequest creates the ListBySubscription request.
+func (client *DedicatedHostGroupsClient) listBySubscriptionCreateRequest(ctx context.Context, options *DedicatedHostGroupsClientListBySubscriptionOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/hostGroups"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listBySubscriptionHandleResponse handles the ListBySubscription response.
+func (client *DedicatedHostGroupsClient) listBySubscriptionHandleResponse(resp *http.Response) (DedicatedHostGroupsClientListBySubscriptionResponse, error) {
+ result := DedicatedHostGroupsClientListBySubscriptionResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DedicatedHostGroupListResult); err != nil {
+ return DedicatedHostGroupsClientListBySubscriptionResponse{}, err
+ }
+ return result, nil
+}
+
+// Update - Update an dedicated host group.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - hostGroupName - The name of the dedicated host group.
+// - parameters - Parameters supplied to the Update Dedicated Host Group operation.
+// - options - DedicatedHostGroupsClientUpdateOptions contains the optional parameters for the DedicatedHostGroupsClient.Update
+// method.
+func (client *DedicatedHostGroupsClient) Update(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroupUpdate, options *DedicatedHostGroupsClientUpdateOptions) (DedicatedHostGroupsClientUpdateResponse, error) {
+ var err error
+ const operationName = "DedicatedHostGroupsClient.Update"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, hostGroupName, parameters, options)
+ if err != nil {
+ return DedicatedHostGroupsClientUpdateResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return DedicatedHostGroupsClientUpdateResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return DedicatedHostGroupsClientUpdateResponse{}, err
+ }
+ resp, err := client.updateHandleResponse(httpResp)
+ return resp, err
+}
+
+// updateCreateRequest creates the Update request.
+func (client *DedicatedHostGroupsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroupUpdate, options *DedicatedHostGroupsClientUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if hostGroupName == "" {
+ return nil, errors.New("parameter hostGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostGroupName}", url.PathEscape(hostGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// updateHandleResponse handles the Update response.
+func (client *DedicatedHostGroupsClient) updateHandleResponse(resp *http.Response) (DedicatedHostGroupsClientUpdateResponse, error) {
+ result := DedicatedHostGroupsClientUpdateResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DedicatedHostGroup); err != nil {
+ return DedicatedHostGroupsClientUpdateResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/dedicatedhosts_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/dedicatedhosts_client.go
new file mode 100644
index 000000000..66ae1f99b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/dedicatedhosts_client.go
@@ -0,0 +1,680 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// DedicatedHostsClient contains the methods for the DedicatedHosts group.
+// Don't use this type directly, use NewDedicatedHostsClient() instead.
+type DedicatedHostsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewDedicatedHostsClient creates a new instance of DedicatedHostsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewDedicatedHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DedicatedHostsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &DedicatedHostsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - Create or update a dedicated host .
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - hostGroupName - The name of the dedicated host group.
+// - hostName - The name of the dedicated host .
+// - parameters - Parameters supplied to the Create Dedicated Host.
+// - options - DedicatedHostsClientBeginCreateOrUpdateOptions contains the optional parameters for the DedicatedHostsClient.BeginCreateOrUpdate
+// method.
+func (client *DedicatedHostsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHost, options *DedicatedHostsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DedicatedHostsClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, hostGroupName, hostName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DedicatedHostsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DedicatedHostsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - Create or update a dedicated host .
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *DedicatedHostsClient) createOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHost, options *DedicatedHostsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DedicatedHostsClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, hostGroupName, hostName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *DedicatedHostsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHost, options *DedicatedHostsClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if hostGroupName == "" {
+ return nil, errors.New("parameter hostGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostGroupName}", url.PathEscape(hostGroupName))
+ if hostName == "" {
+ return nil, errors.New("parameter hostName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - Delete a dedicated host.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - hostGroupName - The name of the dedicated host group.
+// - hostName - The name of the dedicated host.
+// - options - DedicatedHostsClientBeginDeleteOptions contains the optional parameters for the DedicatedHostsClient.BeginDelete
+// method.
+func (client *DedicatedHostsClient) BeginDelete(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginDeleteOptions) (*runtime.Poller[DedicatedHostsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, hostGroupName, hostName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DedicatedHostsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DedicatedHostsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Delete a dedicated host.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *DedicatedHostsClient) deleteOperation(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DedicatedHostsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, hostGroupName, hostName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *DedicatedHostsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if hostGroupName == "" {
+ return nil, errors.New("parameter hostGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostGroupName}", url.PathEscape(hostGroupName))
+ if hostName == "" {
+ return nil, errors.New("parameter hostName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Retrieves information about a dedicated host.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - hostGroupName - The name of the dedicated host group.
+// - hostName - The name of the dedicated host.
+// - options - DedicatedHostsClientGetOptions contains the optional parameters for the DedicatedHostsClient.Get method.
+func (client *DedicatedHostsClient) Get(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientGetOptions) (DedicatedHostsClientGetResponse, error) {
+ var err error
+ const operationName = "DedicatedHostsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, hostGroupName, hostName, options)
+ if err != nil {
+ return DedicatedHostsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return DedicatedHostsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return DedicatedHostsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *DedicatedHostsClient) getCreateRequest(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if hostGroupName == "" {
+ return nil, errors.New("parameter hostGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostGroupName}", url.PathEscape(hostGroupName))
+ if hostName == "" {
+ return nil, errors.New("parameter hostName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *DedicatedHostsClient) getHandleResponse(resp *http.Response) (DedicatedHostsClientGetResponse, error) {
+ result := DedicatedHostsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DedicatedHost); err != nil {
+ return DedicatedHostsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListAvailableSizesPager - Lists all available dedicated host sizes to which the specified dedicated host can be resized.
+// NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - hostGroupName - The name of the dedicated host group.
+// - hostName - The name of the dedicated host.
+// - options - DedicatedHostsClientListAvailableSizesOptions contains the optional parameters for the DedicatedHostsClient.NewListAvailableSizesPager
+// method.
+func (client *DedicatedHostsClient) NewListAvailableSizesPager(resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientListAvailableSizesOptions) *runtime.Pager[DedicatedHostsClientListAvailableSizesResponse] {
+ return runtime.NewPager(runtime.PagingHandler[DedicatedHostsClientListAvailableSizesResponse]{
+ More: func(page DedicatedHostsClientListAvailableSizesResponse) bool {
+ return false
+ },
+ Fetcher: func(ctx context.Context, page *DedicatedHostsClientListAvailableSizesResponse) (DedicatedHostsClientListAvailableSizesResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DedicatedHostsClient.NewListAvailableSizesPager")
+ req, err := client.listAvailableSizesCreateRequest(ctx, resourceGroupName, hostGroupName, hostName, options)
+ if err != nil {
+ return DedicatedHostsClientListAvailableSizesResponse{}, err
+ }
+ resp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return DedicatedHostsClientListAvailableSizesResponse{}, err
+ }
+ if !runtime.HasStatusCode(resp, http.StatusOK) {
+ return DedicatedHostsClientListAvailableSizesResponse{}, runtime.NewResponseError(resp)
+ }
+ return client.listAvailableSizesHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listAvailableSizesCreateRequest creates the ListAvailableSizes request.
+func (client *DedicatedHostsClient) listAvailableSizesCreateRequest(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientListAvailableSizesOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}/hostSizes"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if hostGroupName == "" {
+ return nil, errors.New("parameter hostGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostGroupName}", url.PathEscape(hostGroupName))
+ if hostName == "" {
+ return nil, errors.New("parameter hostName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listAvailableSizesHandleResponse handles the ListAvailableSizes response.
+func (client *DedicatedHostsClient) listAvailableSizesHandleResponse(resp *http.Response) (DedicatedHostsClientListAvailableSizesResponse, error) {
+ result := DedicatedHostsClientListAvailableSizesResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DedicatedHostSizeListResult); err != nil {
+ return DedicatedHostsClientListAvailableSizesResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByHostGroupPager - Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property
+// in the response to get the next page of dedicated hosts.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - hostGroupName - The name of the dedicated host group.
+// - options - DedicatedHostsClientListByHostGroupOptions contains the optional parameters for the DedicatedHostsClient.NewListByHostGroupPager
+// method.
+func (client *DedicatedHostsClient) NewListByHostGroupPager(resourceGroupName string, hostGroupName string, options *DedicatedHostsClientListByHostGroupOptions) *runtime.Pager[DedicatedHostsClientListByHostGroupResponse] {
+ return runtime.NewPager(runtime.PagingHandler[DedicatedHostsClientListByHostGroupResponse]{
+ More: func(page DedicatedHostsClientListByHostGroupResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *DedicatedHostsClientListByHostGroupResponse) (DedicatedHostsClientListByHostGroupResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DedicatedHostsClient.NewListByHostGroupPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByHostGroupCreateRequest(ctx, resourceGroupName, hostGroupName, options)
+ }, nil)
+ if err != nil {
+ return DedicatedHostsClientListByHostGroupResponse{}, err
+ }
+ return client.listByHostGroupHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByHostGroupCreateRequest creates the ListByHostGroup request.
+func (client *DedicatedHostsClient) listByHostGroupCreateRequest(ctx context.Context, resourceGroupName string, hostGroupName string, options *DedicatedHostsClientListByHostGroupOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if hostGroupName == "" {
+ return nil, errors.New("parameter hostGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostGroupName}", url.PathEscape(hostGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByHostGroupHandleResponse handles the ListByHostGroup response.
+func (client *DedicatedHostsClient) listByHostGroupHandleResponse(resp *http.Response) (DedicatedHostsClientListByHostGroupResponse, error) {
+ result := DedicatedHostsClientListByHostGroupResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DedicatedHostListResult); err != nil {
+ return DedicatedHostsClientListByHostGroupResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginRedeploy - Redeploy the dedicated host. The operation will complete successfully once the dedicated host has migrated
+// to a new node and is running. To determine the health of VMs deployed on the dedicated host
+// after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview
+// for more details.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - hostGroupName - The name of the dedicated host group.
+// - hostName - The name of the dedicated host.
+// - options - DedicatedHostsClientBeginRedeployOptions contains the optional parameters for the DedicatedHostsClient.BeginRedeploy
+// method.
+func (client *DedicatedHostsClient) BeginRedeploy(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginRedeployOptions) (*runtime.Poller[DedicatedHostsClientRedeployResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.redeploy(ctx, resourceGroupName, hostGroupName, hostName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DedicatedHostsClientRedeployResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DedicatedHostsClientRedeployResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Redeploy - Redeploy the dedicated host. The operation will complete successfully once the dedicated host has migrated to
+// a new node and is running. To determine the health of VMs deployed on the dedicated host
+// after the redeploy check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview
+// for more details.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *DedicatedHostsClient) redeploy(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginRedeployOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DedicatedHostsClient.BeginRedeploy"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.redeployCreateRequest(ctx, resourceGroupName, hostGroupName, hostName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// redeployCreateRequest creates the Redeploy request.
+func (client *DedicatedHostsClient) redeployCreateRequest(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginRedeployOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}/redeploy"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if hostGroupName == "" {
+ return nil, errors.New("parameter hostGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostGroupName}", url.PathEscape(hostGroupName))
+ if hostName == "" {
+ return nil, errors.New("parameter hostName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginRestart - Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted
+// and is running. To determine the health of VMs deployed on the dedicated host after the
+// restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview
+// for more details.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - hostGroupName - The name of the dedicated host group.
+// - hostName - The name of the dedicated host.
+// - options - DedicatedHostsClientBeginRestartOptions contains the optional parameters for the DedicatedHostsClient.BeginRestart
+// method.
+func (client *DedicatedHostsClient) BeginRestart(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginRestartOptions) (*runtime.Poller[DedicatedHostsClientRestartResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.restart(ctx, resourceGroupName, hostGroupName, hostName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DedicatedHostsClientRestartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DedicatedHostsClientRestartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Restart - Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and
+// is running. To determine the health of VMs deployed on the dedicated host after the
+// restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview
+// for more details.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *DedicatedHostsClient) restart(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginRestartOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DedicatedHostsClient.BeginRestart"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.restartCreateRequest(ctx, resourceGroupName, hostGroupName, hostName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// restartCreateRequest creates the Restart request.
+func (client *DedicatedHostsClient) restartCreateRequest(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, options *DedicatedHostsClientBeginRestartOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}/restart"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if hostGroupName == "" {
+ return nil, errors.New("parameter hostGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostGroupName}", url.PathEscape(hostGroupName))
+ if hostName == "" {
+ return nil, errors.New("parameter hostName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginUpdate - Update a dedicated host .
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - hostGroupName - The name of the dedicated host group.
+// - hostName - The name of the dedicated host .
+// - parameters - Parameters supplied to the Update Dedicated Host operation.
+// - options - DedicatedHostsClientBeginUpdateOptions contains the optional parameters for the DedicatedHostsClient.BeginUpdate
+// method.
+func (client *DedicatedHostsClient) BeginUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHostUpdate, options *DedicatedHostsClientBeginUpdateOptions) (*runtime.Poller[DedicatedHostsClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, hostGroupName, hostName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DedicatedHostsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DedicatedHostsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Update a dedicated host .
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *DedicatedHostsClient) update(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHostUpdate, options *DedicatedHostsClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DedicatedHostsClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, hostGroupName, hostName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *DedicatedHostsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHostUpdate, options *DedicatedHostsClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if hostGroupName == "" {
+ return nil, errors.New("parameter hostGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostGroupName}", url.PathEscape(hostGroupName))
+ if hostName == "" {
+ return nil, errors.New("parameter hostName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{hostName}", url.PathEscape(hostName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/diskaccesses_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/diskaccesses_client.go
new file mode 100644
index 000000000..0bea05f3e
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/diskaccesses_client.go
@@ -0,0 +1,846 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// DiskAccessesClient contains the methods for the DiskAccesses group.
+// Don't use this type directly, use NewDiskAccessesClient() instead.
+type DiskAccessesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewDiskAccessesClient creates a new instance of DiskAccessesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewDiskAccessesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiskAccessesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &DiskAccessesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - Creates or updates a disk access resource
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
+// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// - diskAccess - disk access object supplied in the body of the Put disk access operation.
+// - options - DiskAccessesClientBeginCreateOrUpdateOptions contains the optional parameters for the DiskAccessesClient.BeginCreateOrUpdate
+// method.
+func (client *DiskAccessesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccess, options *DiskAccessesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DiskAccessesClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, diskAccessName, diskAccess, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskAccessesClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskAccessesClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - Creates or updates a disk access resource
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DiskAccessesClient) createOrUpdate(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccess, options *DiskAccessesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DiskAccessesClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, diskAccessName, diskAccess, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *DiskAccessesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccess, options *DiskAccessesClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskAccessName == "" {
+ return nil, errors.New("parameter diskAccessName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskAccessName}", url.PathEscape(diskAccessName))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, diskAccess); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - Deletes a disk access resource.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
+// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// - options - DiskAccessesClientBeginDeleteOptions contains the optional parameters for the DiskAccessesClient.BeginDelete
+// method.
+func (client *DiskAccessesClient) BeginDelete(ctx context.Context, resourceGroupName string, diskAccessName string, options *DiskAccessesClientBeginDeleteOptions) (*runtime.Poller[DiskAccessesClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, diskAccessName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskAccessesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskAccessesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Deletes a disk access resource.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DiskAccessesClient) deleteOperation(ctx context.Context, resourceGroupName string, diskAccessName string, options *DiskAccessesClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DiskAccessesClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, diskAccessName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *DiskAccessesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, diskAccessName string, options *DiskAccessesClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskAccessName == "" {
+ return nil, errors.New("parameter diskAccessName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskAccessName}", url.PathEscape(diskAccessName))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginDeleteAPrivateEndpointConnection - Deletes a private endpoint connection under a disk access resource.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
+// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// - privateEndpointConnectionName - The name of the private endpoint connection.
+// - options - DiskAccessesClientBeginDeleteAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccessesClient.BeginDeleteAPrivateEndpointConnection
+// method.
+func (client *DiskAccessesClient) BeginDeleteAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, options *DiskAccessesClientBeginDeleteAPrivateEndpointConnectionOptions) (*runtime.Poller[DiskAccessesClientDeleteAPrivateEndpointConnectionResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteAPrivateEndpointConnection(ctx, resourceGroupName, diskAccessName, privateEndpointConnectionName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskAccessesClientDeleteAPrivateEndpointConnectionResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskAccessesClientDeleteAPrivateEndpointConnectionResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// DeleteAPrivateEndpointConnection - Deletes a private endpoint connection under a disk access resource.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DiskAccessesClient) deleteAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, options *DiskAccessesClientBeginDeleteAPrivateEndpointConnectionOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DiskAccessesClient.BeginDeleteAPrivateEndpointConnection"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteAPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, diskAccessName, privateEndpointConnectionName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteAPrivateEndpointConnectionCreateRequest creates the DeleteAPrivateEndpointConnection request.
+func (client *DiskAccessesClient) deleteAPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, options *DiskAccessesClientBeginDeleteAPrivateEndpointConnectionOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskAccessName == "" {
+ return nil, errors.New("parameter diskAccessName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskAccessName}", url.PathEscape(diskAccessName))
+ if privateEndpointConnectionName == "" {
+ return nil, errors.New("parameter privateEndpointConnectionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Gets information about a disk access resource.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
+// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// - options - DiskAccessesClientGetOptions contains the optional parameters for the DiskAccessesClient.Get method.
+func (client *DiskAccessesClient) Get(ctx context.Context, resourceGroupName string, diskAccessName string, options *DiskAccessesClientGetOptions) (DiskAccessesClientGetResponse, error) {
+ var err error
+ const operationName = "DiskAccessesClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, diskAccessName, options)
+ if err != nil {
+ return DiskAccessesClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return DiskAccessesClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return DiskAccessesClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *DiskAccessesClient) getCreateRequest(ctx context.Context, resourceGroupName string, diskAccessName string, options *DiskAccessesClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskAccessName == "" {
+ return nil, errors.New("parameter diskAccessName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskAccessName}", url.PathEscape(diskAccessName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *DiskAccessesClient) getHandleResponse(resp *http.Response) (DiskAccessesClientGetResponse, error) {
+ result := DiskAccessesClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DiskAccess); err != nil {
+ return DiskAccessesClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// GetAPrivateEndpointConnection - Gets information about a private endpoint connection under a disk access resource.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
+// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// - privateEndpointConnectionName - The name of the private endpoint connection.
+// - options - DiskAccessesClientGetAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccessesClient.GetAPrivateEndpointConnection
+// method.
+func (client *DiskAccessesClient) GetAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, options *DiskAccessesClientGetAPrivateEndpointConnectionOptions) (DiskAccessesClientGetAPrivateEndpointConnectionResponse, error) {
+ var err error
+ const operationName = "DiskAccessesClient.GetAPrivateEndpointConnection"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getAPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, diskAccessName, privateEndpointConnectionName, options)
+ if err != nil {
+ return DiskAccessesClientGetAPrivateEndpointConnectionResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return DiskAccessesClientGetAPrivateEndpointConnectionResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return DiskAccessesClientGetAPrivateEndpointConnectionResponse{}, err
+ }
+ resp, err := client.getAPrivateEndpointConnectionHandleResponse(httpResp)
+ return resp, err
+}
+
+// getAPrivateEndpointConnectionCreateRequest creates the GetAPrivateEndpointConnection request.
+func (client *DiskAccessesClient) getAPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, options *DiskAccessesClientGetAPrivateEndpointConnectionOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskAccessName == "" {
+ return nil, errors.New("parameter diskAccessName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskAccessName}", url.PathEscape(diskAccessName))
+ if privateEndpointConnectionName == "" {
+ return nil, errors.New("parameter privateEndpointConnectionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getAPrivateEndpointConnectionHandleResponse handles the GetAPrivateEndpointConnection response.
+func (client *DiskAccessesClient) getAPrivateEndpointConnectionHandleResponse(resp *http.Response) (DiskAccessesClientGetAPrivateEndpointConnectionResponse, error) {
+ result := DiskAccessesClientGetAPrivateEndpointConnectionResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil {
+ return DiskAccessesClientGetAPrivateEndpointConnectionResponse{}, err
+ }
+ return result, nil
+}
+
+// GetPrivateLinkResources - Gets the private link resources possible under disk access resource
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
+// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// - options - DiskAccessesClientGetPrivateLinkResourcesOptions contains the optional parameters for the DiskAccessesClient.GetPrivateLinkResources
+// method.
+func (client *DiskAccessesClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, diskAccessName string, options *DiskAccessesClientGetPrivateLinkResourcesOptions) (DiskAccessesClientGetPrivateLinkResourcesResponse, error) {
+ var err error
+ const operationName = "DiskAccessesClient.GetPrivateLinkResources"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getPrivateLinkResourcesCreateRequest(ctx, resourceGroupName, diskAccessName, options)
+ if err != nil {
+ return DiskAccessesClientGetPrivateLinkResourcesResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return DiskAccessesClientGetPrivateLinkResourcesResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return DiskAccessesClientGetPrivateLinkResourcesResponse{}, err
+ }
+ resp, err := client.getPrivateLinkResourcesHandleResponse(httpResp)
+ return resp, err
+}
+
+// getPrivateLinkResourcesCreateRequest creates the GetPrivateLinkResources request.
+func (client *DiskAccessesClient) getPrivateLinkResourcesCreateRequest(ctx context.Context, resourceGroupName string, diskAccessName string, options *DiskAccessesClientGetPrivateLinkResourcesOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskAccessName == "" {
+ return nil, errors.New("parameter diskAccessName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskAccessName}", url.PathEscape(diskAccessName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getPrivateLinkResourcesHandleResponse handles the GetPrivateLinkResources response.
+func (client *DiskAccessesClient) getPrivateLinkResourcesHandleResponse(resp *http.Response) (DiskAccessesClientGetPrivateLinkResourcesResponse, error) {
+ result := DiskAccessesClientGetPrivateLinkResourcesResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkResourceListResult); err != nil {
+ return DiskAccessesClientGetPrivateLinkResourcesResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - Lists all the disk access resources under a subscription.
+//
+// Generated from API version 2023-10-02
+// - options - DiskAccessesClientListOptions contains the optional parameters for the DiskAccessesClient.NewListPager method.
+func (client *DiskAccessesClient) NewListPager(options *DiskAccessesClientListOptions) *runtime.Pager[DiskAccessesClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[DiskAccessesClientListResponse]{
+ More: func(page DiskAccessesClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *DiskAccessesClientListResponse) (DiskAccessesClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiskAccessesClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return DiskAccessesClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *DiskAccessesClient) listCreateRequest(ctx context.Context, options *DiskAccessesClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *DiskAccessesClient) listHandleResponse(resp *http.Response) (DiskAccessesClientListResponse, error) {
+ result := DiskAccessesClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DiskAccessList); err != nil {
+ return DiskAccessesClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByResourceGroupPager - Lists all the disk access resources under a resource group.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - options - DiskAccessesClientListByResourceGroupOptions contains the optional parameters for the DiskAccessesClient.NewListByResourceGroupPager
+// method.
+func (client *DiskAccessesClient) NewListByResourceGroupPager(resourceGroupName string, options *DiskAccessesClientListByResourceGroupOptions) *runtime.Pager[DiskAccessesClientListByResourceGroupResponse] {
+ return runtime.NewPager(runtime.PagingHandler[DiskAccessesClientListByResourceGroupResponse]{
+ More: func(page DiskAccessesClientListByResourceGroupResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *DiskAccessesClientListByResourceGroupResponse) (DiskAccessesClientListByResourceGroupResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiskAccessesClient.NewListByResourceGroupPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return DiskAccessesClientListByResourceGroupResponse{}, err
+ }
+ return client.listByResourceGroupHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByResourceGroupCreateRequest creates the ListByResourceGroup request.
+func (client *DiskAccessesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *DiskAccessesClientListByResourceGroupOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByResourceGroupHandleResponse handles the ListByResourceGroup response.
+func (client *DiskAccessesClient) listByResourceGroupHandleResponse(resp *http.Response) (DiskAccessesClientListByResourceGroupResponse, error) {
+ result := DiskAccessesClientListByResourceGroupResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DiskAccessList); err != nil {
+ return DiskAccessesClientListByResourceGroupResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPrivateEndpointConnectionsPager - List information about private endpoint connections under a disk access resource
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
+// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// - options - DiskAccessesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the DiskAccessesClient.NewListPrivateEndpointConnectionsPager
+// method.
+func (client *DiskAccessesClient) NewListPrivateEndpointConnectionsPager(resourceGroupName string, diskAccessName string, options *DiskAccessesClientListPrivateEndpointConnectionsOptions) *runtime.Pager[DiskAccessesClientListPrivateEndpointConnectionsResponse] {
+ return runtime.NewPager(runtime.PagingHandler[DiskAccessesClientListPrivateEndpointConnectionsResponse]{
+ More: func(page DiskAccessesClientListPrivateEndpointConnectionsResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *DiskAccessesClientListPrivateEndpointConnectionsResponse) (DiskAccessesClientListPrivateEndpointConnectionsResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiskAccessesClient.NewListPrivateEndpointConnectionsPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listPrivateEndpointConnectionsCreateRequest(ctx, resourceGroupName, diskAccessName, options)
+ }, nil)
+ if err != nil {
+ return DiskAccessesClientListPrivateEndpointConnectionsResponse{}, err
+ }
+ return client.listPrivateEndpointConnectionsHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listPrivateEndpointConnectionsCreateRequest creates the ListPrivateEndpointConnections request.
+func (client *DiskAccessesClient) listPrivateEndpointConnectionsCreateRequest(ctx context.Context, resourceGroupName string, diskAccessName string, options *DiskAccessesClientListPrivateEndpointConnectionsOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskAccessName == "" {
+ return nil, errors.New("parameter diskAccessName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskAccessName}", url.PathEscape(diskAccessName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listPrivateEndpointConnectionsHandleResponse handles the ListPrivateEndpointConnections response.
+func (client *DiskAccessesClient) listPrivateEndpointConnectionsHandleResponse(resp *http.Response) (DiskAccessesClientListPrivateEndpointConnectionsResponse, error) {
+ result := DiskAccessesClientListPrivateEndpointConnectionsResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionListResult); err != nil {
+ return DiskAccessesClientListPrivateEndpointConnectionsResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginUpdate - Updates (patches) a disk access resource.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
+// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// - diskAccess - disk access object supplied in the body of the Patch disk access operation.
+// - options - DiskAccessesClientBeginUpdateOptions contains the optional parameters for the DiskAccessesClient.BeginUpdate
+// method.
+func (client *DiskAccessesClient) BeginUpdate(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccessUpdate, options *DiskAccessesClientBeginUpdateOptions) (*runtime.Poller[DiskAccessesClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, diskAccessName, diskAccess, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskAccessesClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskAccessesClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Updates (patches) a disk access resource.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DiskAccessesClient) update(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccessUpdate, options *DiskAccessesClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DiskAccessesClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, diskAccessName, diskAccess, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *DiskAccessesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccessUpdate, options *DiskAccessesClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskAccessName == "" {
+ return nil, errors.New("parameter diskAccessName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskAccessName}", url.PathEscape(diskAccessName))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, diskAccess); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginUpdateAPrivateEndpointConnection - Approve or reject a private endpoint connection under disk access resource, this
+// can't be used to create a new private endpoint connection.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskAccessName - The name of the disk access resource that is being created. The name can't be changed after the disk encryption
+// set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// - privateEndpointConnectionName - The name of the private endpoint connection.
+// - privateEndpointConnection - private endpoint connection object supplied in the body of the Put private endpoint connection
+// operation.
+// - options - DiskAccessesClientBeginUpdateAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccessesClient.BeginUpdateAPrivateEndpointConnection
+// method.
+func (client *DiskAccessesClient) BeginUpdateAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *DiskAccessesClientBeginUpdateAPrivateEndpointConnectionOptions) (*runtime.Poller[DiskAccessesClientUpdateAPrivateEndpointConnectionResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.updateAPrivateEndpointConnection(ctx, resourceGroupName, diskAccessName, privateEndpointConnectionName, privateEndpointConnection, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskAccessesClientUpdateAPrivateEndpointConnectionResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskAccessesClientUpdateAPrivateEndpointConnectionResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// UpdateAPrivateEndpointConnection - Approve or reject a private endpoint connection under disk access resource, this can't
+// be used to create a new private endpoint connection.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DiskAccessesClient) updateAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *DiskAccessesClientBeginUpdateAPrivateEndpointConnectionOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DiskAccessesClient.BeginUpdateAPrivateEndpointConnection"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateAPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, diskAccessName, privateEndpointConnectionName, privateEndpointConnection, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateAPrivateEndpointConnectionCreateRequest creates the UpdateAPrivateEndpointConnection request.
+func (client *DiskAccessesClient) updateAPrivateEndpointConnectionCreateRequest(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection, options *DiskAccessesClientBeginUpdateAPrivateEndpointConnectionOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskAccessName == "" {
+ return nil, errors.New("parameter diskAccessName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskAccessName}", url.PathEscape(diskAccessName))
+ if privateEndpointConnectionName == "" {
+ return nil, errors.New("parameter privateEndpointConnectionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{privateEndpointConnectionName}", url.PathEscape(privateEndpointConnectionName))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, privateEndpointConnection); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/diskencryptionsets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/diskencryptionsets_client.go
new file mode 100644
index 000000000..59d34d1e2
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/diskencryptionsets_client.go
@@ -0,0 +1,535 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// DiskEncryptionSetsClient contains the methods for the DiskEncryptionSets group.
+// Don't use this type directly, use NewDiskEncryptionSetsClient() instead.
+type DiskEncryptionSetsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewDiskEncryptionSetsClient creates a new instance of DiskEncryptionSetsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewDiskEncryptionSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiskEncryptionSetsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &DiskEncryptionSetsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - Creates or updates a disk encryption set
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the
+// disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum
+// name length is 80 characters.
+// - diskEncryptionSet - disk encryption set object supplied in the body of the Put disk encryption set operation.
+// - options - DiskEncryptionSetsClientBeginCreateOrUpdateOptions contains the optional parameters for the DiskEncryptionSetsClient.BeginCreateOrUpdate
+// method.
+func (client *DiskEncryptionSetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSet, options *DiskEncryptionSetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DiskEncryptionSetsClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, diskEncryptionSetName, diskEncryptionSet, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskEncryptionSetsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskEncryptionSetsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - Creates or updates a disk encryption set
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DiskEncryptionSetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSet, options *DiskEncryptionSetsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DiskEncryptionSetsClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, diskEncryptionSetName, diskEncryptionSet, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *DiskEncryptionSetsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSet, options *DiskEncryptionSetsClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskEncryptionSetName == "" {
+ return nil, errors.New("parameter diskEncryptionSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskEncryptionSetName}", url.PathEscape(diskEncryptionSetName))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, diskEncryptionSet); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - Deletes a disk encryption set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the
+// disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum
+// name length is 80 characters.
+// - options - DiskEncryptionSetsClientBeginDeleteOptions contains the optional parameters for the DiskEncryptionSetsClient.BeginDelete
+// method.
+func (client *DiskEncryptionSetsClient) BeginDelete(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, options *DiskEncryptionSetsClientBeginDeleteOptions) (*runtime.Poller[DiskEncryptionSetsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, diskEncryptionSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskEncryptionSetsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskEncryptionSetsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Deletes a disk encryption set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DiskEncryptionSetsClient) deleteOperation(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, options *DiskEncryptionSetsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DiskEncryptionSetsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, diskEncryptionSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *DiskEncryptionSetsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, options *DiskEncryptionSetsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskEncryptionSetName == "" {
+ return nil, errors.New("parameter diskEncryptionSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskEncryptionSetName}", url.PathEscape(diskEncryptionSetName))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Gets information about a disk encryption set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the
+// disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum
+// name length is 80 characters.
+// - options - DiskEncryptionSetsClientGetOptions contains the optional parameters for the DiskEncryptionSetsClient.Get method.
+func (client *DiskEncryptionSetsClient) Get(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, options *DiskEncryptionSetsClientGetOptions) (DiskEncryptionSetsClientGetResponse, error) {
+ var err error
+ const operationName = "DiskEncryptionSetsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, diskEncryptionSetName, options)
+ if err != nil {
+ return DiskEncryptionSetsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return DiskEncryptionSetsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return DiskEncryptionSetsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *DiskEncryptionSetsClient) getCreateRequest(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, options *DiskEncryptionSetsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskEncryptionSetName == "" {
+ return nil, errors.New("parameter diskEncryptionSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskEncryptionSetName}", url.PathEscape(diskEncryptionSetName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *DiskEncryptionSetsClient) getHandleResponse(resp *http.Response) (DiskEncryptionSetsClientGetResponse, error) {
+ result := DiskEncryptionSetsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DiskEncryptionSet); err != nil {
+ return DiskEncryptionSetsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - Lists all the disk encryption sets under a subscription.
+//
+// Generated from API version 2023-10-02
+// - options - DiskEncryptionSetsClientListOptions contains the optional parameters for the DiskEncryptionSetsClient.NewListPager
+// method.
+func (client *DiskEncryptionSetsClient) NewListPager(options *DiskEncryptionSetsClientListOptions) *runtime.Pager[DiskEncryptionSetsClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[DiskEncryptionSetsClientListResponse]{
+ More: func(page DiskEncryptionSetsClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *DiskEncryptionSetsClientListResponse) (DiskEncryptionSetsClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiskEncryptionSetsClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return DiskEncryptionSetsClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *DiskEncryptionSetsClient) listCreateRequest(ctx context.Context, options *DiskEncryptionSetsClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *DiskEncryptionSetsClient) listHandleResponse(resp *http.Response) (DiskEncryptionSetsClientListResponse, error) {
+ result := DiskEncryptionSetsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DiskEncryptionSetList); err != nil {
+ return DiskEncryptionSetsClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListAssociatedResourcesPager - Lists all resources that are encrypted with this disk encryption set.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the
+// disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum
+// name length is 80 characters.
+// - options - DiskEncryptionSetsClientListAssociatedResourcesOptions contains the optional parameters for the DiskEncryptionSetsClient.NewListAssociatedResourcesPager
+// method.
+func (client *DiskEncryptionSetsClient) NewListAssociatedResourcesPager(resourceGroupName string, diskEncryptionSetName string, options *DiskEncryptionSetsClientListAssociatedResourcesOptions) *runtime.Pager[DiskEncryptionSetsClientListAssociatedResourcesResponse] {
+ return runtime.NewPager(runtime.PagingHandler[DiskEncryptionSetsClientListAssociatedResourcesResponse]{
+ More: func(page DiskEncryptionSetsClientListAssociatedResourcesResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *DiskEncryptionSetsClientListAssociatedResourcesResponse) (DiskEncryptionSetsClientListAssociatedResourcesResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiskEncryptionSetsClient.NewListAssociatedResourcesPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listAssociatedResourcesCreateRequest(ctx, resourceGroupName, diskEncryptionSetName, options)
+ }, nil)
+ if err != nil {
+ return DiskEncryptionSetsClientListAssociatedResourcesResponse{}, err
+ }
+ return client.listAssociatedResourcesHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listAssociatedResourcesCreateRequest creates the ListAssociatedResources request.
+func (client *DiskEncryptionSetsClient) listAssociatedResourcesCreateRequest(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, options *DiskEncryptionSetsClientListAssociatedResourcesOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}/associatedResources"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskEncryptionSetName == "" {
+ return nil, errors.New("parameter diskEncryptionSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskEncryptionSetName}", url.PathEscape(diskEncryptionSetName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listAssociatedResourcesHandleResponse handles the ListAssociatedResources response.
+func (client *DiskEncryptionSetsClient) listAssociatedResourcesHandleResponse(resp *http.Response) (DiskEncryptionSetsClientListAssociatedResourcesResponse, error) {
+ result := DiskEncryptionSetsClientListAssociatedResourcesResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.ResourceURIList); err != nil {
+ return DiskEncryptionSetsClientListAssociatedResourcesResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByResourceGroupPager - Lists all the disk encryption sets under a resource group.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - options - DiskEncryptionSetsClientListByResourceGroupOptions contains the optional parameters for the DiskEncryptionSetsClient.NewListByResourceGroupPager
+// method.
+func (client *DiskEncryptionSetsClient) NewListByResourceGroupPager(resourceGroupName string, options *DiskEncryptionSetsClientListByResourceGroupOptions) *runtime.Pager[DiskEncryptionSetsClientListByResourceGroupResponse] {
+ return runtime.NewPager(runtime.PagingHandler[DiskEncryptionSetsClientListByResourceGroupResponse]{
+ More: func(page DiskEncryptionSetsClientListByResourceGroupResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *DiskEncryptionSetsClientListByResourceGroupResponse) (DiskEncryptionSetsClientListByResourceGroupResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiskEncryptionSetsClient.NewListByResourceGroupPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return DiskEncryptionSetsClientListByResourceGroupResponse{}, err
+ }
+ return client.listByResourceGroupHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByResourceGroupCreateRequest creates the ListByResourceGroup request.
+func (client *DiskEncryptionSetsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *DiskEncryptionSetsClientListByResourceGroupOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByResourceGroupHandleResponse handles the ListByResourceGroup response.
+func (client *DiskEncryptionSetsClient) listByResourceGroupHandleResponse(resp *http.Response) (DiskEncryptionSetsClientListByResourceGroupResponse, error) {
+ result := DiskEncryptionSetsClientListByResourceGroupResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DiskEncryptionSetList); err != nil {
+ return DiskEncryptionSetsClientListByResourceGroupResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginUpdate - Updates (patches) a disk encryption set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskEncryptionSetName - The name of the disk encryption set that is being created. The name can't be changed after the
+// disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum
+// name length is 80 characters.
+// - diskEncryptionSet - disk encryption set object supplied in the body of the Patch disk encryption set operation.
+// - options - DiskEncryptionSetsClientBeginUpdateOptions contains the optional parameters for the DiskEncryptionSetsClient.BeginUpdate
+// method.
+func (client *DiskEncryptionSetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSetUpdate, options *DiskEncryptionSetsClientBeginUpdateOptions) (*runtime.Poller[DiskEncryptionSetsClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, diskEncryptionSetName, diskEncryptionSet, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskEncryptionSetsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskEncryptionSetsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Updates (patches) a disk encryption set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DiskEncryptionSetsClient) update(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSetUpdate, options *DiskEncryptionSetsClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DiskEncryptionSetsClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, diskEncryptionSetName, diskEncryptionSet, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *DiskEncryptionSetsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSetUpdate, options *DiskEncryptionSetsClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskEncryptionSetName == "" {
+ return nil, errors.New("parameter diskEncryptionSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskEncryptionSetName}", url.PathEscape(diskEncryptionSetName))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, diskEncryptionSet); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/diskrestorepoint_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/diskrestorepoint_client.go
new file mode 100644
index 000000000..43307ca04
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/diskrestorepoint_client.go
@@ -0,0 +1,367 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// DiskRestorePointClient contains the methods for the DiskRestorePoint group.
+// Don't use this type directly, use NewDiskRestorePointClient() instead.
+type DiskRestorePointClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewDiskRestorePointClient creates a new instance of DiskRestorePointClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewDiskRestorePointClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiskRestorePointClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &DiskRestorePointClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// Get - Get disk restorePoint resource
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - restorePointCollectionName - The name of the restore point collection that the disk restore point belongs.
+// - vmRestorePointName - The name of the vm restore point that the disk disk restore point belongs.
+// - diskRestorePointName - The name of the disk restore point created.
+// - options - DiskRestorePointClientGetOptions contains the optional parameters for the DiskRestorePointClient.Get method.
+func (client *DiskRestorePointClient) Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, diskRestorePointName string, options *DiskRestorePointClientGetOptions) (DiskRestorePointClientGetResponse, error) {
+ var err error
+ const operationName = "DiskRestorePointClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, options)
+ if err != nil {
+ return DiskRestorePointClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return DiskRestorePointClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return DiskRestorePointClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *DiskRestorePointClient) getCreateRequest(ctx context.Context, resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, diskRestorePointName string, options *DiskRestorePointClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if restorePointCollectionName == "" {
+ return nil, errors.New("parameter restorePointCollectionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{restorePointCollectionName}", url.PathEscape(restorePointCollectionName))
+ if vmRestorePointName == "" {
+ return nil, errors.New("parameter vmRestorePointName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmRestorePointName}", url.PathEscape(vmRestorePointName))
+ if diskRestorePointName == "" {
+ return nil, errors.New("parameter diskRestorePointName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskRestorePointName}", url.PathEscape(diskRestorePointName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *DiskRestorePointClient) getHandleResponse(resp *http.Response) (DiskRestorePointClientGetResponse, error) {
+ result := DiskRestorePointClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DiskRestorePoint); err != nil {
+ return DiskRestorePointClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginGrantAccess - Grants access to a diskRestorePoint.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - restorePointCollectionName - The name of the restore point collection that the disk restore point belongs.
+// - vmRestorePointName - The name of the vm restore point that the disk disk restore point belongs.
+// - diskRestorePointName - The name of the disk restore point created.
+// - grantAccessData - Access data object supplied in the body of the get disk access operation.
+// - options - DiskRestorePointClientBeginGrantAccessOptions contains the optional parameters for the DiskRestorePointClient.BeginGrantAccess
+// method.
+func (client *DiskRestorePointClient) BeginGrantAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, diskRestorePointName string, grantAccessData GrantAccessData, options *DiskRestorePointClientBeginGrantAccessOptions) (*runtime.Poller[DiskRestorePointClientGrantAccessResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.grantAccess(ctx, resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, grantAccessData, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskRestorePointClientGrantAccessResponse]{
+ FinalStateVia: runtime.FinalStateViaLocation,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskRestorePointClientGrantAccessResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// GrantAccess - Grants access to a diskRestorePoint.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DiskRestorePointClient) grantAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, diskRestorePointName string, grantAccessData GrantAccessData, options *DiskRestorePointClientBeginGrantAccessOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DiskRestorePointClient.BeginGrantAccess"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.grantAccessCreateRequest(ctx, resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, grantAccessData, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// grantAccessCreateRequest creates the GrantAccess request.
+func (client *DiskRestorePointClient) grantAccessCreateRequest(ctx context.Context, resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, diskRestorePointName string, grantAccessData GrantAccessData, options *DiskRestorePointClientBeginGrantAccessOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if restorePointCollectionName == "" {
+ return nil, errors.New("parameter restorePointCollectionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{restorePointCollectionName}", url.PathEscape(restorePointCollectionName))
+ if vmRestorePointName == "" {
+ return nil, errors.New("parameter vmRestorePointName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmRestorePointName}", url.PathEscape(vmRestorePointName))
+ if diskRestorePointName == "" {
+ return nil, errors.New("parameter diskRestorePointName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskRestorePointName}", url.PathEscape(diskRestorePointName))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, grantAccessData); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// NewListByRestorePointPager - Lists diskRestorePoints under a vmRestorePoint.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - restorePointCollectionName - The name of the restore point collection that the disk restore point belongs.
+// - vmRestorePointName - The name of the vm restore point that the disk disk restore point belongs.
+// - options - DiskRestorePointClientListByRestorePointOptions contains the optional parameters for the DiskRestorePointClient.NewListByRestorePointPager
+// method.
+func (client *DiskRestorePointClient) NewListByRestorePointPager(resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, options *DiskRestorePointClientListByRestorePointOptions) *runtime.Pager[DiskRestorePointClientListByRestorePointResponse] {
+ return runtime.NewPager(runtime.PagingHandler[DiskRestorePointClientListByRestorePointResponse]{
+ More: func(page DiskRestorePointClientListByRestorePointResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *DiskRestorePointClientListByRestorePointResponse) (DiskRestorePointClientListByRestorePointResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiskRestorePointClient.NewListByRestorePointPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByRestorePointCreateRequest(ctx, resourceGroupName, restorePointCollectionName, vmRestorePointName, options)
+ }, nil)
+ if err != nil {
+ return DiskRestorePointClientListByRestorePointResponse{}, err
+ }
+ return client.listByRestorePointHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByRestorePointCreateRequest creates the ListByRestorePoint request.
+func (client *DiskRestorePointClient) listByRestorePointCreateRequest(ctx context.Context, resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, options *DiskRestorePointClientListByRestorePointOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if restorePointCollectionName == "" {
+ return nil, errors.New("parameter restorePointCollectionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{restorePointCollectionName}", url.PathEscape(restorePointCollectionName))
+ if vmRestorePointName == "" {
+ return nil, errors.New("parameter vmRestorePointName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmRestorePointName}", url.PathEscape(vmRestorePointName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByRestorePointHandleResponse handles the ListByRestorePoint response.
+func (client *DiskRestorePointClient) listByRestorePointHandleResponse(resp *http.Response) (DiskRestorePointClientListByRestorePointResponse, error) {
+ result := DiskRestorePointClientListByRestorePointResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DiskRestorePointList); err != nil {
+ return DiskRestorePointClientListByRestorePointResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginRevokeAccess - Revokes access to a diskRestorePoint.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - restorePointCollectionName - The name of the restore point collection that the disk restore point belongs.
+// - vmRestorePointName - The name of the vm restore point that the disk disk restore point belongs.
+// - diskRestorePointName - The name of the disk restore point created.
+// - options - DiskRestorePointClientBeginRevokeAccessOptions contains the optional parameters for the DiskRestorePointClient.BeginRevokeAccess
+// method.
+func (client *DiskRestorePointClient) BeginRevokeAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, diskRestorePointName string, options *DiskRestorePointClientBeginRevokeAccessOptions) (*runtime.Poller[DiskRestorePointClientRevokeAccessResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.revokeAccess(ctx, resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DiskRestorePointClientRevokeAccessResponse]{
+ FinalStateVia: runtime.FinalStateViaLocation,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DiskRestorePointClientRevokeAccessResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// RevokeAccess - Revokes access to a diskRestorePoint.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DiskRestorePointClient) revokeAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, diskRestorePointName string, options *DiskRestorePointClientBeginRevokeAccessOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DiskRestorePointClient.BeginRevokeAccess"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.revokeAccessCreateRequest(ctx, resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// revokeAccessCreateRequest creates the RevokeAccess request.
+func (client *DiskRestorePointClient) revokeAccessCreateRequest(ctx context.Context, resourceGroupName string, restorePointCollectionName string, vmRestorePointName string, diskRestorePointName string, options *DiskRestorePointClientBeginRevokeAccessOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if restorePointCollectionName == "" {
+ return nil, errors.New("parameter restorePointCollectionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{restorePointCollectionName}", url.PathEscape(restorePointCollectionName))
+ if vmRestorePointName == "" {
+ return nil, errors.New("parameter vmRestorePointName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmRestorePointName}", url.PathEscape(vmRestorePointName))
+ if diskRestorePointName == "" {
+ return nil, errors.New("parameter diskRestorePointName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskRestorePointName}", url.PathEscape(diskRestorePointName))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/disks_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/disks_client.go
new file mode 100644
index 000000000..a0ffa752b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/disks_client.go
@@ -0,0 +1,623 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// DisksClient contains the methods for the Disks group.
+// Don't use this type directly, use NewDisksClient() instead.
+type DisksClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewDisksClient creates a new instance of DisksClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewDisksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DisksClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &DisksClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - Creates or updates a disk.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported
+// characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
+// characters.
+// - disk - Disk object supplied in the body of the Put disk operation.
+// - options - DisksClientBeginCreateOrUpdateOptions contains the optional parameters for the DisksClient.BeginCreateOrUpdate
+// method.
+func (client *DisksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, disk Disk, options *DisksClientBeginCreateOrUpdateOptions) (*runtime.Poller[DisksClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, diskName, disk, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DisksClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DisksClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - Creates or updates a disk.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DisksClient) createOrUpdate(ctx context.Context, resourceGroupName string, diskName string, disk Disk, options *DisksClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DisksClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, diskName, disk, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *DisksClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, diskName string, disk Disk, options *DisksClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskName == "" {
+ return nil, errors.New("parameter diskName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskName}", url.PathEscape(diskName))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, disk); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - Deletes a disk.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported
+// characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
+// characters.
+// - options - DisksClientBeginDeleteOptions contains the optional parameters for the DisksClient.BeginDelete method.
+func (client *DisksClient) BeginDelete(ctx context.Context, resourceGroupName string, diskName string, options *DisksClientBeginDeleteOptions) (*runtime.Poller[DisksClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, diskName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DisksClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DisksClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Deletes a disk.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DisksClient) deleteOperation(ctx context.Context, resourceGroupName string, diskName string, options *DisksClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DisksClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, diskName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *DisksClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, diskName string, options *DisksClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskName == "" {
+ return nil, errors.New("parameter diskName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskName}", url.PathEscape(diskName))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ return req, nil
+}
+
+// Get - Gets information about a disk.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported
+// characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
+// characters.
+// - options - DisksClientGetOptions contains the optional parameters for the DisksClient.Get method.
+func (client *DisksClient) Get(ctx context.Context, resourceGroupName string, diskName string, options *DisksClientGetOptions) (DisksClientGetResponse, error) {
+ var err error
+ const operationName = "DisksClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, diskName, options)
+ if err != nil {
+ return DisksClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return DisksClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return DisksClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *DisksClient) getCreateRequest(ctx context.Context, resourceGroupName string, diskName string, options *DisksClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskName == "" {
+ return nil, errors.New("parameter diskName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskName}", url.PathEscape(diskName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *DisksClient) getHandleResponse(resp *http.Response) (DisksClientGetResponse, error) {
+ result := DisksClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.Disk); err != nil {
+ return DisksClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginGrantAccess - Grants access to a disk.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported
+// characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
+// characters.
+// - grantAccessData - Access data object supplied in the body of the get disk access operation.
+// - options - DisksClientBeginGrantAccessOptions contains the optional parameters for the DisksClient.BeginGrantAccess method.
+func (client *DisksClient) BeginGrantAccess(ctx context.Context, resourceGroupName string, diskName string, grantAccessData GrantAccessData, options *DisksClientBeginGrantAccessOptions) (*runtime.Poller[DisksClientGrantAccessResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.grantAccess(ctx, resourceGroupName, diskName, grantAccessData, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DisksClientGrantAccessResponse]{
+ FinalStateVia: runtime.FinalStateViaLocation,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DisksClientGrantAccessResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// GrantAccess - Grants access to a disk.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DisksClient) grantAccess(ctx context.Context, resourceGroupName string, diskName string, grantAccessData GrantAccessData, options *DisksClientBeginGrantAccessOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DisksClient.BeginGrantAccess"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.grantAccessCreateRequest(ctx, resourceGroupName, diskName, grantAccessData, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// grantAccessCreateRequest creates the GrantAccess request.
+func (client *DisksClient) grantAccessCreateRequest(ctx context.Context, resourceGroupName string, diskName string, grantAccessData GrantAccessData, options *DisksClientBeginGrantAccessOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskName == "" {
+ return nil, errors.New("parameter diskName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskName}", url.PathEscape(diskName))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, grantAccessData); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// NewListPager - Lists all the disks under a subscription.
+//
+// Generated from API version 2023-10-02
+// - options - DisksClientListOptions contains the optional parameters for the DisksClient.NewListPager method.
+func (client *DisksClient) NewListPager(options *DisksClientListOptions) *runtime.Pager[DisksClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[DisksClientListResponse]{
+ More: func(page DisksClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *DisksClientListResponse) (DisksClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DisksClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return DisksClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *DisksClient) listCreateRequest(ctx context.Context, options *DisksClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *DisksClient) listHandleResponse(resp *http.Response) (DisksClientListResponse, error) {
+ result := DisksClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DiskList); err != nil {
+ return DisksClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByResourceGroupPager - Lists all the disks under a resource group.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - options - DisksClientListByResourceGroupOptions contains the optional parameters for the DisksClient.NewListByResourceGroupPager
+// method.
+func (client *DisksClient) NewListByResourceGroupPager(resourceGroupName string, options *DisksClientListByResourceGroupOptions) *runtime.Pager[DisksClientListByResourceGroupResponse] {
+ return runtime.NewPager(runtime.PagingHandler[DisksClientListByResourceGroupResponse]{
+ More: func(page DisksClientListByResourceGroupResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *DisksClientListByResourceGroupResponse) (DisksClientListByResourceGroupResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DisksClient.NewListByResourceGroupPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return DisksClientListByResourceGroupResponse{}, err
+ }
+ return client.listByResourceGroupHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByResourceGroupCreateRequest creates the ListByResourceGroup request.
+func (client *DisksClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *DisksClientListByResourceGroupOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByResourceGroupHandleResponse handles the ListByResourceGroup response.
+func (client *DisksClient) listByResourceGroupHandleResponse(resp *http.Response) (DisksClientListByResourceGroupResponse, error) {
+ result := DisksClientListByResourceGroupResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.DiskList); err != nil {
+ return DisksClientListByResourceGroupResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginRevokeAccess - Revokes access to a disk.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported
+// characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
+// characters.
+// - options - DisksClientBeginRevokeAccessOptions contains the optional parameters for the DisksClient.BeginRevokeAccess method.
+func (client *DisksClient) BeginRevokeAccess(ctx context.Context, resourceGroupName string, diskName string, options *DisksClientBeginRevokeAccessOptions) (*runtime.Poller[DisksClientRevokeAccessResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.revokeAccess(ctx, resourceGroupName, diskName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DisksClientRevokeAccessResponse]{
+ FinalStateVia: runtime.FinalStateViaLocation,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DisksClientRevokeAccessResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// RevokeAccess - Revokes access to a disk.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DisksClient) revokeAccess(ctx context.Context, resourceGroupName string, diskName string, options *DisksClientBeginRevokeAccessOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DisksClient.BeginRevokeAccess"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.revokeAccessCreateRequest(ctx, resourceGroupName, diskName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// revokeAccessCreateRequest creates the RevokeAccess request.
+func (client *DisksClient) revokeAccessCreateRequest(ctx context.Context, resourceGroupName string, diskName string, options *DisksClientBeginRevokeAccessOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskName == "" {
+ return nil, errors.New("parameter diskName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskName}", url.PathEscape(diskName))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ return req, nil
+}
+
+// BeginUpdate - Updates (patches) a disk.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - diskName - The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported
+// characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
+// characters.
+// - disk - Disk object supplied in the body of the Patch disk operation.
+// - options - DisksClientBeginUpdateOptions contains the optional parameters for the DisksClient.BeginUpdate method.
+func (client *DisksClient) BeginUpdate(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate, options *DisksClientBeginUpdateOptions) (*runtime.Poller[DisksClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, diskName, disk, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DisksClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DisksClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Updates (patches) a disk.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *DisksClient) update(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate, options *DisksClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "DisksClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, diskName, disk, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *DisksClient) updateCreateRequest(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate, options *DisksClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if diskName == "" {
+ return nil, errors.New("parameter diskName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{diskName}", url.PathEscape(diskName))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, disk); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleries_client.go
new file mode 100644
index 000000000..f24e730a6
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleries_client.go
@@ -0,0 +1,465 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// GalleriesClient contains the methods for the Galleries group.
+// Don't use this type directly, use NewGalleriesClient() instead.
+type GalleriesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewGalleriesClient creates a new instance of GalleriesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewGalleriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleriesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &GalleriesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - Create or update a Shared Image Gallery.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods
+// allowed in the middle. The maximum length is 80 characters.
+// - gallery - Parameters supplied to the create or update Shared Image Gallery operation.
+// - options - GalleriesClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleriesClient.BeginCreateOrUpdate
+// method.
+func (client *GalleriesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery, options *GalleriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[GalleriesClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, galleryName, gallery, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleriesClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleriesClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - Create or update a Shared Image Gallery.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleriesClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery, options *GalleriesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleriesClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, galleryName, gallery, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *GalleriesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery, options *GalleriesClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, gallery); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - Delete a Shared Image Gallery.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery to be deleted.
+// - options - GalleriesClientBeginDeleteOptions contains the optional parameters for the GalleriesClient.BeginDelete method.
+func (client *GalleriesClient) BeginDelete(ctx context.Context, resourceGroupName string, galleryName string, options *GalleriesClientBeginDeleteOptions) (*runtime.Poller[GalleriesClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, galleryName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleriesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleriesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Delete a Shared Image Gallery.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleriesClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, options *GalleriesClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleriesClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, galleryName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *GalleriesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, options *GalleriesClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Retrieves information about a Shared Image Gallery.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery.
+// - options - GalleriesClientGetOptions contains the optional parameters for the GalleriesClient.Get method.
+func (client *GalleriesClient) Get(ctx context.Context, resourceGroupName string, galleryName string, options *GalleriesClientGetOptions) (GalleriesClientGetResponse, error) {
+ var err error
+ const operationName = "GalleriesClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, galleryName, options)
+ if err != nil {
+ return GalleriesClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return GalleriesClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return GalleriesClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *GalleriesClient) getCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, options *GalleriesClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ if options != nil && options.Select != nil {
+ reqQP.Set("$select", string(*options.Select))
+ }
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *GalleriesClient) getHandleResponse(resp *http.Response) (GalleriesClientGetResponse, error) {
+ result := GalleriesClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.Gallery); err != nil {
+ return GalleriesClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - List galleries under a subscription.
+//
+// Generated from API version 2023-07-03
+// - options - GalleriesClientListOptions contains the optional parameters for the GalleriesClient.NewListPager method.
+func (client *GalleriesClient) NewListPager(options *GalleriesClientListOptions) *runtime.Pager[GalleriesClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[GalleriesClientListResponse]{
+ More: func(page GalleriesClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *GalleriesClientListResponse) (GalleriesClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GalleriesClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return GalleriesClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *GalleriesClient) listCreateRequest(ctx context.Context, options *GalleriesClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *GalleriesClient) listHandleResponse(resp *http.Response) (GalleriesClientListResponse, error) {
+ result := GalleriesClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.GalleryList); err != nil {
+ return GalleriesClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByResourceGroupPager - List galleries under a resource group.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - options - GalleriesClientListByResourceGroupOptions contains the optional parameters for the GalleriesClient.NewListByResourceGroupPager
+// method.
+func (client *GalleriesClient) NewListByResourceGroupPager(resourceGroupName string, options *GalleriesClientListByResourceGroupOptions) *runtime.Pager[GalleriesClientListByResourceGroupResponse] {
+ return runtime.NewPager(runtime.PagingHandler[GalleriesClientListByResourceGroupResponse]{
+ More: func(page GalleriesClientListByResourceGroupResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *GalleriesClientListByResourceGroupResponse) (GalleriesClientListByResourceGroupResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GalleriesClient.NewListByResourceGroupPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return GalleriesClientListByResourceGroupResponse{}, err
+ }
+ return client.listByResourceGroupHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByResourceGroupCreateRequest creates the ListByResourceGroup request.
+func (client *GalleriesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *GalleriesClientListByResourceGroupOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByResourceGroupHandleResponse handles the ListByResourceGroup response.
+func (client *GalleriesClient) listByResourceGroupHandleResponse(resp *http.Response) (GalleriesClientListByResourceGroupResponse, error) {
+ result := GalleriesClientListByResourceGroupResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.GalleryList); err != nil {
+ return GalleriesClientListByResourceGroupResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginUpdate - Update a Shared Image Gallery.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods
+// allowed in the middle. The maximum length is 80 characters.
+// - gallery - Parameters supplied to the update Shared Image Gallery operation.
+// - options - GalleriesClientBeginUpdateOptions contains the optional parameters for the GalleriesClient.BeginUpdate method.
+func (client *GalleriesClient) BeginUpdate(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate, options *GalleriesClientBeginUpdateOptions) (*runtime.Poller[GalleriesClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, galleryName, gallery, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleriesClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleriesClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Update a Shared Image Gallery.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleriesClient) update(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate, options *GalleriesClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleriesClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, galleryName, gallery, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *GalleriesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate, options *GalleriesClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, gallery); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleryapplications_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleryapplications_client.go
new file mode 100644
index 000000000..cd5d6f3ec
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleryapplications_client.go
@@ -0,0 +1,434 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// GalleryApplicationsClient contains the methods for the GalleryApplications group.
+// Don't use this type directly, use NewGalleryApplicationsClient() instead.
+type GalleryApplicationsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewGalleryApplicationsClient creates a new instance of GalleryApplicationsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewGalleryApplicationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleryApplicationsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &GalleryApplicationsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - Create or update a gallery Application Definition.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Application Gallery in which the Application Definition is to be created.
+// - galleryApplicationName - The name of the gallery Application Definition to be created or updated. The allowed characters
+// are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80
+// characters.
+// - galleryApplication - Parameters supplied to the create or update gallery Application operation.
+// - options - GalleryApplicationsClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryApplicationsClient.BeginCreateOrUpdate
+// method.
+func (client *GalleryApplicationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplication, options *GalleryApplicationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GalleryApplicationsClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryApplicationsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryApplicationsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - Create or update a gallery Application Definition.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleryApplicationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplication, options *GalleryApplicationsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleryApplicationsClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *GalleryApplicationsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplication, options *GalleryApplicationsClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryApplicationName == "" {
+ return nil, errors.New("parameter galleryApplicationName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryApplicationName}", url.PathEscape(galleryApplicationName))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, galleryApplication); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - Delete a gallery Application.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Application Gallery in which the Application Definition is to be deleted.
+// - galleryApplicationName - The name of the gallery Application Definition to be deleted.
+// - options - GalleryApplicationsClientBeginDeleteOptions contains the optional parameters for the GalleryApplicationsClient.BeginDelete
+// method.
+func (client *GalleryApplicationsClient) BeginDelete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, options *GalleryApplicationsClientBeginDeleteOptions) (*runtime.Poller[GalleryApplicationsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, galleryName, galleryApplicationName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryApplicationsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryApplicationsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Delete a gallery Application.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleryApplicationsClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, options *GalleryApplicationsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleryApplicationsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, galleryName, galleryApplicationName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *GalleryApplicationsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, options *GalleryApplicationsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryApplicationName == "" {
+ return nil, errors.New("parameter galleryApplicationName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryApplicationName}", url.PathEscape(galleryApplicationName))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Retrieves information about a gallery Application Definition.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Application Gallery from which the Application Definitions are to be retrieved.
+// - galleryApplicationName - The name of the gallery Application Definition to be retrieved.
+// - options - GalleryApplicationsClientGetOptions contains the optional parameters for the GalleryApplicationsClient.Get method.
+func (client *GalleryApplicationsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, options *GalleryApplicationsClientGetOptions) (GalleryApplicationsClientGetResponse, error) {
+ var err error
+ const operationName = "GalleryApplicationsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, galleryName, galleryApplicationName, options)
+ if err != nil {
+ return GalleryApplicationsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return GalleryApplicationsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return GalleryApplicationsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *GalleryApplicationsClient) getCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, options *GalleryApplicationsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryApplicationName == "" {
+ return nil, errors.New("parameter galleryApplicationName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryApplicationName}", url.PathEscape(galleryApplicationName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *GalleryApplicationsClient) getHandleResponse(resp *http.Response) (GalleryApplicationsClientGetResponse, error) {
+ result := GalleryApplicationsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.GalleryApplication); err != nil {
+ return GalleryApplicationsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByGalleryPager - List gallery Application Definitions in a gallery.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Application Gallery from which Application Definitions are to be listed.
+// - options - GalleryApplicationsClientListByGalleryOptions contains the optional parameters for the GalleryApplicationsClient.NewListByGalleryPager
+// method.
+func (client *GalleryApplicationsClient) NewListByGalleryPager(resourceGroupName string, galleryName string, options *GalleryApplicationsClientListByGalleryOptions) *runtime.Pager[GalleryApplicationsClientListByGalleryResponse] {
+ return runtime.NewPager(runtime.PagingHandler[GalleryApplicationsClientListByGalleryResponse]{
+ More: func(page GalleryApplicationsClientListByGalleryResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *GalleryApplicationsClientListByGalleryResponse) (GalleryApplicationsClientListByGalleryResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GalleryApplicationsClient.NewListByGalleryPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByGalleryCreateRequest(ctx, resourceGroupName, galleryName, options)
+ }, nil)
+ if err != nil {
+ return GalleryApplicationsClientListByGalleryResponse{}, err
+ }
+ return client.listByGalleryHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByGalleryCreateRequest creates the ListByGallery request.
+func (client *GalleryApplicationsClient) listByGalleryCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, options *GalleryApplicationsClientListByGalleryOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByGalleryHandleResponse handles the ListByGallery response.
+func (client *GalleryApplicationsClient) listByGalleryHandleResponse(resp *http.Response) (GalleryApplicationsClientListByGalleryResponse, error) {
+ result := GalleryApplicationsClientListByGalleryResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.GalleryApplicationList); err != nil {
+ return GalleryApplicationsClientListByGalleryResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginUpdate - Update a gallery Application Definition.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Application Gallery in which the Application Definition is to be updated.
+// - galleryApplicationName - The name of the gallery Application Definition to be updated. The allowed characters are alphabets
+// and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80
+// characters.
+// - galleryApplication - Parameters supplied to the update gallery Application operation.
+// - options - GalleryApplicationsClientBeginUpdateOptions contains the optional parameters for the GalleryApplicationsClient.BeginUpdate
+// method.
+func (client *GalleryApplicationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate, options *GalleryApplicationsClientBeginUpdateOptions) (*runtime.Poller[GalleryApplicationsClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryApplicationsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryApplicationsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Update a gallery Application Definition.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleryApplicationsClient) update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate, options *GalleryApplicationsClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleryApplicationsClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *GalleryApplicationsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate, options *GalleryApplicationsClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryApplicationName == "" {
+ return nil, errors.New("parameter galleryApplicationName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryApplicationName}", url.PathEscape(galleryApplicationName))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, galleryApplication); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleryapplicationversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleryapplicationversions_client.go
new file mode 100644
index 000000000..06571af3d
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleryapplicationversions_client.go
@@ -0,0 +1,464 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// GalleryApplicationVersionsClient contains the methods for the GalleryApplicationVersions group.
+// Don't use this type directly, use NewGalleryApplicationVersionsClient() instead.
+type GalleryApplicationVersionsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewGalleryApplicationVersionsClient creates a new instance of GalleryApplicationVersionsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewGalleryApplicationVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleryApplicationVersionsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &GalleryApplicationVersionsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - Create or update a gallery Application Version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
+// - galleryApplicationName - The name of the gallery Application Definition in which the Application Version is to be created.
+// - galleryApplicationVersionName - The name of the gallery Application Version to be created. Needs to follow semantic version
+// name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit
+// integer. Format: ..
+// - galleryApplicationVersion - Parameters supplied to the create or update gallery Application Version operation.
+// - options - GalleryApplicationVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryApplicationVersionsClient.BeginCreateOrUpdate
+// method.
+func (client *GalleryApplicationVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersion, options *GalleryApplicationVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GalleryApplicationVersionsClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryApplicationVersionsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryApplicationVersionsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - Create or update a gallery Application Version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleryApplicationVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersion, options *GalleryApplicationVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleryApplicationVersionsClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *GalleryApplicationVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersion, options *GalleryApplicationVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryApplicationName == "" {
+ return nil, errors.New("parameter galleryApplicationName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryApplicationName}", url.PathEscape(galleryApplicationName))
+ if galleryApplicationVersionName == "" {
+ return nil, errors.New("parameter galleryApplicationVersionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryApplicationVersionName}", url.PathEscape(galleryApplicationVersionName))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, galleryApplicationVersion); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - Delete a gallery Application Version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
+// - galleryApplicationName - The name of the gallery Application Definition in which the Application Version resides.
+// - galleryApplicationVersionName - The name of the gallery Application Version to be deleted.
+// - options - GalleryApplicationVersionsClientBeginDeleteOptions contains the optional parameters for the GalleryApplicationVersionsClient.BeginDelete
+// method.
+func (client *GalleryApplicationVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, options *GalleryApplicationVersionsClientBeginDeleteOptions) (*runtime.Poller[GalleryApplicationVersionsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryApplicationVersionsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryApplicationVersionsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Delete a gallery Application Version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleryApplicationVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, options *GalleryApplicationVersionsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleryApplicationVersionsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *GalleryApplicationVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, options *GalleryApplicationVersionsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryApplicationName == "" {
+ return nil, errors.New("parameter galleryApplicationName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryApplicationName}", url.PathEscape(galleryApplicationName))
+ if galleryApplicationVersionName == "" {
+ return nil, errors.New("parameter galleryApplicationVersionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryApplicationVersionName}", url.PathEscape(galleryApplicationVersionName))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Retrieves information about a gallery Application Version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
+// - galleryApplicationName - The name of the gallery Application Definition in which the Application Version resides.
+// - galleryApplicationVersionName - The name of the gallery Application Version to be retrieved.
+// - options - GalleryApplicationVersionsClientGetOptions contains the optional parameters for the GalleryApplicationVersionsClient.Get
+// method.
+func (client *GalleryApplicationVersionsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, options *GalleryApplicationVersionsClientGetOptions) (GalleryApplicationVersionsClientGetResponse, error) {
+ var err error
+ const operationName = "GalleryApplicationVersionsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, options)
+ if err != nil {
+ return GalleryApplicationVersionsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return GalleryApplicationVersionsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return GalleryApplicationVersionsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *GalleryApplicationVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, options *GalleryApplicationVersionsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryApplicationName == "" {
+ return nil, errors.New("parameter galleryApplicationName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryApplicationName}", url.PathEscape(galleryApplicationName))
+ if galleryApplicationVersionName == "" {
+ return nil, errors.New("parameter galleryApplicationVersionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryApplicationVersionName}", url.PathEscape(galleryApplicationVersionName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *GalleryApplicationVersionsClient) getHandleResponse(resp *http.Response) (GalleryApplicationVersionsClientGetResponse, error) {
+ result := GalleryApplicationVersionsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.GalleryApplicationVersion); err != nil {
+ return GalleryApplicationVersionsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByGalleryApplicationPager - List gallery Application Versions in a gallery Application Definition.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
+// - galleryApplicationName - The name of the Shared Application Gallery Application Definition from which the Application Versions
+// are to be listed.
+// - options - GalleryApplicationVersionsClientListByGalleryApplicationOptions contains the optional parameters for the GalleryApplicationVersionsClient.NewListByGalleryApplicationPager
+// method.
+func (client *GalleryApplicationVersionsClient) NewListByGalleryApplicationPager(resourceGroupName string, galleryName string, galleryApplicationName string, options *GalleryApplicationVersionsClientListByGalleryApplicationOptions) *runtime.Pager[GalleryApplicationVersionsClientListByGalleryApplicationResponse] {
+ return runtime.NewPager(runtime.PagingHandler[GalleryApplicationVersionsClientListByGalleryApplicationResponse]{
+ More: func(page GalleryApplicationVersionsClientListByGalleryApplicationResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *GalleryApplicationVersionsClientListByGalleryApplicationResponse) (GalleryApplicationVersionsClientListByGalleryApplicationResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GalleryApplicationVersionsClient.NewListByGalleryApplicationPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByGalleryApplicationCreateRequest(ctx, resourceGroupName, galleryName, galleryApplicationName, options)
+ }, nil)
+ if err != nil {
+ return GalleryApplicationVersionsClientListByGalleryApplicationResponse{}, err
+ }
+ return client.listByGalleryApplicationHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByGalleryApplicationCreateRequest creates the ListByGalleryApplication request.
+func (client *GalleryApplicationVersionsClient) listByGalleryApplicationCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, options *GalleryApplicationVersionsClientListByGalleryApplicationOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryApplicationName == "" {
+ return nil, errors.New("parameter galleryApplicationName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryApplicationName}", url.PathEscape(galleryApplicationName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByGalleryApplicationHandleResponse handles the ListByGalleryApplication response.
+func (client *GalleryApplicationVersionsClient) listByGalleryApplicationHandleResponse(resp *http.Response) (GalleryApplicationVersionsClientListByGalleryApplicationResponse, error) {
+ result := GalleryApplicationVersionsClientListByGalleryApplicationResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.GalleryApplicationVersionList); err != nil {
+ return GalleryApplicationVersionsClientListByGalleryApplicationResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginUpdate - Update a gallery Application Version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Application Gallery in which the Application Definition resides.
+// - galleryApplicationName - The name of the gallery Application Definition in which the Application Version is to be updated.
+// - galleryApplicationVersionName - The name of the gallery Application Version to be updated. Needs to follow semantic version
+// name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit
+// integer. Format: ..
+// - galleryApplicationVersion - Parameters supplied to the update gallery Application Version operation.
+// - options - GalleryApplicationVersionsClientBeginUpdateOptions contains the optional parameters for the GalleryApplicationVersionsClient.BeginUpdate
+// method.
+func (client *GalleryApplicationVersionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate, options *GalleryApplicationVersionsClientBeginUpdateOptions) (*runtime.Poller[GalleryApplicationVersionsClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryApplicationVersionsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryApplicationVersionsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Update a gallery Application Version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleryApplicationVersionsClient) update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate, options *GalleryApplicationVersionsClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleryApplicationVersionsClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *GalleryApplicationVersionsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate, options *GalleryApplicationVersionsClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryApplicationName == "" {
+ return nil, errors.New("parameter galleryApplicationName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryApplicationName}", url.PathEscape(galleryApplicationName))
+ if galleryApplicationVersionName == "" {
+ return nil, errors.New("parameter galleryApplicationVersionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryApplicationVersionName}", url.PathEscape(galleryApplicationVersionName))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, galleryApplicationVersion); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleryimages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleryimages_client.go
new file mode 100644
index 000000000..8be1a5784
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleryimages_client.go
@@ -0,0 +1,433 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// GalleryImagesClient contains the methods for the GalleryImages group.
+// Don't use this type directly, use NewGalleryImagesClient() instead.
+type GalleryImagesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewGalleryImagesClient creates a new instance of GalleryImagesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewGalleryImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleryImagesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &GalleryImagesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - Create or update a gallery image definition.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery in which the Image Definition is to be created.
+// - galleryImageName - The name of the gallery image definition to be created or updated. The allowed characters are alphabets
+// and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80
+// characters.
+// - galleryImage - Parameters supplied to the create or update gallery image operation.
+// - options - GalleryImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryImagesClient.BeginCreateOrUpdate
+// method.
+func (client *GalleryImagesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage, options *GalleryImagesClientBeginCreateOrUpdateOptions) (*runtime.Poller[GalleryImagesClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryImagesClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryImagesClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - Create or update a gallery image definition.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleryImagesClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage, options *GalleryImagesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleryImagesClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *GalleryImagesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage, options *GalleryImagesClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, galleryImage); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - Delete a gallery image.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery in which the Image Definition is to be deleted.
+// - galleryImageName - The name of the gallery image definition to be deleted.
+// - options - GalleryImagesClientBeginDeleteOptions contains the optional parameters for the GalleryImagesClient.BeginDelete
+// method.
+func (client *GalleryImagesClient) BeginDelete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, options *GalleryImagesClientBeginDeleteOptions) (*runtime.Poller[GalleryImagesClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, galleryName, galleryImageName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryImagesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryImagesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Delete a gallery image.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleryImagesClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, options *GalleryImagesClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleryImagesClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, galleryName, galleryImageName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *GalleryImagesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, options *GalleryImagesClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Retrieves information about a gallery image definition.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery from which the Image Definitions are to be retrieved.
+// - galleryImageName - The name of the gallery image definition to be retrieved.
+// - options - GalleryImagesClientGetOptions contains the optional parameters for the GalleryImagesClient.Get method.
+func (client *GalleryImagesClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, options *GalleryImagesClientGetOptions) (GalleryImagesClientGetResponse, error) {
+ var err error
+ const operationName = "GalleryImagesClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, galleryName, galleryImageName, options)
+ if err != nil {
+ return GalleryImagesClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return GalleryImagesClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return GalleryImagesClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *GalleryImagesClient) getCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, options *GalleryImagesClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *GalleryImagesClient) getHandleResponse(resp *http.Response) (GalleryImagesClientGetResponse, error) {
+ result := GalleryImagesClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.GalleryImage); err != nil {
+ return GalleryImagesClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByGalleryPager - List gallery image definitions in a gallery.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery from which Image Definitions are to be listed.
+// - options - GalleryImagesClientListByGalleryOptions contains the optional parameters for the GalleryImagesClient.NewListByGalleryPager
+// method.
+func (client *GalleryImagesClient) NewListByGalleryPager(resourceGroupName string, galleryName string, options *GalleryImagesClientListByGalleryOptions) *runtime.Pager[GalleryImagesClientListByGalleryResponse] {
+ return runtime.NewPager(runtime.PagingHandler[GalleryImagesClientListByGalleryResponse]{
+ More: func(page GalleryImagesClientListByGalleryResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *GalleryImagesClientListByGalleryResponse) (GalleryImagesClientListByGalleryResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GalleryImagesClient.NewListByGalleryPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByGalleryCreateRequest(ctx, resourceGroupName, galleryName, options)
+ }, nil)
+ if err != nil {
+ return GalleryImagesClientListByGalleryResponse{}, err
+ }
+ return client.listByGalleryHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByGalleryCreateRequest creates the ListByGallery request.
+func (client *GalleryImagesClient) listByGalleryCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, options *GalleryImagesClientListByGalleryOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByGalleryHandleResponse handles the ListByGallery response.
+func (client *GalleryImagesClient) listByGalleryHandleResponse(resp *http.Response) (GalleryImagesClientListByGalleryResponse, error) {
+ result := GalleryImagesClientListByGalleryResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.GalleryImageList); err != nil {
+ return GalleryImagesClientListByGalleryResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginUpdate - Update a gallery image definition.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery in which the Image Definition is to be updated.
+// - galleryImageName - The name of the gallery image definition to be updated. The allowed characters are alphabets and numbers
+// with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
+// - galleryImage - Parameters supplied to the update gallery image operation.
+// - options - GalleryImagesClientBeginUpdateOptions contains the optional parameters for the GalleryImagesClient.BeginUpdate
+// method.
+func (client *GalleryImagesClient) BeginUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate, options *GalleryImagesClientBeginUpdateOptions) (*runtime.Poller[GalleryImagesClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryImagesClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryImagesClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Update a gallery image definition.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleryImagesClient) update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate, options *GalleryImagesClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleryImagesClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *GalleryImagesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate, options *GalleryImagesClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, galleryImage); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleryimageversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleryimageversions_client.go
new file mode 100644
index 000000000..b16e42ed7
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/galleryimageversions_client.go
@@ -0,0 +1,463 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// GalleryImageVersionsClient contains the methods for the GalleryImageVersions group.
+// Don't use this type directly, use NewGalleryImageVersionsClient() instead.
+type GalleryImageVersionsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewGalleryImageVersionsClient creates a new instance of GalleryImageVersionsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewGalleryImageVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GalleryImageVersionsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &GalleryImageVersionsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - Create or update a gallery image version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
+// - galleryImageName - The name of the gallery image definition in which the Image Version is to be created.
+// - galleryImageVersionName - The name of the gallery image version to be created. Needs to follow semantic version name pattern:
+// The allowed characters are digit and period. Digits must be within the range of a 32-bit integer.
+// Format: ..
+// - galleryImageVersion - Parameters supplied to the create or update gallery image version operation.
+// - options - GalleryImageVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryImageVersionsClient.BeginCreateOrUpdate
+// method.
+func (client *GalleryImageVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion, options *GalleryImageVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GalleryImageVersionsClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryImageVersionsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryImageVersionsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - Create or update a gallery image version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleryImageVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion, options *GalleryImageVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleryImageVersionsClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *GalleryImageVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion, options *GalleryImageVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ if galleryImageVersionName == "" {
+ return nil, errors.New("parameter galleryImageVersionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageVersionName}", url.PathEscape(galleryImageVersionName))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, galleryImageVersion); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - Delete a gallery image version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
+// - galleryImageName - The name of the gallery image definition in which the Image Version resides.
+// - galleryImageVersionName - The name of the gallery image version to be deleted.
+// - options - GalleryImageVersionsClientBeginDeleteOptions contains the optional parameters for the GalleryImageVersionsClient.BeginDelete
+// method.
+func (client *GalleryImageVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, options *GalleryImageVersionsClientBeginDeleteOptions) (*runtime.Poller[GalleryImageVersionsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryImageVersionsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryImageVersionsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Delete a gallery image version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleryImageVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, options *GalleryImageVersionsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleryImageVersionsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *GalleryImageVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, options *GalleryImageVersionsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ if galleryImageVersionName == "" {
+ return nil, errors.New("parameter galleryImageVersionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageVersionName}", url.PathEscape(galleryImageVersionName))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Retrieves information about a gallery image version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
+// - galleryImageName - The name of the gallery image definition in which the Image Version resides.
+// - galleryImageVersionName - The name of the gallery image version to be retrieved.
+// - options - GalleryImageVersionsClientGetOptions contains the optional parameters for the GalleryImageVersionsClient.Get
+// method.
+func (client *GalleryImageVersionsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, options *GalleryImageVersionsClientGetOptions) (GalleryImageVersionsClientGetResponse, error) {
+ var err error
+ const operationName = "GalleryImageVersionsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options)
+ if err != nil {
+ return GalleryImageVersionsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return GalleryImageVersionsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return GalleryImageVersionsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *GalleryImageVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, options *GalleryImageVersionsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ if galleryImageVersionName == "" {
+ return nil, errors.New("parameter galleryImageVersionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageVersionName}", url.PathEscape(galleryImageVersionName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *GalleryImageVersionsClient) getHandleResponse(resp *http.Response) (GalleryImageVersionsClientGetResponse, error) {
+ result := GalleryImageVersionsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.GalleryImageVersion); err != nil {
+ return GalleryImageVersionsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByGalleryImagePager - List gallery image versions in a gallery image definition.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
+// - galleryImageName - The name of the Shared Image Gallery Image Definition from which the Image Versions are to be listed.
+// - options - GalleryImageVersionsClientListByGalleryImageOptions contains the optional parameters for the GalleryImageVersionsClient.NewListByGalleryImagePager
+// method.
+func (client *GalleryImageVersionsClient) NewListByGalleryImagePager(resourceGroupName string, galleryName string, galleryImageName string, options *GalleryImageVersionsClientListByGalleryImageOptions) *runtime.Pager[GalleryImageVersionsClientListByGalleryImageResponse] {
+ return runtime.NewPager(runtime.PagingHandler[GalleryImageVersionsClientListByGalleryImageResponse]{
+ More: func(page GalleryImageVersionsClientListByGalleryImageResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *GalleryImageVersionsClientListByGalleryImageResponse) (GalleryImageVersionsClientListByGalleryImageResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GalleryImageVersionsClient.NewListByGalleryImagePager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByGalleryImageCreateRequest(ctx, resourceGroupName, galleryName, galleryImageName, options)
+ }, nil)
+ if err != nil {
+ return GalleryImageVersionsClientListByGalleryImageResponse{}, err
+ }
+ return client.listByGalleryImageHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByGalleryImageCreateRequest creates the ListByGalleryImage request.
+func (client *GalleryImageVersionsClient) listByGalleryImageCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, options *GalleryImageVersionsClientListByGalleryImageOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByGalleryImageHandleResponse handles the ListByGalleryImage response.
+func (client *GalleryImageVersionsClient) listByGalleryImageHandleResponse(resp *http.Response) (GalleryImageVersionsClientListByGalleryImageResponse, error) {
+ result := GalleryImageVersionsClientListByGalleryImageResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.GalleryImageVersionList); err != nil {
+ return GalleryImageVersionsClientListByGalleryImageResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginUpdate - Update a gallery image version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery in which the Image Definition resides.
+// - galleryImageName - The name of the gallery image definition in which the Image Version is to be updated.
+// - galleryImageVersionName - The name of the gallery image version to be updated. Needs to follow semantic version name pattern:
+// The allowed characters are digit and period. Digits must be within the range of a 32-bit integer.
+// Format: ..
+// - galleryImageVersion - Parameters supplied to the update gallery image version operation.
+// - options - GalleryImageVersionsClientBeginUpdateOptions contains the optional parameters for the GalleryImageVersionsClient.BeginUpdate
+// method.
+func (client *GalleryImageVersionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate, options *GalleryImageVersionsClientBeginUpdateOptions) (*runtime.Poller[GalleryImageVersionsClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GalleryImageVersionsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GalleryImageVersionsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Update a gallery image version.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GalleryImageVersionsClient) update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate, options *GalleryImageVersionsClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GalleryImageVersionsClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *GalleryImageVersionsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate, options *GalleryImageVersionsClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ if galleryImageVersionName == "" {
+ return nil, errors.New("parameter galleryImageVersionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageVersionName}", url.PathEscape(galleryImageVersionName))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, galleryImageVersion); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/gallerysharingprofile_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/gallerysharingprofile_client.go
new file mode 100644
index 000000000..0ccc5ce9f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/gallerysharingprofile_client.go
@@ -0,0 +1,125 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// GallerySharingProfileClient contains the methods for the GallerySharingProfile group.
+// Don't use this type directly, use NewGallerySharingProfileClient() instead.
+type GallerySharingProfileClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewGallerySharingProfileClient creates a new instance of GallerySharingProfileClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewGallerySharingProfileClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GallerySharingProfileClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &GallerySharingProfileClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginUpdate - Update sharing profile of a gallery.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - resourceGroupName - The name of the resource group.
+// - galleryName - The name of the Shared Image Gallery.
+// - sharingUpdate - Parameters supplied to the update gallery sharing profile.
+// - options - GallerySharingProfileClientBeginUpdateOptions contains the optional parameters for the GallerySharingProfileClient.BeginUpdate
+// method.
+func (client *GallerySharingProfileClient) BeginUpdate(ctx context.Context, resourceGroupName string, galleryName string, sharingUpdate SharingUpdate, options *GallerySharingProfileClientBeginUpdateOptions) (*runtime.Poller[GallerySharingProfileClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, galleryName, sharingUpdate, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[GallerySharingProfileClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[GallerySharingProfileClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Update sharing profile of a gallery.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+func (client *GallerySharingProfileClient) update(ctx context.Context, resourceGroupName string, galleryName string, sharingUpdate SharingUpdate, options *GallerySharingProfileClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "GallerySharingProfileClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, galleryName, sharingUpdate, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *GallerySharingProfileClient) updateCreateRequest(ctx context.Context, resourceGroupName string, galleryName string, sharingUpdate SharingUpdate, options *GallerySharingProfileClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/share"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if galleryName == "" {
+ return nil, errors.New("parameter galleryName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryName}", url.PathEscape(galleryName))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, sharingUpdate); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/images_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/images_client.go
new file mode 100644
index 000000000..5fecdbf1d
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/images_client.go
@@ -0,0 +1,462 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// ImagesClient contains the methods for the Images group.
+// Don't use this type directly, use NewImagesClient() instead.
+type ImagesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewImagesClient creates a new instance of ImagesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ImagesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &ImagesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - Create or update an image.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - imageName - The name of the image.
+// - parameters - Parameters supplied to the Create Image operation.
+// - options - ImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the ImagesClient.BeginCreateOrUpdate
+// method.
+func (client *ImagesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, imageName string, parameters Image, options *ImagesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ImagesClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, imageName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ImagesClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ImagesClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - Create or update an image.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *ImagesClient) createOrUpdate(ctx context.Context, resourceGroupName string, imageName string, parameters Image, options *ImagesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "ImagesClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, imageName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *ImagesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, imageName string, parameters Image, options *ImagesClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if imageName == "" {
+ return nil, errors.New("parameter imageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{imageName}", url.PathEscape(imageName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - Deletes an Image.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - imageName - The name of the image.
+// - options - ImagesClientBeginDeleteOptions contains the optional parameters for the ImagesClient.BeginDelete method.
+func (client *ImagesClient) BeginDelete(ctx context.Context, resourceGroupName string, imageName string, options *ImagesClientBeginDeleteOptions) (*runtime.Poller[ImagesClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, imageName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ImagesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ImagesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Deletes an Image.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *ImagesClient) deleteOperation(ctx context.Context, resourceGroupName string, imageName string, options *ImagesClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "ImagesClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, imageName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *ImagesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, imageName string, options *ImagesClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if imageName == "" {
+ return nil, errors.New("parameter imageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{imageName}", url.PathEscape(imageName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Gets an image.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - imageName - The name of the image.
+// - options - ImagesClientGetOptions contains the optional parameters for the ImagesClient.Get method.
+func (client *ImagesClient) Get(ctx context.Context, resourceGroupName string, imageName string, options *ImagesClientGetOptions) (ImagesClientGetResponse, error) {
+ var err error
+ const operationName = "ImagesClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, imageName, options)
+ if err != nil {
+ return ImagesClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return ImagesClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return ImagesClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *ImagesClient) getCreateRequest(ctx context.Context, resourceGroupName string, imageName string, options *ImagesClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if imageName == "" {
+ return nil, errors.New("parameter imageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{imageName}", url.PathEscape(imageName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", *options.Expand)
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *ImagesClient) getHandleResponse(resp *http.Response) (ImagesClientGetResponse, error) {
+ result := ImagesClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.Image); err != nil {
+ return ImagesClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - Gets the list of Images in the subscription. Use nextLink property in the response to get the next page
+// of Images. Do this till nextLink is null to fetch all the Images.
+//
+// Generated from API version 2024-03-01
+// - options - ImagesClientListOptions contains the optional parameters for the ImagesClient.NewListPager method.
+func (client *ImagesClient) NewListPager(options *ImagesClientListOptions) *runtime.Pager[ImagesClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[ImagesClientListResponse]{
+ More: func(page ImagesClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *ImagesClientListResponse) (ImagesClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ImagesClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return ImagesClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *ImagesClient) listCreateRequest(ctx context.Context, options *ImagesClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *ImagesClient) listHandleResponse(resp *http.Response) (ImagesClientListResponse, error) {
+ result := ImagesClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.ImageListResult); err != nil {
+ return ImagesClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByResourceGroupPager - Gets the list of images under a resource group. Use nextLink property in the response to
+// get the next page of Images. Do this till nextLink is null to fetch all the Images.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - options - ImagesClientListByResourceGroupOptions contains the optional parameters for the ImagesClient.NewListByResourceGroupPager
+// method.
+func (client *ImagesClient) NewListByResourceGroupPager(resourceGroupName string, options *ImagesClientListByResourceGroupOptions) *runtime.Pager[ImagesClientListByResourceGroupResponse] {
+ return runtime.NewPager(runtime.PagingHandler[ImagesClientListByResourceGroupResponse]{
+ More: func(page ImagesClientListByResourceGroupResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *ImagesClientListByResourceGroupResponse) (ImagesClientListByResourceGroupResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ImagesClient.NewListByResourceGroupPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return ImagesClientListByResourceGroupResponse{}, err
+ }
+ return client.listByResourceGroupHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByResourceGroupCreateRequest creates the ListByResourceGroup request.
+func (client *ImagesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ImagesClientListByResourceGroupOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByResourceGroupHandleResponse handles the ListByResourceGroup response.
+func (client *ImagesClient) listByResourceGroupHandleResponse(resp *http.Response) (ImagesClientListByResourceGroupResponse, error) {
+ result := ImagesClientListByResourceGroupResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.ImageListResult); err != nil {
+ return ImagesClientListByResourceGroupResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginUpdate - Update an image.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - imageName - The name of the image.
+// - parameters - Parameters supplied to the Update Image operation.
+// - options - ImagesClientBeginUpdateOptions contains the optional parameters for the ImagesClient.BeginUpdate method.
+func (client *ImagesClient) BeginUpdate(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate, options *ImagesClientBeginUpdateOptions) (*runtime.Poller[ImagesClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, imageName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ImagesClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ImagesClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Update an image.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *ImagesClient) update(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate, options *ImagesClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "ImagesClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, imageName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *ImagesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate, options *ImagesClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if imageName == "" {
+ return nil, errors.New("parameter imageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{imageName}", url.PathEscape(imageName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/loganalytics_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/loganalytics_client.go
new file mode 100644
index 000000000..a3b77f828
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/loganalytics_client.go
@@ -0,0 +1,200 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// LogAnalyticsClient contains the methods for the LogAnalytics group.
+// Don't use this type directly, use NewLogAnalyticsClient() instead.
+type LogAnalyticsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewLogAnalyticsClient creates a new instance of LogAnalyticsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewLogAnalyticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LogAnalyticsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &LogAnalyticsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginExportRequestRateByInterval - Export logs that show Api requests made by this subscription in the given time window
+// to show throttling activities.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The location upon which virtual-machine-sizes is queried.
+// - parameters - Parameters supplied to the LogAnalytics getRequestRateByInterval Api.
+// - options - LogAnalyticsClientBeginExportRequestRateByIntervalOptions contains the optional parameters for the LogAnalyticsClient.BeginExportRequestRateByInterval
+// method.
+func (client *LogAnalyticsClient) BeginExportRequestRateByInterval(ctx context.Context, location string, parameters RequestRateByIntervalInput, options *LogAnalyticsClientBeginExportRequestRateByIntervalOptions) (*runtime.Poller[LogAnalyticsClientExportRequestRateByIntervalResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.exportRequestRateByInterval(ctx, location, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LogAnalyticsClientExportRequestRateByIntervalResponse]{
+ FinalStateVia: runtime.FinalStateViaAzureAsyncOp,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LogAnalyticsClientExportRequestRateByIntervalResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// ExportRequestRateByInterval - Export logs that show Api requests made by this subscription in the given time window to
+// show throttling activities.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *LogAnalyticsClient) exportRequestRateByInterval(ctx context.Context, location string, parameters RequestRateByIntervalInput, options *LogAnalyticsClientBeginExportRequestRateByIntervalOptions) (*http.Response, error) {
+ var err error
+ const operationName = "LogAnalyticsClient.BeginExportRequestRateByInterval"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.exportRequestRateByIntervalCreateRequest(ctx, location, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// exportRequestRateByIntervalCreateRequest creates the ExportRequestRateByInterval request.
+func (client *LogAnalyticsClient) exportRequestRateByIntervalCreateRequest(ctx context.Context, location string, parameters RequestRateByIntervalInput, options *LogAnalyticsClientBeginExportRequestRateByIntervalOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginExportThrottledRequests - Export logs that show total throttled Api requests for this subscription in the given time
+// window.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The location upon which virtual-machine-sizes is queried.
+// - parameters - Parameters supplied to the LogAnalytics getThrottledRequests Api.
+// - options - LogAnalyticsClientBeginExportThrottledRequestsOptions contains the optional parameters for the LogAnalyticsClient.BeginExportThrottledRequests
+// method.
+func (client *LogAnalyticsClient) BeginExportThrottledRequests(ctx context.Context, location string, parameters ThrottledRequestsInput, options *LogAnalyticsClientBeginExportThrottledRequestsOptions) (*runtime.Poller[LogAnalyticsClientExportThrottledRequestsResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.exportThrottledRequests(ctx, location, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LogAnalyticsClientExportThrottledRequestsResponse]{
+ FinalStateVia: runtime.FinalStateViaAzureAsyncOp,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LogAnalyticsClientExportThrottledRequestsResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// ExportThrottledRequests - Export logs that show total throttled Api requests for this subscription in the given time window.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *LogAnalyticsClient) exportThrottledRequests(ctx context.Context, location string, parameters ThrottledRequestsInput, options *LogAnalyticsClientBeginExportThrottledRequestsOptions) (*http.Response, error) {
+ var err error
+ const operationName = "LogAnalyticsClient.BeginExportThrottledRequests"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.exportThrottledRequestsCreateRequest(ctx, location, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// exportThrottledRequestsCreateRequest creates the ExportThrottledRequests request.
+func (client *LogAnalyticsClient) exportThrottledRequestsCreateRequest(ctx context.Context, location string, parameters ThrottledRequestsInput, options *LogAnalyticsClientBeginExportThrottledRequestsOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/models.go
new file mode 100644
index 000000000..cd572a4da
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/models.go
@@ -0,0 +1,8660 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import "time"
+
+// APIEntityReference - The API entity reference.
+type APIEntityReference struct {
+ // The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/…
+ ID *string
+}
+
+// APIError - Api error.
+type APIError struct {
+ // The error code.
+ Code *string
+
+ // The Api error details
+ Details []*APIErrorBase
+
+ // The Api inner error
+ Innererror *InnerError
+
+ // The error message.
+ Message *string
+
+ // The target of the particular error.
+ Target *string
+}
+
+// APIErrorBase - Api error base.
+type APIErrorBase struct {
+ // The error code.
+ Code *string
+
+ // The error message.
+ Message *string
+
+ // The target of the particular error.
+ Target *string
+}
+
+// AccessURI - A disk access SAS uri.
+type AccessURI struct {
+ // READ-ONLY; A SAS uri for accessing a disk.
+ AccessSAS *string
+
+ // READ-ONLY; A SAS uri for accessing a VM guest state.
+ SecurityDataAccessSAS *string
+}
+
+// AdditionalCapabilities - Enables or disables a capability on the virtual machine or virtual machine scale set.
+type AdditionalCapabilities struct {
+ // The flag that enables or disables hibernation capability on the VM.
+ HibernationEnabled *bool
+
+ // The flag that enables or disables a capability to have one or more managed data disks with UltraSSDLRS storage account
+ // type on the VM or VMSS. Managed disks with storage account type UltraSSDLRS can
+ // be added to a virtual machine or virtual machine scale set only if this property is enabled.
+ UltraSSDEnabled *bool
+}
+
+// AdditionalUnattendContent - Specifies additional XML formatted information that can be included in the Unattend.xml file,
+// which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in
+// which the content is applied.
+type AdditionalUnattendContent struct {
+ // The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
+ ComponentName *string
+
+ // Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML
+ // must be less than 4KB and must include the root element for the setting or
+ // feature that is being inserted.
+ Content *string
+
+ // The pass name. Currently, the only allowable value is OobeSystem.
+ PassName *string
+
+ // Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
+ SettingName *SettingNames
+}
+
+// AlternativeOption - Describes the alternative option specified by the Publisher for this image when this image is deprecated.
+type AlternativeOption struct {
+ // Describes the type of the alternative option.
+ Type *AlternativeType
+
+ // Indicates the alternative option value specified by the Publisher. This is the Offer name when the type is Offer or the
+ // Plan name when the type is Plan.
+ Value *string
+}
+
+// ApplicationProfile - Contains the list of gallery applications that should be made available to the VM/VMSS
+type ApplicationProfile struct {
+ // Specifies the gallery applications that should be made available to the VM/VMSS
+ GalleryApplications []*VMGalleryApplication
+}
+
+// AttachDetachDataDisksRequest - Specifies the input for attaching and detaching a list of managed data disks.
+type AttachDetachDataDisksRequest struct {
+ // The list of managed data disks to be attached.
+ DataDisksToAttach []*DataDisksToAttach
+
+ // The list of managed data disks to be detached.
+ DataDisksToDetach []*DataDisksToDetach
+}
+
+// AutomaticOSUpgradePolicy - The configuration parameters used for performing automatic OS upgrade.
+type AutomaticOSUpgradePolicy struct {
+ // Whether OS image rollback feature should be disabled. Default value is false.
+ DisableAutomaticRollback *bool
+
+ // Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer
+ // version of the OS image becomes available. Default value is false. If this is set
+ // to true for Windows based scale sets, enableAutomaticUpdates
+ // [https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet]
+ // is automatically set to false and cannot be set to true.
+ EnableAutomaticOSUpgrade *bool
+
+ // Indicates whether Auto OS Upgrade should undergo deferral. Deferred OS upgrades will send advanced notifications on a per-VM
+ // basis that an OS upgrade from rolling upgrades is incoming, via the IMDS
+ // tag 'Platform.PendingOSUpgrade'. The upgrade then defers until the upgrade is approved via an ApproveRollingUpgrade call.
+ OSRollingUpgradeDeferral *bool
+
+ // Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade
+ // will fallback to the default policy if no policy is defined on the VMSS.
+ UseRollingUpgradePolicy *bool
+}
+
+// AutomaticOSUpgradeProperties - Describes automatic OS upgrade properties on the image.
+type AutomaticOSUpgradeProperties struct {
+ // REQUIRED; Specifies whether automatic OS upgrade is supported on the image.
+ AutomaticOSUpgradeSupported *bool
+}
+
+// AutomaticRepairsPolicy - Specifies the configuration parameters for automatic repairs on the virtual machine scale set.
+type AutomaticRepairsPolicy struct {
+ // Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
+ Enabled *bool
+
+ // The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the
+ // state change has completed. This helps avoid premature or accidental repairs.
+ // The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which
+ // is also the default value. The maximum allowed grace period is 90 minutes
+ // (PT90M).
+ GracePeriod *string
+
+ // Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale
+ // set. Default value is replace.
+ RepairAction *RepairAction
+}
+
+// AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual
+// machines specified in the same availability set are allocated to different nodes to maximize
+// availability. For more information about availability sets, see Availability sets overview [https://docs.microsoft.com/azure/virtual-machines/availability-set-overview].
+// For more information on Azure
+// planned maintenance, see Maintenance and updates for Virtual Machines in Azure [https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates].
+// Currently, a VM can only be added to an
+// availability set at creation time. An existing VM cannot be added to an availability set.
+type AvailabilitySet struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // The instance view of a resource.
+ Properties *AvailabilitySetProperties
+
+ // Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use
+ // 'Aligned' for virtual machines with managed disks and 'Classic' for virtual
+ // machines with unmanaged disks. Default value is 'Classic'.
+ SKU *SKU
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// AvailabilitySetListResult - The List Availability Set operation response.
+type AvailabilitySetListResult struct {
+ // REQUIRED; The list of availability sets
+ Value []*AvailabilitySet
+
+ // The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets.
+ NextLink *string
+}
+
+// AvailabilitySetProperties - The instance view of a resource.
+type AvailabilitySetProperties struct {
+ // Fault Domain count.
+ PlatformFaultDomainCount *int32
+
+ // Update Domain count.
+ PlatformUpdateDomainCount *int32
+
+ // Specifies information about the proximity placement group that the availability set should be assigned to. Minimum api-version:
+ // 2018-04-01.
+ ProximityPlacementGroup *SubResource
+
+ // A list of references to all virtual machines in the availability set.
+ VirtualMachines []*SubResource
+
+ // READ-ONLY; The resource status information.
+ Statuses []*InstanceViewStatus
+}
+
+// AvailabilitySetUpdate - Specifies information about the availability set that the virtual machine should be assigned to.
+// Only tags may be updated.
+type AvailabilitySetUpdate struct {
+ // The instance view of a resource.
+ Properties *AvailabilitySetProperties
+
+ // Sku of the availability set
+ SKU *SKU
+
+ // Resource tags
+ Tags map[string]*string
+}
+
+// AvailablePatchSummary - Describes the properties of an virtual machine instance view for available patch summary.
+type AvailablePatchSummary struct {
+ // READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension
+ // logs.
+ AssessmentActivityID *string
+
+ // READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed.
+ CriticalAndSecurityPatchCount *int32
+
+ // READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
+ Error *APIError
+
+ // READ-ONLY; The UTC timestamp when the operation began.
+ LastModifiedTime *time.Time
+
+ // READ-ONLY; The number of all available patches excluding critical and security.
+ OtherPatchCount *int32
+
+ // READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete
+ // installation but the reboot has not yet occurred.
+ RebootPending *bool
+
+ // READ-ONLY; The UTC timestamp when the operation began.
+ StartTime *time.Time
+
+ // READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes.
+ // At that point it will become "Unknown", "Failed", "Succeeded", or
+ // "CompletedWithWarnings."
+ Status *PatchOperationStatus
+}
+
+// BillingProfile - Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01.
+type BillingProfile struct {
+ // Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.
+ // This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time
+ // of create/update of Azure Spot VM/VMSS and the operation will only succeed if
+ // the maxPrice is greater than the current Azure Spot price.
+ // The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice
+ // after creation of VM/VMSS.
+ // Possible values are:
+ // - Any decimal value greater than zero. Example: 0.01538
+ // -1 – indicates default price to be up-to on-demand.
+ // You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the
+ // default max price is -1 if it is not provided by you.
+ // Minimum api-version: 2019-03-01.
+ MaxPrice *float64
+}
+
+// BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose
+// VM status. You can easily view the output of your console log. Azure also enables you to see
+// a screenshot of the VM from the hypervisor.
+type BootDiagnostics struct {
+ // Whether boot diagnostics should be enabled on the Virtual Machine.
+ Enabled *bool
+
+ // Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling
+ // boot diagnostics, managed storage will be used.
+ StorageURI *string
+}
+
+// BootDiagnosticsInstanceView - The instance view of a virtual machine boot diagnostics.
+type BootDiagnosticsInstanceView struct {
+ // READ-ONLY; The console screenshot blob URI. Note: This will not be set if boot diagnostics is currently enabled with managed
+ // storage.
+ ConsoleScreenshotBlobURI *string
+
+ // READ-ONLY; The serial console log blob Uri. Note: This will not be set if boot diagnostics is currently enabled with managed
+ // storage.
+ SerialConsoleLogBlobURI *string
+
+ // READ-ONLY; The boot diagnostics status information for the VM. Note: It will be set only if there are errors encountered
+ // in enabling boot diagnostics.
+ Status *InstanceViewStatus
+}
+
+// CapacityReservation - Specifies information about the capacity reservation.
+type CapacityReservation struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // REQUIRED; SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently
+ // VM Skus with the capability called 'CapacityReservationSupported' set to true are
+ // supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list)
+ // for supported values.
+ SKU *SKU
+
+ // Properties of the Capacity reservation.
+ Properties *CapacityReservationProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the
+ // list of zones specified during the capacity reservation group creation. The zone
+ // can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided,
+ // enforces VM/VMSS using this capacity reservation to be in same zone.
+ Zones []*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// CapacityReservationGroup - Specifies information about the capacity reservation group that the capacity reservations should
+// be assigned to. Currently, a capacity reservation can only be added to a capacity reservation group at
+// creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group.
+type CapacityReservationGroup struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // capacity reservation group Properties.
+ Properties *CapacityReservationGroupProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided,
+ // the group supports only regional resources in the region. If provided,
+ // enforces each capacity reservation in the group to be in one of the zones.
+ Zones []*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+type CapacityReservationGroupInstanceView struct {
+ // READ-ONLY; List of instance view of the capacity reservations under the capacity reservation group.
+ CapacityReservations []*CapacityReservationInstanceViewWithName
+
+ // READ-ONLY; List of the subscriptions that the capacity reservation group is shared with. Note: Minimum api-version: 2024-03-01.
+ // Please refer to https://aka.ms/computereservationsharing for more details.
+ SharedSubscriptionIDs []*SubResourceReadOnly
+}
+
+// CapacityReservationGroupListResult - The List capacity reservation group with resource group response.
+type CapacityReservationGroupListResult struct {
+ // REQUIRED; The list of capacity reservation groups
+ Value []*CapacityReservationGroup
+
+ // The URI to fetch the next page of capacity reservation groups. Call ListNext() with this URI to fetch the next page of
+ // capacity reservation groups.
+ NextLink *string
+}
+
+// CapacityReservationGroupProperties - capacity reservation group Properties.
+type CapacityReservationGroupProperties struct {
+ // Specifies the settings to enable sharing across subscriptions for the capacity reservation group resource. Pls. keep in
+ // mind the capacity reservation group resource generally can be shared across
+ // subscriptions belonging to a single azure AAD tenant or cross AAD tenant if there is a trust relationship established between
+ // the AAD tenants. Note: Minimum api-version: 2024-03-01. Please refer to
+ // https://aka.ms/computereservationsharing for more details.
+ SharingProfile *ResourceSharingProfile
+
+ // READ-ONLY; A list of all capacity reservation resource ids that belong to capacity reservation group.
+ CapacityReservations []*SubResourceReadOnly
+
+ // READ-ONLY; The capacity reservation group instance view which has the list of instance views for all the capacity reservations
+ // that belong to the capacity reservation group.
+ InstanceView *CapacityReservationGroupInstanceView
+
+ // READ-ONLY; A list of references to all virtual machines associated to the capacity reservation group.
+ VirtualMachinesAssociated []*SubResourceReadOnly
+}
+
+// CapacityReservationGroupUpdate - Specifies information about the capacity reservation group. Only tags can be updated.
+type CapacityReservationGroupUpdate struct {
+ // capacity reservation group Properties.
+ Properties *CapacityReservationGroupProperties
+
+ // Resource tags
+ Tags map[string]*string
+}
+
+// CapacityReservationInstanceView - The instance view of a capacity reservation that provides as snapshot of the runtime
+// properties of the capacity reservation that is managed by the platform and can change outside of control plane
+// operations.
+type CapacityReservationInstanceView struct {
+ // The resource status information.
+ Statuses []*InstanceViewStatus
+
+ // Unutilized capacity of the capacity reservation.
+ UtilizationInfo *CapacityReservationUtilization
+}
+
+// CapacityReservationInstanceViewWithName - The instance view of a capacity reservation that includes the name of the capacity
+// reservation. It is used for the response to the instance view of a capacity reservation group.
+type CapacityReservationInstanceViewWithName struct {
+ // The resource status information.
+ Statuses []*InstanceViewStatus
+
+ // Unutilized capacity of the capacity reservation.
+ UtilizationInfo *CapacityReservationUtilization
+
+ // READ-ONLY; The name of the capacity reservation.
+ Name *string
+}
+
+// CapacityReservationListResult - The list capacity reservation operation response.
+type CapacityReservationListResult struct {
+ // REQUIRED; The list of capacity reservations
+ Value []*CapacityReservation
+
+ // The URI to fetch the next page of capacity reservations. Call ListNext() with this URI to fetch the next page of capacity
+ // reservations.
+ NextLink *string
+}
+
+// CapacityReservationProfile - The parameters of a capacity reservation Profile.
+type CapacityReservationProfile struct {
+ // Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset
+ // vm instances provided enough capacity has been reserved. Please refer to
+ // https://aka.ms/CapacityReservation for more details.
+ CapacityReservationGroup *SubResource
+}
+
+// CapacityReservationProperties - Properties of the Capacity reservation.
+type CapacityReservationProperties struct {
+ // READ-ONLY; The Capacity reservation instance view.
+ InstanceView *CapacityReservationInstanceView
+
+ // READ-ONLY; Specifies the value of fault domain count that Capacity Reservation supports for requested VM size. Note: The
+ // fault domain count specified for a resource (like virtual machines scale set) must be less
+ // than or equal to this value if it deploys using capacity reservation. Minimum api-version: 2022-08-01.
+ PlatformFaultDomainCount *int32
+
+ // READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string
+
+ // READ-ONLY; The date time when the capacity reservation was last updated.
+ ProvisioningTime *time.Time
+
+ // READ-ONLY; A unique id generated and assigned to the capacity reservation by the platform which does not change throughout
+ // the lifetime of the resource.
+ ReservationID *string
+
+ // READ-ONLY; Specifies the time at which the Capacity Reservation resource was created. Minimum api-version: 2021-11-01.
+ TimeCreated *time.Time
+
+ // READ-ONLY; A list of all virtual machine resource ids that are associated with the capacity reservation.
+ VirtualMachinesAssociated []*SubResourceReadOnly
+}
+
+// CapacityReservationUpdate - Specifies information about the capacity reservation. Only tags and sku.capacity can be updated.
+type CapacityReservationUpdate struct {
+ // Properties of the Capacity reservation.
+ Properties *CapacityReservationProperties
+
+ // SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM
+ // Skus with the capability called 'CapacityReservationSupported' set to true are
+ // supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list)
+ // for supported values.
+ SKU *SKU
+
+ // Resource tags
+ Tags map[string]*string
+}
+
+// CapacityReservationUtilization - Represents the capacity reservation utilization in terms of resources allocated.
+type CapacityReservationUtilization struct {
+ // READ-ONLY; The value provides the current capacity of the VM size which was reserved successfully and for which the customer
+ // is getting billed. Minimum api-version: 2022-08-01.
+ CurrentCapacity *int32
+
+ // READ-ONLY; A list of all virtual machines resource ids allocated against the capacity reservation.
+ VirtualMachinesAllocated []*SubResourceReadOnly
+}
+
+// CloudService - Describes the cloud service.
+type CloudService struct {
+ // REQUIRED; Resource location.
+ Location *string
+
+ // Cloud service properties
+ Properties *CloudServiceProperties
+
+ // The system meta data relating to this resource.
+ SystemData *SystemData
+
+ // Resource tags.
+ Tags map[string]*string
+
+ // List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned.
+ // This field is optional.
+ Zones []*string
+
+ // READ-ONLY; Resource Id.
+ ID *string
+
+ // READ-ONLY; Resource name.
+ Name *string
+
+ // READ-ONLY; Resource type.
+ Type *string
+}
+
+// CloudServiceExtensionProfile - Describes a cloud service extension profile.
+type CloudServiceExtensionProfile struct {
+ // List of extensions for the cloud service.
+ Extensions []*Extension
+}
+
+// CloudServiceExtensionProperties - Extension Properties.
+type CloudServiceExtensionProperties struct {
+ // Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become
+ // available.
+ AutoUpgradeMinorVersion *bool
+
+ // Tag to force apply the provided public and protected settings. Changing the tag value allows for re-running the extension
+ // without changing any of the public or protected settings. If forceUpdateTag is
+ // not changed, updates to public or protected settings would still be applied by the handler. If neither forceUpdateTag nor
+ // any of public or protected settings change, extension would flow to the role
+ // instance with the same sequence-number, and it is up to handler implementation whether to re-run it or not
+ ForceUpdateTag *string
+
+ // Protected settings for the extension which are encrypted before sent to the role instance.
+ ProtectedSettings any
+
+ // Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance.
+ ProtectedSettingsFromKeyVault *CloudServiceVaultAndSecretReference
+
+ // The name of the extension handler publisher.
+ Publisher *string
+
+ // Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied
+ // to all roles in the cloud service.
+ RolesAppliedTo []*string
+
+ // Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension
+ // (like RDP), this is the XML setting for the extension.
+ Settings any
+
+ // Specifies the type of the extension.
+ Type *string
+
+ // Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an
+ // asterisk (*) is used as the value, the latest version of the extension is used.
+ // If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor
+ // version of the specified major version is selected. If a major version number
+ // and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified,
+ // an auto-upgrade is performed on the role instance.
+ TypeHandlerVersion *string
+
+ // READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string
+}
+
+// CloudServiceInstanceView - InstanceView of CloudService as a whole
+type CloudServiceInstanceView struct {
+ // Instance view statuses.
+ RoleInstance *InstanceViewStatusesSummary
+
+ // READ-ONLY; Specifies a list of unique identifiers generated internally for the cloud service.
+ // NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details.
+ PrivateIDs []*string
+
+ // READ-ONLY; The version of the SDK that was used to generate the package for the cloud service.
+ SdkVersion *string
+
+ // READ-ONLY
+ Statuses []*ResourceInstanceViewStatus
+}
+
+// CloudServiceListResult - The list operation result.
+type CloudServiceListResult struct {
+ // REQUIRED; The list of resources.
+ Value []*CloudService
+
+ // The URI to fetch the next page of resources. Use this to get the next page of resources. Do this till nextLink is null
+ // to fetch all the resources.
+ NextLink *string
+}
+
+// CloudServiceNetworkProfile - Network Profile for the cloud service.
+type CloudServiceNetworkProfile struct {
+ // List of Load balancer configurations. Cloud service can have up to two load balancer configurations, corresponding to a
+ // Public Load Balancer and an Internal Load Balancer.
+ LoadBalancerConfigurations []*LoadBalancerConfiguration
+
+ // Slot type for the cloud service. Possible values are
+ // Production
+ // Staging
+ // If not specified, the default value is Production.
+ SlotType *CloudServiceSlotType
+
+ // The id reference of the cloud service containing the target IP with which the subject cloud service can perform a swap.
+ // This property cannot be updated once it is set. The swappable cloud service
+ // referred by this id must be present otherwise an error will be thrown.
+ SwappableCloudService *SubResource
+}
+
+// CloudServiceOsProfile - Describes the OS profile for the cloud service.
+type CloudServiceOsProfile struct {
+ // Specifies set of certificates that should be installed onto the role instances.
+ Secrets []*CloudServiceVaultSecretGroup
+}
+
+// CloudServiceProperties - Cloud service properties
+type CloudServiceProperties struct {
+ // (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override
+ // the role instance count and vm size specified in the .cscfg and .csdef
+ // respectively. The default value is false.
+ AllowModelOverride *bool
+
+ // Specifies the XML service configuration (.cscfg) for the cloud service.
+ Configuration *string
+
+ // Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can
+ // be Shared Access Signature (SAS) URI from any storage account. This is a
+ // write-only property and is not returned in GET calls.
+ ConfigurationURL *string
+
+ // Describes a cloud service extension profile.
+ ExtensionProfile *CloudServiceExtensionProfile
+
+ // Network Profile for the cloud service.
+ NetworkProfile *CloudServiceNetworkProfile
+
+ // Describes the OS profile for the cloud service.
+ OSProfile *CloudServiceOsProfile
+
+ // Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be
+ // Shared Access Signature (SAS) URI from any storage account. This is a write-only
+ // property and is not returned in GET calls.
+ PackageURL *string
+
+ // Describes the role profile for the cloud service.
+ RoleProfile *CloudServiceRoleProfile
+
+ // (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is true. If
+ // false, the service model is still deployed, but the code is not run immediately.
+ // Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service
+ // still incurs charges, even if it is poweredoff.
+ StartCloudService *bool
+
+ // Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates
+ // can be initiated manually in each update domain or initiated automatically in
+ // all update domains. Possible Values are
+ // Auto
+ // Manual
+ // Simultaneous
+ // If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If
+ // set to Auto, the update is automatically applied to each update domain in
+ // sequence.
+ UpgradeMode *CloudServiceUpgradeMode
+
+ // READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string
+
+ // READ-ONLY; The unique identifier for the cloud service.
+ UniqueID *string
+}
+
+// CloudServiceRole - Describes a role of the cloud service.
+type CloudServiceRole struct {
+ // The cloud service role properties.
+ Properties *CloudServiceRoleProperties
+
+ // Describes the cloud service role sku.
+ SKU *CloudServiceRoleSKU
+
+ // READ-ONLY; Resource id
+ ID *string
+
+ // READ-ONLY; Resource location
+ Location *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// CloudServiceRoleListResult - The list operation result.
+type CloudServiceRoleListResult struct {
+ // REQUIRED; The list of resources.
+ Value []*CloudServiceRole
+
+ // The URI to fetch the next page of resources. Use this to get the next page of resources. Do this till nextLink is null
+ // to fetch all the resources.
+ NextLink *string
+}
+
+// CloudServiceRoleProfile - Describes the role profile for the cloud service.
+type CloudServiceRoleProfile struct {
+ // List of roles for the cloud service.
+ Roles []*CloudServiceRoleProfileProperties
+}
+
+// CloudServiceRoleProfileProperties - Describes the role properties.
+type CloudServiceRoleProfileProperties struct {
+ // Resource name.
+ Name *string
+
+ // Describes the cloud service role sku.
+ SKU *CloudServiceRoleSKU
+}
+
+// CloudServiceRoleProperties - The cloud service role properties.
+type CloudServiceRoleProperties struct {
+ // READ-ONLY; Specifies the ID which uniquely identifies a cloud service role.
+ UniqueID *string
+}
+
+// CloudServiceRoleSKU - Describes the cloud service role sku.
+type CloudServiceRoleSKU struct {
+ // Specifies the number of role instances in the cloud service.
+ Capacity *int64
+
+ // The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete
+ // and recreate the cloud service or move back to the old sku.
+ Name *string
+
+ // Specifies the tier of the cloud service. Possible Values are
+ // Standard
+ // Basic
+ Tier *string
+}
+
+type CloudServiceUpdate struct {
+ // Resource tags
+ Tags map[string]*string
+}
+
+// CloudServiceVaultAndSecretReference - Protected settings for the extension, referenced using KeyVault which are encrypted
+// before sent to the role instance.
+type CloudServiceVaultAndSecretReference struct {
+ // Secret URL which contains the protected settings of the extension
+ SecretURL *string
+
+ // The ARM Resource ID of the Key Vault
+ SourceVault *SubResource
+}
+
+// CloudServiceVaultCertificate - Describes a single certificate reference in a Key Vault, and where the certificate should
+// reside on the role instance.
+type CloudServiceVaultCertificate struct {
+ // This is the URL of a certificate that has been uploaded to Key Vault as a secret.
+ CertificateURL *string
+}
+
+// CloudServiceVaultSecretGroup - Describes a set of certificates which are all in the same Key Vault.
+type CloudServiceVaultSecretGroup struct {
+ // The relative URL of the Key Vault containing all of the certificates in VaultCertificates.
+ SourceVault *SubResource
+
+ // The list of key vault references in SourceVault which contain certificates.
+ VaultCertificates []*CloudServiceVaultCertificate
+}
+
+// CommunityGallery - Specifies information about the Community Gallery that you want to create or update.
+type CommunityGallery struct {
+ // The identifier information of community gallery.
+ Identifier *CommunityGalleryIdentifier
+
+ // Describes the properties of a community gallery.
+ Properties *CommunityGalleryProperties
+
+ // READ-ONLY; Resource location
+ Location *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// CommunityGalleryIdentifier - The identifier information of community gallery.
+type CommunityGalleryIdentifier struct {
+ // The unique id of this community gallery.
+ UniqueID *string
+}
+
+// CommunityGalleryImage - Specifies information about the gallery image definition that you want to create or update.
+type CommunityGalleryImage struct {
+ // The identifier information of community gallery.
+ Identifier *CommunityGalleryIdentifier
+
+ // Describes the properties of a gallery image definition.
+ Properties *CommunityGalleryImageProperties
+
+ // READ-ONLY; Resource location
+ Location *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// CommunityGalleryImageIdentifier - This is the community gallery image definition identifier.
+type CommunityGalleryImageIdentifier struct {
+ // The name of the gallery image definition offer.
+ Offer *string
+
+ // The name of the gallery image definition publisher.
+ Publisher *string
+
+ // The name of the gallery image definition SKU.
+ SKU *string
+}
+
+// CommunityGalleryImageList - The List Community Gallery Images operation response.
+type CommunityGalleryImageList struct {
+ // REQUIRED; A list of community gallery images.
+ Value []*CommunityGalleryImage
+
+ // The URI to fetch the next page of community gallery images. Call ListNext() with this to fetch the next page of community
+ // gallery images.
+ NextLink *string
+}
+
+// CommunityGalleryImageProperties - Describes the properties of a gallery image definition.
+type CommunityGalleryImageProperties struct {
+ // REQUIRED; This is the community gallery image definition identifier.
+ Identifier *CommunityGalleryImageIdentifier
+
+ // REQUIRED; This property allows the user to specify whether the virtual machines created under this image are 'Generalized'
+ // or 'Specialized'.
+ OSState *OperatingSystemStateTypes
+
+ // REQUIRED; This property allows you to specify the type of the OS that is included in the disk when creating a VM from a
+ // managed image. Possible values are: Windows, Linux.
+ OSType *OperatingSystemTypes
+
+ // The architecture of the image. Applicable to OS disks only.
+ Architecture *Architecture
+
+ // The artifact tags of a community gallery resource.
+ ArtifactTags map[string]*string
+
+ // Describes the disallowed disk types.
+ Disallowed *Disallowed
+
+ // The disclaimer for a community gallery resource.
+ Disclaimer *string
+
+ // The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property
+ // is updatable.
+ EndOfLifeDate *time.Time
+
+ // The end-user license agreement for the current community gallery image.
+ Eula *string
+
+ // A list of gallery image features.
+ Features []*GalleryImageFeature
+
+ // The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
+ HyperVGeneration *HyperVGeneration
+
+ // Privacy statement URI for the current community gallery image.
+ PrivacyStatementURI *string
+
+ // Describes the gallery image definition purchase plan. This is used by marketplace images.
+ PurchasePlan *ImagePurchasePlan
+
+ // The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.
+ Recommended *RecommendedMachineConfiguration
+}
+
+// CommunityGalleryImageVersion - Specifies information about the gallery image version that you want to create or update.
+type CommunityGalleryImageVersion struct {
+ // The identifier information of community gallery.
+ Identifier *CommunityGalleryIdentifier
+
+ // Describes the properties of a gallery image version.
+ Properties *CommunityGalleryImageVersionProperties
+
+ // READ-ONLY; Resource location
+ Location *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// CommunityGalleryImageVersionList - The List Community Gallery Image versions operation response.
+type CommunityGalleryImageVersionList struct {
+ // REQUIRED; A list of community gallery image versions.
+ Value []*CommunityGalleryImageVersion
+
+ // The URI to fetch the next page of community gallery image versions. Call ListNext() with this to fetch the next page of
+ // community gallery image versions.
+ NextLink *string
+}
+
+// CommunityGalleryImageVersionProperties - Describes the properties of a gallery image version.
+type CommunityGalleryImageVersionProperties struct {
+ // The artifact tags of a community gallery resource.
+ ArtifactTags map[string]*string
+
+ // The disclaimer for a community gallery resource.
+ Disclaimer *string
+
+ // The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This
+ // property is updatable.
+ EndOfLifeDate *time.Time
+
+ // If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
+ ExcludeFromLatest *bool
+
+ // The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This
+ // property is updatable.
+ PublishedDate *time.Time
+
+ // Describes the storage profile of the image version.
+ StorageProfile *SharedGalleryImageVersionStorageProfile
+}
+
+// CommunityGalleryInfo - Information of community gallery if current gallery is shared to community
+type CommunityGalleryInfo struct {
+ // End-user license agreement for community gallery image.
+ Eula *string
+
+ // The prefix of the gallery name that will be displayed publicly. Visible to all users.
+ PublicNamePrefix *string
+
+ // Community gallery publisher support email. The email address of the publisher. Visible to all users.
+ PublisherContact *string
+
+ // The link to the publisher website. Visible to all users.
+ PublisherURI *string
+
+ // READ-ONLY; Contains info about whether community gallery sharing is enabled.
+ CommunityGalleryEnabled *bool
+
+ // READ-ONLY; Community gallery public name list.
+ PublicNames []*string
+}
+
+// CommunityGalleryMetadata - The metadata of community gallery.
+type CommunityGalleryMetadata struct {
+ // REQUIRED; A list of public names the gallery has.
+ PublicNames []*string
+
+ // REQUIRED; The publisher email id of this community gallery.
+ PublisherContact *string
+
+ // The end-user license agreement for this community gallery.
+ Eula *string
+
+ // The link for the privacy statement of this community gallery from the gallery publisher.
+ PrivacyStatementURI *string
+
+ // The publisher URI of this community gallery.
+ PublisherURI *string
+}
+
+// CommunityGalleryProperties - Describes the properties of a community gallery.
+type CommunityGalleryProperties struct {
+ // The artifact tags of a community gallery resource.
+ ArtifactTags map[string]*string
+
+ // The metadata of community gallery.
+ CommunityMetadata *CommunityGalleryMetadata
+
+ // The disclaimer for a community gallery resource.
+ Disclaimer *string
+}
+
+// CopyCompletionError - Indicates the error details if the background copy of a resource created via the CopyStart operation
+// fails.
+type CopyCompletionError struct {
+ // REQUIRED; Indicates the error code if the background copy of a resource created via the CopyStart operation fails.
+ ErrorCode *CopyCompletionErrorReason
+
+ // REQUIRED; Indicates the error message if the background copy of a resource created via the CopyStart operation fails.
+ ErrorMessage *string
+}
+
+// CreationData - Data used when creating a disk.
+type CreationData struct {
+ // REQUIRED; This enumerates the possible sources of a disk's creation.
+ CreateOption *DiskCreateOption
+
+ // Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic san volume snapshot.
+ ElasticSanResourceID *string
+
+ // Required if creating from a Gallery Image. The id/sharedGalleryImageId/communityGalleryImageId of the ImageDiskReference
+ // will be the ARM id of the shared galley image version from which to create a
+ // disk.
+ GalleryImageReference *ImageDiskReference
+
+ // Disk source information for PIR or user images.
+ ImageReference *ImageDiskReference
+
+ // Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.
+ LogicalSectorSize *int32
+
+ // Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance
+ // target. This flag can only be set on disk creation time and cannot be
+ // disabled after enabled.
+ PerformancePlus *bool
+
+ // If this field is set on a snapshot and createOption is CopyStart, the snapshot will be copied at a quicker speed.
+ ProvisionedBandwidthCopySpeed *ProvisionedBandwidthCopyOption
+
+ // If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state.
+ SecurityDataURI *string
+
+ // If createOption is Copy, this is the ARM id of the source snapshot or disk.
+ SourceResourceID *string
+
+ // If createOption is Import, this is the URI of a blob to be imported into a managed disk.
+ SourceURI *string
+
+ // Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to
+ // import as a disk.
+ StorageAccountID *string
+
+ // If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be
+ // between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520
+ // bytes (32 TiB + 512 bytes for the VHD footer).
+ UploadSizeBytes *int64
+
+ // READ-ONLY; If this field is set, this is the unique id identifying the source of this resource.
+ SourceUniqueID *string
+}
+
+// DataDisk - Describes a data disk.
+type DataDisk struct {
+ // REQUIRED; Specifies how the virtual machine disk should be created. Possible values are Attach: This value is used when
+ // you are using a specialized disk to create the virtual machine. FromImage: This value is
+ // used when you are using an image to create the virtual machine data disk. If you are using a platform image, you should
+ // also use the imageReference element described above. If you are using a
+ // marketplace image, you should also use the plan element previously described. Empty: This value is used when creating an
+ // empty data disk. Copy: This value is used to create a data disk from a snapshot
+ // or another disk. Restore: This value is used to create a data disk from a disk restore point.
+ CreateOption *DiskCreateOptionTypes
+
+ // REQUIRED; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and
+ // therefore must be unique for each data disk attached to a VM.
+ Lun *int32
+
+ // Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The defaulting behavior is: None for
+ // Standard storage. ReadOnly for Premium storage.
+ Caching *CachingTypes
+
+ // Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: Delete. If this value
+ // is used, the data disk is deleted when VM is deleted. Detach. If this value is
+ // used, the data disk is retained after VM is deleted. The default value is set to Detach.
+ DeleteOption *DiskDeleteOptionTypes
+
+ // Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the
+ // virtual machine. Supported values: ForceDetach. detachOption: ForceDetach is
+ // applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected
+ // failure from the virtual machine and the disk is still not released then
+ // use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed
+ // when using this detach behavior. This feature is still in preview mode and is
+ // not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting
+ // detachOption: 'ForceDetach'.
+ DetachOption *DiskDetachOptionTypes
+
+ // Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a
+ // virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3
+ // for the disk and the value cannot be larger than 1023.
+ DiskSizeGB *int32
+
+ // The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine.
+ // If SourceImage is provided, the destination virtual hard drive must not
+ // exist.
+ Image *VirtualHardDisk
+
+ // The managed disk parameters.
+ ManagedDisk *ManagedDiskParameters
+
+ // The disk name.
+ Name *string
+
+ // The source resource identifier. It can be a snapshot, or disk restore point from which to create a disk.
+ SourceResource *APIEntityReference
+
+ // Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset
+ ToBeDetached *bool
+
+ // The virtual hard disk.
+ Vhd *VirtualHardDisk
+
+ // Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool
+
+ // READ-ONLY; Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for
+ // VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine
+ // Scale Set.
+ DiskIOPSReadWrite *int64
+
+ // READ-ONLY; Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned
+ // only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the
+ // VirtualMachine Scale Set.
+ DiskMBpsReadWrite *int64
+}
+
+// DataDiskImage - Contains the data disk images information.
+type DataDiskImage struct {
+ // READ-ONLY; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM
+ // and therefore must be unique for each data disk attached to a VM.
+ Lun *int32
+}
+
+// DataDiskImageEncryption - Contains encryption settings for a data disk image.
+type DataDiskImageEncryption struct {
+ // REQUIRED; This property specifies the logical unit number of the data disk. This value is used to identify data disks within
+ // the Virtual Machine and therefore must be unique for each data disk attached to the
+ // Virtual Machine.
+ Lun *int32
+
+ // A relative URI containing the resource ID of the disk encryption set.
+ DiskEncryptionSetID *string
+}
+
+// DataDisksToAttach - Describes the data disk to be attached.
+type DataDisksToAttach struct {
+ // REQUIRED; ID of the managed data disk.
+ DiskID *string
+
+ // Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The defaulting behavior is: None for
+ // Standard storage. ReadOnly for Premium storage.
+ Caching *CachingTypes
+
+ // Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: Delete. If this value
+ // is used, the data disk is deleted when VM is deleted. Detach. If this value is
+ // used, the data disk is retained after VM is deleted. The default value is set to Detach.
+ DeleteOption *DiskDeleteOptionTypes
+
+ // Specifies the customer managed disk encryption set resource id for the managed disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters
+
+ // The logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be
+ // unique for each data disk attached to a VM. If not specified, lun would be auto
+ // assigned.
+ Lun *int32
+
+ // Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool
+}
+
+// DataDisksToDetach - Describes the data disk to be detached.
+type DataDisksToDetach struct {
+ // REQUIRED; ID of the managed data disk.
+ DiskID *string
+
+ // Supported options available for Detach of a disk from a VM. Refer to DetachOption object reference for more details.
+ DetachOption *DiskDetachOptionTypes
+}
+
+// DedicatedHost - Specifies information about the Dedicated host.
+type DedicatedHost struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // REQUIRED; SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute
+ // SKUs for a list of possible values.
+ SKU *SKU
+
+ // Properties of the dedicated host.
+ Properties *DedicatedHostProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// DedicatedHostAllocatableVM - Represents the dedicated host unutilized capacity in terms of a specific VM size.
+type DedicatedHostAllocatableVM struct {
+ // Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity.
+ Count *float64
+
+ // VM size in terms of which the unutilized capacity is represented.
+ VMSize *string
+}
+
+// DedicatedHostAvailableCapacity - Dedicated host unutilized capacity.
+type DedicatedHostAvailableCapacity struct {
+ // The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the
+ // dedicated host.
+ AllocatableVMs []*DedicatedHostAllocatableVM
+}
+
+// DedicatedHostGroup - Specifies information about the dedicated host group that the dedicated hosts should be assigned to.
+// Currently, a dedicated host can only be added to a dedicated host group at creation time. An
+// existing dedicated host cannot be added to another dedicated host group.
+type DedicatedHostGroup struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // Dedicated Host Group Properties.
+ Properties *DedicatedHostGroupProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation.
+ // If not provided, the group supports all zones in the region. If provided,
+ // enforces each host in the group to be in the same zone.
+ Zones []*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+type DedicatedHostGroupInstanceView struct {
+ // List of instance view of the dedicated hosts under the dedicated host group.
+ Hosts []*DedicatedHostInstanceViewWithName
+}
+
+// DedicatedHostGroupListResult - The List Dedicated Host Group with resource group response.
+type DedicatedHostGroupListResult struct {
+ // REQUIRED; The list of dedicated host groups
+ Value []*DedicatedHostGroup
+
+ // The URI to fetch the next page of Dedicated Host Groups. Call ListNext() with this URI to fetch the next page of Dedicated
+ // Host Groups.
+ NextLink *string
+}
+
+// DedicatedHostGroupProperties - Dedicated Host Group Properties.
+type DedicatedHostGroupProperties struct {
+ // REQUIRED; Number of fault domains that the host group can span.
+ PlatformFaultDomainCount *int32
+
+ // Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01.
+ AdditionalCapabilities *DedicatedHostGroupPropertiesAdditionalCapabilities
+
+ // Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group.
+ // Automatic placement means resources are allocated on dedicated hosts, that are
+ // chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. Minimum api-version:
+ // 2020-06-01.
+ SupportAutomaticPlacement *bool
+
+ // READ-ONLY; A list of references to all dedicated hosts in the dedicated host group.
+ Hosts []*SubResourceReadOnly
+
+ // READ-ONLY; The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the
+ // dedicated host group.
+ InstanceView *DedicatedHostGroupInstanceView
+}
+
+// DedicatedHostGroupPropertiesAdditionalCapabilities - Enables or disables a capability on the dedicated host group. Minimum
+// api-version: 2022-03-01.
+type DedicatedHostGroupPropertiesAdditionalCapabilities struct {
+ // The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated
+ // Host Group. For the Virtual Machines to be UltraSSD Enabled,
+ // UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided.
+ // Please refer to
+ // https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. Note:
+ // The ultraSSDEnabled setting can only be enabled for Host Groups that are
+ // created as zonal. Minimum api-version: 2022-03-01.
+ UltraSSDEnabled *bool
+}
+
+// DedicatedHostGroupUpdate - Specifies information about the dedicated host group that the dedicated host should be assigned
+// to. Only tags may be updated.
+type DedicatedHostGroupUpdate struct {
+ // Dedicated Host Group Properties.
+ Properties *DedicatedHostGroupProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation.
+ // If not provided, the group supports all zones in the region. If provided,
+ // enforces each host in the group to be in the same zone.
+ Zones []*string
+}
+
+// DedicatedHostInstanceView - The instance view of a dedicated host.
+type DedicatedHostInstanceView struct {
+ // Unutilized capacity of the dedicated host.
+ AvailableCapacity *DedicatedHostAvailableCapacity
+
+ // The resource status information.
+ Statuses []*InstanceViewStatus
+
+ // READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
+ AssetID *string
+}
+
+// DedicatedHostInstanceViewWithName - The instance view of a dedicated host that includes the name of the dedicated host.
+// It is used for the response to the instance view of a dedicated host group.
+type DedicatedHostInstanceViewWithName struct {
+ // Unutilized capacity of the dedicated host.
+ AvailableCapacity *DedicatedHostAvailableCapacity
+
+ // The resource status information.
+ Statuses []*InstanceViewStatus
+
+ // READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
+ AssetID *string
+
+ // READ-ONLY; The name of the dedicated host.
+ Name *string
+}
+
+// DedicatedHostListResult - The list dedicated host operation response.
+type DedicatedHostListResult struct {
+ // REQUIRED; The list of dedicated hosts
+ Value []*DedicatedHost
+
+ // The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the next page of dedicated hosts.
+ NextLink *string
+}
+
+// DedicatedHostProperties - Properties of the dedicated host.
+type DedicatedHostProperties struct {
+ // Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true'
+ // when not provided.
+ AutoReplaceOnFailure *bool
+
+ // Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are:
+ // None, WindowsServerHybrid, WindowsServerPerpetual. The default value is: None.
+ LicenseType *DedicatedHostLicenseTypes
+
+ // Fault domain of the dedicated host within a dedicated host group.
+ PlatformFaultDomain *int32
+
+ // READ-ONLY; A unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime
+ // of the host.
+ HostID *string
+
+ // READ-ONLY; The dedicated host instance view.
+ InstanceView *DedicatedHostInstanceView
+
+ // READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string
+
+ // READ-ONLY; The date when the host was first provisioned.
+ ProvisioningTime *time.Time
+
+ // READ-ONLY; Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01.
+ TimeCreated *time.Time
+
+ // READ-ONLY; A list of references to all virtual machines in the Dedicated Host.
+ VirtualMachines []*SubResourceReadOnly
+}
+
+// DedicatedHostSizeListResult - The List Dedicated Host sizes operation response.
+type DedicatedHostSizeListResult struct {
+ // The list of dedicated host sizes.
+ Value []*string
+}
+
+// DedicatedHostUpdate - Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may
+// be updated.
+type DedicatedHostUpdate struct {
+ // Properties of the dedicated host.
+ Properties *DedicatedHostProperties
+
+ // List all available dedicated host sizes for resizing [https://docs.microsoft.com/rest/api/compute/dedicated-hosts/listavailablesizes].
+ // Resizing can be only used to scale up DedicatedHost. Only name is
+ // required to be set.
+ SKU *SKU
+
+ // Resource tags
+ Tags map[string]*string
+}
+
+// DiagnosticsProfile - Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.
+type DiagnosticsProfile struct {
+ // Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. NOTE:
+ // If storageUri is being specified then ensure that the storage account is in
+ // the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you
+ // to see a screenshot of the VM from the hypervisor.
+ BootDiagnostics *BootDiagnostics
+}
+
+// DiffDiskSettings - Describes the parameters of ephemeral disk settings that can be specified for operating system disk.
+// Note: The ephemeral disk settings can only be specified for managed disk.
+type DiffDiskSettings struct {
+ // Specifies the ephemeral disk settings for operating system disk.
+ Option *DiffDiskOptions
+
+ // Specifies the ephemeral disk placement for operating system disk. Possible values are: CacheDisk, ResourceDisk, NvmeDisk.
+ // The defaulting behavior is: CacheDisk if one is configured for the VM size
+ // otherwise ResourceDisk or NvmeDisk is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes
+ // and Linux VM at
+ // https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Minimum api-version
+ // for NvmeDisk: 2024-03-01.
+ Placement *DiffDiskPlacement
+}
+
+// Disallowed - Describes the disallowed disk types.
+type Disallowed struct {
+ // A list of disk types.
+ DiskTypes []*string
+}
+
+// DisallowedConfiguration - Specifies the disallowed configuration for a virtual machine image.
+type DisallowedConfiguration struct {
+ // VM disk types which are disallowed.
+ VMDiskType *VMDiskTypes
+}
+
+// Disk resource.
+type Disk struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // The extended location where the disk will be created. Extended location cannot be changed.
+ ExtendedLocation *ExtendedLocation
+
+ // Disk resource properties.
+ Properties *DiskProperties
+
+ // The disks sku name. Can be StandardLRS, PremiumLRS, StandardSSDLRS, UltraSSDLRS, PremiumZRS, StandardSSDZRS, or PremiumV2_LRS.
+ SKU *DiskSKU
+
+ // Resource tags
+ Tags map[string]*string
+
+ // The Logical zone list for Disk.
+ Zones []*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
+ ManagedBy *string
+
+ // READ-ONLY; List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to
+ // a value greater than one for disks to allow attaching them to multiple VMs.
+ ManagedByExtended []*string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// DiskAccess - disk access resource.
+type DiskAccess struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // The extended location where the disk access will be created. Extended location cannot be changed.
+ ExtendedLocation *ExtendedLocation
+ Properties *DiskAccessProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// DiskAccessList - The List disk access operation response.
+type DiskAccessList struct {
+ // REQUIRED; A list of disk access resources.
+ Value []*DiskAccess
+
+ // The uri to fetch the next page of disk access resources. Call ListNext() with this to fetch the next page of disk access
+ // resources.
+ NextLink *string
+}
+
+type DiskAccessProperties struct {
+ // READ-ONLY; A readonly collection of private endpoint connections created on the disk. Currently only one endpoint connection
+ // is supported.
+ PrivateEndpointConnections []*PrivateEndpointConnection
+
+ // READ-ONLY; The disk access resource provisioning state.
+ ProvisioningState *string
+
+ // READ-ONLY; The time when the disk access was created.
+ TimeCreated *time.Time
+}
+
+// DiskAccessUpdate - Used for updating a disk access resource.
+type DiskAccessUpdate struct {
+ // Resource tags
+ Tags map[string]*string
+}
+
+// DiskEncryptionSet - disk encryption set resource.
+type DiskEncryptionSet struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used
+ // to encrypt disks.
+ Identity *EncryptionSetIdentity
+ Properties *EncryptionSetProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// DiskEncryptionSetList - The List disk encryption set operation response.
+type DiskEncryptionSetList struct {
+ // REQUIRED; A list of disk encryption sets.
+ Value []*DiskEncryptionSet
+
+ // The uri to fetch the next page of disk encryption sets. Call ListNext() with this to fetch the next page of disk encryption
+ // sets.
+ NextLink *string
+}
+
+// DiskEncryptionSetParameters - Describes the parameter of customer managed disk encryption set resource id that can be specified
+// for disk. Note: The disk encryption set resource id can only be specified for managed disk. Please
+// refer https://aka.ms/mdssewithcmkoverview for more details.
+type DiskEncryptionSetParameters struct {
+ // Resource Id
+ ID *string
+}
+
+// DiskEncryptionSetUpdate - disk encryption set update resource.
+type DiskEncryptionSetUpdate struct {
+ // The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used
+ // to encrypt disks.
+ Identity *EncryptionSetIdentity
+
+ // disk encryption set resource update properties.
+ Properties *DiskEncryptionSetUpdateProperties
+
+ // Resource tags
+ Tags map[string]*string
+}
+
+// DiskEncryptionSetUpdateProperties - disk encryption set resource update properties.
+type DiskEncryptionSetUpdateProperties struct {
+ // Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots
+ ActiveKey *KeyForDiskEncryptionSet
+
+ // The type of key used to encrypt the data of the disk.
+ EncryptionType *DiskEncryptionSetType
+
+ // Multi-tenant application client id to access key vault in a different tenant. Setting the value to 'None' will clear the
+ // property.
+ FederatedClientID *string
+
+ // Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.
+ RotationToLatestKeyVersionEnabled *bool
+}
+
+// DiskEncryptionSettings - Describes a Encryption Settings for a Disk
+type DiskEncryptionSettings struct {
+ // Specifies the location of the disk encryption key, which is a Key Vault Secret.
+ DiskEncryptionKey *KeyVaultSecretReference
+
+ // Specifies whether disk encryption should be enabled on the virtual machine.
+ Enabled *bool
+
+ // Specifies the location of the key encryption key in Key Vault.
+ KeyEncryptionKey *KeyVaultKeyReference
+}
+
+// DiskImageEncryption - This is the disk image encryption base class.
+type DiskImageEncryption struct {
+ // A relative URI containing the resource ID of the disk encryption set.
+ DiskEncryptionSetID *string
+}
+
+// DiskInstanceView - The instance view of the disk.
+type DiskInstanceView struct {
+ // Specifies the encryption settings for the OS Disk.
+ // Minimum api-version: 2015-06-15
+ EncryptionSettings []*DiskEncryptionSettings
+
+ // The disk name.
+ Name *string
+
+ // The resource status information.
+ Statuses []*InstanceViewStatus
+}
+
+// DiskList - The List Disks operation response.
+type DiskList struct {
+ // REQUIRED; A list of disks.
+ Value []*Disk
+
+ // The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks.
+ NextLink *string
+}
+
+// DiskProperties - Disk resource properties.
+type DiskProperties struct {
+ // REQUIRED; Disk source information. CreationData information cannot be changed after the disk has been created.
+ CreationData *CreationData
+
+ // Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default.
+ // Does not apply to Ultra disks.
+ BurstingEnabled *bool
+
+ // Percentage complete for the background copy when a resource is created via the CopyStart operation.
+ CompletionPercent *float32
+
+ // Additional authentication requirements when exporting or uploading to a disk or snapshot.
+ DataAccessAuthMode *DataAccessAuthMode
+
+ // ARM id of the DiskAccess resource for using private endpoints on disks.
+ DiskAccessID *string
+
+ // The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer
+ // between 4k and 256k bytes.
+ DiskIOPSReadOnly *int64
+
+ // The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k
+ // bytes.
+ DiskIOPSReadWrite *int64
+
+ // The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions
+ // of bytes per second - MB here uses the ISO notation, of powers of 10.
+ DiskMBpsReadOnly *int64
+
+ // The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here
+ // uses the ISO notation, of powers of 10.
+ DiskMBpsReadWrite *int64
+
+ // If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this
+ // field is present for updates or creation with other options, it indicates a
+ // resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
+ DiskSizeGB *int32
+
+ // Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption
+
+ // Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
+ EncryptionSettingsCollection *EncryptionSettingsCollection
+
+ // The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
+ HyperVGeneration *HyperVGeneration
+
+ // The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can
+ // be mounted on multiple VMs at the same time.
+ MaxShares *int32
+
+ // Policy for accessing the disk via network.
+ NetworkAccessPolicy *NetworkAccessPolicy
+
+ // The Operating System type.
+ OSType *OperatingSystemTypes
+
+ // Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times
+ // a day) by detached from one virtual machine and attached to another. This
+ // property should not be set for disks that are not detached and attached frequently as it causes the disks to not align
+ // with the fault domain of the virtual machine.
+ OptimizedForFrequentAttach *bool
+
+ // Policy for controlling export on the disk.
+ PublicNetworkAccess *PublicNetworkAccess
+
+ // Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher:
+ // MicrosoftWindowsServer, product: WindowsServer}
+ PurchasePlan *DiskPurchasePlan
+
+ // Contains the security related information for the resource.
+ SecurityProfile *DiskSecurityProfile
+
+ // List of supported capabilities for the image from which the OS disk was created.
+ SupportedCapabilities *SupportedCapabilities
+
+ // Indicates the OS on a disk supports hibernation.
+ SupportsHibernation *bool
+
+ // Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/.
+ // Does not apply to Ultra disks.
+ Tier *string
+
+ // READ-ONLY; Latest time when bursting was last enabled on a disk.
+ BurstingEnabledTime *time.Time
+
+ // READ-ONLY; The size of the disk in bytes. This field is read only.
+ DiskSizeBytes *int64
+
+ // READ-ONLY; The state of the disk.
+ DiskState *DiskState
+
+ // READ-ONLY; The UTC time when the ownership state of the disk was last changed i.e., the time the disk was last attached
+ // or detached from a VM or the time when the VM to which the disk was attached was
+ // deallocated or started.
+ LastOwnershipUpdateTime *time.Time
+
+ // READ-ONLY; Properties of the disk for which update is pending.
+ PropertyUpdatesInProgress *PropertyUpdatesInProgress
+
+ // READ-ONLY; The disk provisioning state.
+ ProvisioningState *string
+
+ // READ-ONLY; Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than
+ // one for disks to allow attaching them to multiple VMs.
+ ShareInfo []*ShareInfoElement
+
+ // READ-ONLY; The time when the disk was created.
+ TimeCreated *time.Time
+
+ // READ-ONLY; Unique Guid identifying the resource.
+ UniqueID *string
+}
+
+// DiskPurchasePlan - Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
+type DiskPurchasePlan struct {
+ // REQUIRED; The plan ID.
+ Name *string
+
+ // REQUIRED; Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference
+ // element.
+ Product *string
+
+ // REQUIRED; The publisher ID.
+ Publisher *string
+
+ // The Offer Promotion Code.
+ PromotionCode *string
+}
+
+// DiskRestorePoint - Properties of disk restore point
+type DiskRestorePoint struct {
+ // Properties of an incremental disk restore point
+ Properties *DiskRestorePointProperties
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// DiskRestorePointAttributes - Disk Restore Point details.
+type DiskRestorePointAttributes struct {
+ // Encryption at rest settings for disk restore point. It is an optional property that can be specified in the input while
+ // creating a restore point.
+ Encryption *RestorePointEncryption
+
+ // Resource Id of the source disk restore point.
+ SourceDiskRestorePoint *APIEntityReference
+
+ // READ-ONLY; Resource Id
+ ID *string
+}
+
+// DiskRestorePointInstanceView - The instance view of a disk restore point.
+type DiskRestorePointInstanceView struct {
+ // Disk restore point Id.
+ ID *string
+
+ // The disk restore point replication status information.
+ ReplicationStatus *DiskRestorePointReplicationStatus
+}
+
+// DiskRestorePointList - The List Disk Restore Points operation response.
+type DiskRestorePointList struct {
+ // REQUIRED; A list of disk restore points.
+ Value []*DiskRestorePoint
+
+ // The uri to fetch the next page of disk restore points. Call ListNext() with this to fetch the next page of disk restore
+ // points.
+ NextLink *string
+}
+
+// DiskRestorePointProperties - Properties of an incremental disk restore point
+type DiskRestorePointProperties struct {
+ // Percentage complete for the background copy of disk restore point when source resource is from a different region.
+ CompletionPercent *float32
+
+ // ARM id of the DiskAccess resource for using private endpoints on disks.
+ DiskAccessID *string
+
+ // The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
+ HyperVGeneration *HyperVGeneration
+
+ // Policy for accessing the disk via network.
+ NetworkAccessPolicy *NetworkAccessPolicy
+
+ // Policy for controlling export on the disk.
+ PublicNetworkAccess *PublicNetworkAccess
+
+ // Purchase plan information for the the image from which the OS disk was created.
+ PurchasePlan *DiskPurchasePlan
+
+ // Contains the security related information for the resource.
+ SecurityProfile *DiskSecurityProfile
+
+ // List of supported capabilities for the image from which the OS disk was created.
+ SupportedCapabilities *SupportedCapabilities
+
+ // Indicates the OS on a disk supports hibernation.
+ SupportsHibernation *bool
+
+ // READ-ONLY; Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption
+
+ // READ-ONLY; id of the backing snapshot's MIS family
+ FamilyID *string
+
+ // READ-ONLY; The Operating System type.
+ OSType *OperatingSystemTypes
+
+ // READ-ONLY; Replication state of disk restore point when source resource is from a different region.
+ ReplicationState *string
+
+ // READ-ONLY; arm id of source disk or source disk restore point.
+ SourceResourceID *string
+
+ // READ-ONLY; Location of source disk or source disk restore point when source resource is from a different region.
+ SourceResourceLocation *string
+
+ // READ-ONLY; unique incarnation id of the source disk
+ SourceUniqueID *string
+
+ // READ-ONLY; The timestamp of restorePoint creation
+ TimeCreated *time.Time
+}
+
+// DiskRestorePointReplicationStatus - The instance view of a disk restore point.
+type DiskRestorePointReplicationStatus struct {
+ // Replication completion percentage.
+ CompletionPercent *int32
+
+ // The resource status information.
+ Status *InstanceViewStatus
+}
+
+// DiskSKU - The disks sku name. Can be StandardLRS, PremiumLRS, StandardSSDLRS, UltraSSDLRS, PremiumZRS, StandardSSDZRS,
+// or PremiumV2_LRS.
+type DiskSKU struct {
+ // The sku name.
+ Name *DiskStorageAccountTypes
+
+ // READ-ONLY; The sku tier.
+ Tier *string
+}
+
+// DiskSecurityProfile - Contains the security related information for the resource.
+type DiskSecurityProfile struct {
+ // ResourceId of the disk encryption set associated to Confidential VM supported disk encrypted with customer managed key
+ SecureVMDiskEncryptionSetID *string
+
+ // Specifies the SecurityType of the VM. Applicable for OS disks only.
+ SecurityType *DiskSecurityTypes
+}
+
+// DiskUpdate - Disk update resource.
+type DiskUpdate struct {
+ // Disk resource update properties.
+ Properties *DiskUpdateProperties
+
+ // The disks sku name. Can be StandardLRS, PremiumLRS, StandardSSDLRS, UltraSSDLRS, PremiumZRS, StandardSSDZRS, or PremiumV2_LRS.
+ SKU *DiskSKU
+
+ // Resource tags
+ Tags map[string]*string
+}
+
+// DiskUpdateProperties - Disk resource update properties.
+type DiskUpdateProperties struct {
+ // Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default.
+ // Does not apply to Ultra disks.
+ BurstingEnabled *bool
+
+ // Additional authentication requirements when exporting or uploading to a disk or snapshot.
+ DataAccessAuthMode *DataAccessAuthMode
+
+ // ARM id of the DiskAccess resource for using private endpoints on disks.
+ DiskAccessID *string
+
+ // The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer
+ // between 4k and 256k bytes.
+ DiskIOPSReadOnly *int64
+
+ // The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k
+ // bytes.
+ DiskIOPSReadWrite *int64
+
+ // The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions
+ // of bytes per second - MB here uses the ISO notation, of powers of 10.
+ DiskMBpsReadOnly *int64
+
+ // The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here
+ // uses the ISO notation, of powers of 10.
+ DiskMBpsReadWrite *int64
+
+ // If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this
+ // field is present for updates or creation with other options, it indicates a
+ // resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
+ DiskSizeGB *int32
+
+ // Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption
+
+ // Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
+ EncryptionSettingsCollection *EncryptionSettingsCollection
+
+ // The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can
+ // be mounted on multiple VMs at the same time.
+ MaxShares *int32
+
+ // Policy for accessing the disk via network.
+ NetworkAccessPolicy *NetworkAccessPolicy
+
+ // the Operating System type.
+ OSType *OperatingSystemTypes
+
+ // Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times
+ // a day) by detached from one virtual machine and attached to another. This
+ // property should not be set for disks that are not detached and attached frequently as it causes the disks to not align
+ // with the fault domain of the virtual machine.
+ OptimizedForFrequentAttach *bool
+
+ // Policy for controlling export on the disk.
+ PublicNetworkAccess *PublicNetworkAccess
+
+ // Purchase plan information to be added on the OS disk
+ PurchasePlan *DiskPurchasePlan
+
+ // List of supported capabilities to be added on the OS disk.
+ SupportedCapabilities *SupportedCapabilities
+
+ // Indicates the OS on a disk supports hibernation.
+ SupportsHibernation *bool
+
+ // Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/.
+ // Does not apply to Ultra disks.
+ Tier *string
+
+ // READ-ONLY; Properties of the disk for which update is pending.
+ PropertyUpdatesInProgress *PropertyUpdatesInProgress
+}
+
+// Encryption at rest settings for disk or snapshot
+type Encryption struct {
+ // ResourceId of the disk encryption set to use for enabling encryption at rest.
+ DiskEncryptionSetID *string
+
+ // The type of key used to encrypt the data of the disk.
+ Type *EncryptionType
+}
+
+// EncryptionIdentity - Specifies the Managed Identity used by ADE to get access token for keyvault operations.
+type EncryptionIdentity struct {
+ // Specifies ARM Resource ID of one of the user identities associated with the VM.
+ UserAssignedIdentityResourceID *string
+}
+
+// EncryptionImages - Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the
+// gallery artifact.
+type EncryptionImages struct {
+ // A list of encryption specifications for data disk images.
+ DataDiskImages []*DataDiskImageEncryption
+
+ // Contains encryption settings for an OS disk image.
+ OSDiskImage *OSDiskImageEncryption
+}
+
+// EncryptionSetIdentity - The managed identity for the disk encryption set. It should be given permission on the key vault
+// before it can be used to encrypt disks.
+type EncryptionSetIdentity struct {
+ // The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption
+ // Sets can be updated with Identity type None during migration of
+ // subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys.
+ Type *DiskEncryptionSetIdentityType
+
+ // The list of user identities associated with the disk encryption set. The user identity dictionary key references will be
+ // ARM resource ids in the form:
+ // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ UserAssignedIdentities map[string]*UserAssignedIdentitiesValue
+
+ // READ-ONLY; The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id
+ // header in the PUT request if the resource has a systemAssigned(implicit)
+ // identity
+ PrincipalID *string
+
+ // READ-ONLY; The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id
+ // header in the PUT request if the resource has a systemAssigned(implicit) identity
+ TenantID *string
+}
+
+type EncryptionSetProperties struct {
+ // The key vault key which is currently used by this disk encryption set.
+ ActiveKey *KeyForDiskEncryptionSet
+
+ // The type of key used to encrypt the data of the disk.
+ EncryptionType *DiskEncryptionSetType
+
+ // Multi-tenant application client id to access key vault in a different tenant. Setting the value to 'None' will clear the
+ // property.
+ FederatedClientID *string
+
+ // Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.
+ RotationToLatestKeyVersionEnabled *bool
+
+ // READ-ONLY; The error that was encountered during auto-key rotation. If an error is present, then auto-key rotation will
+ // not be attempted until the error on this disk encryption set is fixed.
+ AutoKeyRotationError *APIError
+
+ // READ-ONLY; The time when the active key of this disk encryption set was updated.
+ LastKeyRotationTimestamp *time.Time
+
+ // READ-ONLY; A readonly collection of key vault keys previously used by this disk encryption set while a key rotation is
+ // in progress. It will be empty if there is no ongoing key rotation.
+ PreviousKeys []*KeyForDiskEncryptionSet
+
+ // READ-ONLY; The disk encryption set provisioning state.
+ ProvisioningState *string
+}
+
+// EncryptionSettingsCollection - Encryption settings for disk or snapshot
+type EncryptionSettingsCollection struct {
+ // REQUIRED; Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this
+ // flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption.
+ // If EncryptionSettings is null in the request object, the existing settings remain unchanged.
+ Enabled *bool
+
+ // A collection of encryption settings, one for each disk volume.
+ EncryptionSettings []*EncryptionSettingsElement
+
+ // Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds
+ // to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk
+ // Encryption.
+ EncryptionSettingsVersion *string
+}
+
+// EncryptionSettingsElement - Encryption settings for one disk volume.
+type EncryptionSettingsElement struct {
+ // Key Vault Secret Url and vault id of the disk encryption key
+ DiskEncryptionKey *KeyVaultAndSecretReference
+
+ // Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap
+ // the disk encryption key.
+ KeyEncryptionKey *KeyVaultAndKeyReference
+}
+
+// EventGridAndResourceGraph - Specifies eventGridAndResourceGraph related Scheduled Event related configurations.
+type EventGridAndResourceGraph struct {
+ // Specifies if event grid and resource graph is enabled for Scheduled event related configurations.
+ Enable *bool
+}
+
+// ExtendedLocation - The complex type of the extended location.
+type ExtendedLocation struct {
+ // The name of the extended location.
+ Name *string
+
+ // The type of the extended location.
+ Type *ExtendedLocationTypes
+}
+
+// Extension - Describes a cloud service Extension.
+type Extension struct {
+ // The name of the extension.
+ Name *string
+
+ // Extension Properties.
+ Properties *CloudServiceExtensionProperties
+}
+
+// Gallery - Specifies information about the Shared Image Gallery that you want to create or update.
+type Gallery struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // Describes the properties of a Shared Image Gallery.
+ Properties *GalleryProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// GalleryApplication - Specifies information about the gallery Application Definition that you want to create or update.
+type GalleryApplication struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // Describes the properties of a gallery Application Definition.
+ Properties *GalleryApplicationProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// GalleryApplicationCustomAction - A custom action that can be performed with a Gallery Application Version.
+type GalleryApplicationCustomAction struct {
+ // REQUIRED; The name of the custom action. Must be unique within the Gallery Application Version.
+ Name *string
+
+ // REQUIRED; The script to run when executing this custom action.
+ Script *string
+
+ // Description to help the users understand what this custom action does.
+ Description *string
+
+ // The parameters that this custom action uses
+ Parameters []*GalleryApplicationCustomActionParameter
+}
+
+// GalleryApplicationCustomActionParameter - The definition of a parameter that can be passed to a custom action of a Gallery
+// Application Version.
+type GalleryApplicationCustomActionParameter struct {
+ // REQUIRED; The name of the custom action. Must be unique within the Gallery Application Version.
+ Name *string
+
+ // The default value of the parameter. Only applies to string types
+ DefaultValue *string
+
+ // A description to help users understand what this parameter means
+ Description *string
+
+ // Indicates whether this parameter must be passed when running the custom action.
+ Required *bool
+
+ // Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob
+ Type *GalleryApplicationCustomActionParameterType
+}
+
+// GalleryApplicationList - The List Gallery Applications operation response.
+type GalleryApplicationList struct {
+ // REQUIRED; A list of Gallery Applications.
+ Value []*GalleryApplication
+
+ // The uri to fetch the next page of Application Definitions in the Application Gallery. Call ListNext() with this to fetch
+ // the next page of gallery Application Definitions.
+ NextLink *string
+}
+
+// GalleryApplicationProperties - Describes the properties of a gallery Application Definition.
+type GalleryApplicationProperties struct {
+ // REQUIRED; This property allows you to specify the supported type of the OS that application is built for. Possible values
+ // are: Windows, Linux.
+ SupportedOSType *OperatingSystemTypes
+
+ // A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application.
+ CustomActions []*GalleryApplicationCustomAction
+
+ // The description of this gallery Application Definition resource. This property is updatable.
+ Description *string
+
+ // The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This
+ // property is updatable.
+ EndOfLifeDate *time.Time
+
+ // The Eula agreement for the gallery Application Definition.
+ Eula *string
+
+ // The privacy statement uri.
+ PrivacyStatementURI *string
+
+ // The release note uri.
+ ReleaseNoteURI *string
+}
+
+// GalleryApplicationUpdate - Specifies information about the gallery Application Definition that you want to update.
+type GalleryApplicationUpdate struct {
+ // Describes the properties of a gallery Application Definition.
+ Properties *GalleryApplicationProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// GalleryApplicationVersion - Specifies information about the gallery Application Version that you want to create or update.
+type GalleryApplicationVersion struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // Describes the properties of a gallery image version.
+ Properties *GalleryApplicationVersionProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// GalleryApplicationVersionList - The List Gallery Application version operation response.
+type GalleryApplicationVersionList struct {
+ // REQUIRED; A list of gallery Application Versions.
+ Value []*GalleryApplicationVersion
+
+ // The uri to fetch the next page of gallery Application Versions. Call ListNext() with this to fetch the next page of gallery
+ // Application Versions.
+ NextLink *string
+}
+
+// GalleryApplicationVersionProperties - Describes the properties of a gallery image version.
+type GalleryApplicationVersionProperties struct {
+ // REQUIRED; The publishing profile of a gallery image version.
+ PublishingProfile *GalleryApplicationVersionPublishingProfile
+
+ // The safety profile of the Gallery Application Version.
+ SafetyProfile *GalleryApplicationVersionSafetyProfile
+
+ // READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *GalleryProvisioningState
+
+ // READ-ONLY; This is the replication status of the gallery image version.
+ ReplicationStatus *ReplicationStatus
+}
+
+// GalleryApplicationVersionPublishingProfile - The publishing profile of a gallery image version.
+type GalleryApplicationVersionPublishingProfile struct {
+ // REQUIRED; The source image from which the Image Version is going to be created.
+ Source *UserArtifactSource
+
+ // Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.
+ AdvancedSettings map[string]*string
+
+ // A list of custom actions that can be performed with this Gallery Application Version.
+ CustomActions []*GalleryApplicationCustomAction
+
+ // Optional. Whether or not this application reports health.
+ EnableHealthCheck *bool
+
+ // The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property
+ // is updatable.
+ EndOfLifeDate *time.Time
+
+ // If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
+ ExcludeFromLatest *bool
+ ManageActions *UserArtifactManage
+
+ // The number of replicas of the Image Version to be created per region. This property would take effect for a region when
+ // regionalReplicaCount is not specified. This property is updatable.
+ ReplicaCount *int32
+
+ // Optional parameter which specifies the mode to be used for replication. This property is not updatable.
+ ReplicationMode *ReplicationMode
+
+ // Additional settings for the VM app that contains the target package and config file name when it is deployed to target
+ // VM or VM scale set.
+ Settings *UserArtifactSettings
+
+ // Specifies the storage account type to be used to store the image. This property is not updatable.
+ StorageAccountType *StorageAccountType
+
+ // The target extended locations where the Image Version is going to be replicated to. This property is updatable.
+ TargetExtendedLocations []*GalleryTargetExtendedLocation
+
+ // The target regions where the Image Version is going to be replicated to. This property is updatable.
+ TargetRegions []*TargetRegion
+
+ // READ-ONLY; The timestamp for when the gallery image version is published.
+ PublishedDate *time.Time
+}
+
+// GalleryApplicationVersionSafetyProfile - The safety profile of the Gallery Application Version.
+type GalleryApplicationVersionSafetyProfile struct {
+ // Indicates whether or not removing this Gallery Image Version from replicated regions is allowed.
+ AllowDeletionOfReplicatedLocations *bool
+}
+
+// GalleryApplicationVersionUpdate - Specifies information about the gallery Application Version that you want to update.
+type GalleryApplicationVersionUpdate struct {
+ // Describes the properties of a gallery image version.
+ Properties *GalleryApplicationVersionProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// GalleryArtifactPublishingProfileBase - Describes the basic gallery artifact publishing profile.
+type GalleryArtifactPublishingProfileBase struct {
+ // The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property
+ // is updatable.
+ EndOfLifeDate *time.Time
+
+ // If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
+ ExcludeFromLatest *bool
+
+ // The number of replicas of the Image Version to be created per region. This property would take effect for a region when
+ // regionalReplicaCount is not specified. This property is updatable.
+ ReplicaCount *int32
+
+ // Optional parameter which specifies the mode to be used for replication. This property is not updatable.
+ ReplicationMode *ReplicationMode
+
+ // Specifies the storage account type to be used to store the image. This property is not updatable.
+ StorageAccountType *StorageAccountType
+
+ // The target extended locations where the Image Version is going to be replicated to. This property is updatable.
+ TargetExtendedLocations []*GalleryTargetExtendedLocation
+
+ // The target regions where the Image Version is going to be replicated to. This property is updatable.
+ TargetRegions []*TargetRegion
+
+ // READ-ONLY; The timestamp for when the gallery image version is published.
+ PublishedDate *time.Time
+}
+
+// GalleryArtifactSafetyProfileBase - This is the safety profile of the Gallery Artifact Version.
+type GalleryArtifactSafetyProfileBase struct {
+ // Indicates whether or not removing this Gallery Image Version from replicated regions is allowed.
+ AllowDeletionOfReplicatedLocations *bool
+}
+
+// GalleryArtifactSource - The source image from which the Image Version is going to be created.
+type GalleryArtifactSource struct {
+ // REQUIRED; The managed artifact.
+ ManagedImage *ManagedArtifact
+}
+
+// GalleryArtifactVersionFullSource - The source of the gallery artifact version.
+type GalleryArtifactVersionFullSource struct {
+ // The resource Id of the source Community Gallery Image. Only required when using Community Gallery Image as a source.
+ CommunityGalleryImageID *string
+
+ // The id of the gallery artifact version source.
+ ID *string
+
+ // The resource Id of the source virtual machine. Only required when capturing a virtual machine to source this Gallery Image
+ // Version.
+ VirtualMachineID *string
+}
+
+// GalleryArtifactVersionSource - The gallery artifact version source.
+type GalleryArtifactVersionSource struct {
+ // The id of the gallery artifact version source.
+ ID *string
+}
+
+// GalleryDataDiskImage - This is the data disk image.
+type GalleryDataDiskImage struct {
+ // REQUIRED; This property specifies the logical unit number of the data disk. This value is used to identify data disks within
+ // the Virtual Machine and therefore must be unique for each data disk attached to the
+ // Virtual Machine.
+ Lun *int32
+
+ // The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
+ HostCaching *HostCaching
+
+ // The source for the disk image.
+ Source *GalleryDiskImageSource
+
+ // READ-ONLY; This property indicates the size of the VHD to be created.
+ SizeInGB *int32
+}
+
+// GalleryDiskImage - This is the disk image base class.
+type GalleryDiskImage struct {
+ // The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
+ HostCaching *HostCaching
+
+ // The source for the disk image.
+ Source *GalleryDiskImageSource
+
+ // READ-ONLY; This property indicates the size of the VHD to be created.
+ SizeInGB *int32
+}
+
+// GalleryDiskImageSource - The source for the disk image.
+type GalleryDiskImageSource struct {
+ // The id of the gallery artifact version source.
+ ID *string
+
+ // The Storage Account Id that contains the vhd blob being used as a source for this artifact version.
+ StorageAccountID *string
+
+ // The uri of the gallery artifact version source. Currently used to specify vhd/blob source.
+ URI *string
+}
+
+// GalleryExtendedLocation - The name of the extended location.
+type GalleryExtendedLocation struct {
+ Name *string
+
+ // It is type of the extended location.
+ Type *GalleryExtendedLocationType
+}
+
+// GalleryIdentifier - Describes the gallery unique name.
+type GalleryIdentifier struct {
+ // READ-ONLY; The unique name of the Shared Image Gallery. This name is generated automatically by Azure.
+ UniqueName *string
+}
+
+// GalleryImage - Specifies information about the gallery image definition that you want to create or update.
+type GalleryImage struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // Describes the properties of a gallery image definition.
+ Properties *GalleryImageProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// GalleryImageFeature - A feature for gallery image.
+type GalleryImageFeature struct {
+ // The name of the gallery image feature.
+ Name *string
+
+ // The value of the gallery image feature.
+ Value *string
+}
+
+// GalleryImageIdentifier - This is the gallery image definition identifier.
+type GalleryImageIdentifier struct {
+ // REQUIRED; The name of the gallery image definition offer.
+ Offer *string
+
+ // REQUIRED; The name of the gallery image definition publisher.
+ Publisher *string
+
+ // REQUIRED; The name of the gallery image definition SKU.
+ SKU *string
+}
+
+// GalleryImageList - The List Gallery Images operation response.
+type GalleryImageList struct {
+ // REQUIRED; A list of Shared Image Gallery images.
+ Value []*GalleryImage
+
+ // The uri to fetch the next page of Image Definitions in the Shared Image Gallery. Call ListNext() with this to fetch the
+ // next page of gallery image definitions.
+ NextLink *string
+}
+
+// GalleryImageProperties - Describes the properties of a gallery image definition.
+type GalleryImageProperties struct {
+ // REQUIRED; This is the gallery image definition identifier.
+ Identifier *GalleryImageIdentifier
+
+ // REQUIRED; This property allows the user to specify whether the virtual machines created under this image are 'Generalized'
+ // or 'Specialized'.
+ OSState *OperatingSystemStateTypes
+
+ // REQUIRED; This property allows you to specify the type of the OS that is included in the disk when creating a VM from a
+ // managed image. Possible values are: Windows, Linux.
+ OSType *OperatingSystemTypes
+
+ // The architecture of the image. Applicable to OS disks only.
+ Architecture *Architecture
+
+ // The description of this gallery image definition resource. This property is updatable.
+ Description *string
+
+ // Describes the disallowed disk types.
+ Disallowed *Disallowed
+
+ // The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property
+ // is updatable.
+ EndOfLifeDate *time.Time
+
+ // The Eula agreement for the gallery image definition.
+ Eula *string
+
+ // A list of gallery image features.
+ Features []*GalleryImageFeature
+
+ // The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
+ HyperVGeneration *HyperVGeneration
+
+ // The privacy statement uri.
+ PrivacyStatementURI *string
+
+ // Describes the gallery image definition purchase plan. This is used by marketplace images.
+ PurchasePlan *ImagePurchasePlan
+
+ // The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.
+ Recommended *RecommendedMachineConfiguration
+
+ // The release note uri.
+ ReleaseNoteURI *string
+
+ // READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *GalleryProvisioningState
+}
+
+// GalleryImageUpdate - Specifies information about the gallery image definition that you want to update.
+type GalleryImageUpdate struct {
+ // Describes the properties of a gallery image definition.
+ Properties *GalleryImageProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// GalleryImageVersion - Specifies information about the gallery image version that you want to create or update.
+type GalleryImageVersion struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // Describes the properties of a gallery image version.
+ Properties *GalleryImageVersionProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// GalleryImageVersionList - The List Gallery Image version operation response.
+type GalleryImageVersionList struct {
+ // REQUIRED; A list of gallery image versions.
+ Value []*GalleryImageVersion
+
+ // The uri to fetch the next page of gallery image versions. Call ListNext() with this to fetch the next page of gallery image
+ // versions.
+ NextLink *string
+}
+
+// GalleryImageVersionProperties - Describes the properties of a gallery image version.
+type GalleryImageVersionProperties struct {
+ // REQUIRED; This is the storage profile of a Gallery Image Version.
+ StorageProfile *GalleryImageVersionStorageProfile
+
+ // The publishing profile of a gallery image Version.
+ PublishingProfile *GalleryImageVersionPublishingProfile
+
+ // This is the safety profile of the Gallery Image Version.
+ SafetyProfile *GalleryImageVersionSafetyProfile
+
+ // The security profile of a gallery image version
+ SecurityProfile *ImageVersionSecurityProfile
+
+ // READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *GalleryProvisioningState
+
+ // READ-ONLY; This is the replication status of the gallery image version.
+ ReplicationStatus *ReplicationStatus
+}
+
+// GalleryImageVersionPublishingProfile - The publishing profile of a gallery image Version.
+type GalleryImageVersionPublishingProfile struct {
+ // The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property
+ // is updatable.
+ EndOfLifeDate *time.Time
+
+ // If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
+ ExcludeFromLatest *bool
+
+ // The number of replicas of the Image Version to be created per region. This property would take effect for a region when
+ // regionalReplicaCount is not specified. This property is updatable.
+ ReplicaCount *int32
+
+ // Optional parameter which specifies the mode to be used for replication. This property is not updatable.
+ ReplicationMode *ReplicationMode
+
+ // Specifies the storage account type to be used to store the image. This property is not updatable.
+ StorageAccountType *StorageAccountType
+
+ // The target extended locations where the Image Version is going to be replicated to. This property is updatable.
+ TargetExtendedLocations []*GalleryTargetExtendedLocation
+
+ // The target regions where the Image Version is going to be replicated to. This property is updatable.
+ TargetRegions []*TargetRegion
+
+ // READ-ONLY; The timestamp for when the gallery image version is published.
+ PublishedDate *time.Time
+}
+
+// GalleryImageVersionSafetyProfile - This is the safety profile of the Gallery Image Version.
+type GalleryImageVersionSafetyProfile struct {
+ // Indicates whether or not removing this Gallery Image Version from replicated regions is allowed.
+ AllowDeletionOfReplicatedLocations *bool
+
+ // READ-ONLY; A list of Policy Violations that have been reported for this Gallery Image Version.
+ PolicyViolations []*PolicyViolation
+
+ // READ-ONLY; Indicates whether this image has been reported as violating Microsoft's policies.
+ ReportedForPolicyViolation *bool
+}
+
+// GalleryImageVersionStorageProfile - This is the storage profile of a Gallery Image Version.
+type GalleryImageVersionStorageProfile struct {
+ // A list of data disk images.
+ DataDiskImages []*GalleryDataDiskImage
+
+ // This is the OS disk image.
+ OSDiskImage *GalleryOSDiskImage
+
+ // The source of the gallery artifact version.
+ Source *GalleryArtifactVersionFullSource
+}
+
+// GalleryImageVersionUefiSettings - Contains UEFI settings for the image version.
+type GalleryImageVersionUefiSettings struct {
+ // Additional UEFI key signatures that will be added to the image in addition to the signature templates
+ AdditionalSignatures *UefiKeySignatures
+
+ // The name of the template(s) that contains default UEFI key signatures that will be added to the image.
+ SignatureTemplateNames []*UefiSignatureTemplateName
+}
+
+// GalleryImageVersionUpdate - Specifies information about the gallery image version that you want to update.
+type GalleryImageVersionUpdate struct {
+ // Describes the properties of a gallery image version.
+ Properties *GalleryImageVersionProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// GalleryList - The List Galleries operation response.
+type GalleryList struct {
+ // REQUIRED; A list of galleries.
+ Value []*Gallery
+
+ // The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries.
+ NextLink *string
+}
+
+// GalleryOSDiskImage - This is the OS disk image.
+type GalleryOSDiskImage struct {
+ // The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
+ HostCaching *HostCaching
+
+ // The source for the disk image.
+ Source *GalleryDiskImageSource
+
+ // READ-ONLY; This property indicates the size of the VHD to be created.
+ SizeInGB *int32
+}
+
+// GalleryProperties - Describes the properties of a Shared Image Gallery.
+type GalleryProperties struct {
+ // The description of this Shared Image Gallery resource. This property is updatable.
+ Description *string
+
+ // Describes the gallery unique name.
+ Identifier *GalleryIdentifier
+
+ // Profile for gallery sharing to subscription or tenant
+ SharingProfile *SharingProfile
+
+ // Contains information about the soft deletion policy of the gallery.
+ SoftDeletePolicy *SoftDeletePolicy
+
+ // READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *GalleryProvisioningState
+
+ // READ-ONLY; Sharing status of current gallery.
+ SharingStatus *SharingStatus
+}
+
+type GalleryTargetExtendedLocation struct {
+ // Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.
+ Encryption *EncryptionImages
+
+ // The name of the extended location.
+ ExtendedLocation *GalleryExtendedLocation
+
+ // The number of replicas of the Image Version to be created per extended location. This property is updatable.
+ ExtendedLocationReplicaCount *int32
+
+ // The name of the region.
+ Name *string
+
+ // Specifies the storage account type to be used to store the image. This property is not updatable.
+ StorageAccountType *EdgeZoneStorageAccountType
+}
+
+// GalleryUpdate - Specifies information about the Shared Image Gallery that you want to update.
+type GalleryUpdate struct {
+ // Describes the properties of a Shared Image Gallery.
+ Properties *GalleryProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// GrantAccessData - Data used for requesting a SAS.
+type GrantAccessData struct {
+ // REQUIRED
+ Access *AccessLevel
+
+ // REQUIRED; Time duration in seconds until the SAS access expires.
+ DurationInSeconds *int32
+
+ // Used to specify the file format when making request for SAS on a VHDX file format snapshot
+ FileFormat *FileFormat
+
+ // Set this flag to true to get additional SAS for VM guest state
+ GetSecureVMGuestStateSAS *bool
+}
+
+// HardwareProfile - Specifies the hardware settings for the virtual machine.
+type HardwareProfile struct {
+ // Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd
+ // 2023. The recommended way to get the list of available sizes is using these
+ // APIs: List all available virtual machine sizes in an availability set [https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes],
+ // List all available virtual machine sizes in a
+ // region [https://docs.microsoft.com/rest/api/compute/resourceskus/list], List all available virtual machine sizes for resizing
+ // [https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes]. For more information about virtual machine
+ // sizes, see Sizes for virtual machines
+ // [https://docs.microsoft.com/azure/virtual-machines/sizes]. The available VM sizes depend on region and availability set.
+ VMSize *VirtualMachineSizeTypes
+
+ // Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01. This feature
+ // is still in preview mode and is not supported for VirtualMachineScaleSet. Please
+ // follow the instructions in VM Customization [https://aka.ms/vmcustomization] for more details.
+ VMSizeProperties *VMSizeProperties
+}
+
+// Image - The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual
+// machine. If SourceImage is provided, the destination virtual hard drive must not
+// exist.
+type Image struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // The extended location of the Image.
+ ExtendedLocation *ExtendedLocation
+
+ // Describes the properties of an Image.
+ Properties *ImageProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// ImageDataDisk - Describes a data disk.
+type ImageDataDisk struct {
+ // REQUIRED; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and
+ // therefore must be unique for each data disk attached to a VM.
+ Lun *int32
+
+ // The Virtual Hard Disk.
+ BlobURI *string
+
+ // Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard
+ // storage. ReadOnly for Premium storage.
+ Caching *CachingTypes
+
+ // Specifies the customer managed disk encryption set resource id for the managed image disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters
+
+ // Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual
+ // machine image. This value cannot be larger than 1023 GB.
+ DiskSizeGB *int32
+
+ // The managedDisk.
+ ManagedDisk *SubResource
+
+ // The snapshot.
+ Snapshot *SubResource
+
+ // Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot
+ // be used with OS Disk.
+ StorageAccountType *StorageAccountTypes
+}
+
+// ImageDeprecationStatus - Describes image deprecation status properties on the image.
+type ImageDeprecationStatus struct {
+ // Describes the alternative option specified by the Publisher for this image when this image is deprecated.
+ AlternativeOption *AlternativeOption
+
+ // Describes the state of the image.
+ ImageState *ImageState
+
+ // The time, in future, at which this image will be marked as deprecated. This scheduled time is chosen by the Publisher.
+ ScheduledDeprecationTime *time.Time
+}
+
+// ImageDisk - Describes a image disk.
+type ImageDisk struct {
+ // The Virtual Hard Disk.
+ BlobURI *string
+
+ // Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard
+ // storage. ReadOnly for Premium storage.
+ Caching *CachingTypes
+
+ // Specifies the customer managed disk encryption set resource id for the managed image disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters
+
+ // Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual
+ // machine image. This value cannot be larger than 1023 GB.
+ DiskSizeGB *int32
+
+ // The managedDisk.
+ ManagedDisk *SubResource
+
+ // The snapshot.
+ Snapshot *SubResource
+
+ // Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot
+ // be used with OS Disk.
+ StorageAccountType *StorageAccountTypes
+}
+
+// ImageDiskReference - The source image used for creating the disk.
+type ImageDiskReference struct {
+ // A relative uri containing a community Azure Compute Gallery image reference.
+ CommunityGalleryImageID *string
+
+ // A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference.
+ ID *string
+
+ // If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image
+ // to use. For OS disks, this field is null.
+ Lun *int32
+
+ // A relative uri containing a direct shared Azure Compute Gallery image reference.
+ SharedGalleryImageID *string
+}
+
+// ImageListResult - The List Image operation response.
+type ImageListResult struct {
+ // REQUIRED; The list of Images.
+ Value []*Image
+
+ // The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images.
+ NextLink *string
+}
+
+// ImageOSDisk - Describes an Operating System disk.
+type ImageOSDisk struct {
+ // REQUIRED; The OS State. For managed images, use Generalized.
+ OSState *OperatingSystemStateTypes
+
+ // REQUIRED; This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom
+ // image. Possible values are: Windows, Linux.
+ OSType *OperatingSystemTypes
+
+ // The Virtual Hard Disk.
+ BlobURI *string
+
+ // Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard
+ // storage. ReadOnly for Premium storage.
+ Caching *CachingTypes
+
+ // Specifies the customer managed disk encryption set resource id for the managed image disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters
+
+ // Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual
+ // machine image. This value cannot be larger than 1023 GB.
+ DiskSizeGB *int32
+
+ // The managedDisk.
+ ManagedDisk *SubResource
+
+ // The snapshot.
+ Snapshot *SubResource
+
+ // Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot
+ // be used with OS Disk.
+ StorageAccountType *StorageAccountTypes
+}
+
+// ImageProperties - Describes the properties of an Image.
+type ImageProperties struct {
+ // Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image
+ // source is a blob, then we need the user to specify the value, if the source is
+ // managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the
+ // source managed resource.
+ HyperVGeneration *HyperVGenerationTypes
+
+ // The source virtual machine from which Image is created.
+ SourceVirtualMachine *SubResource
+
+ // Specifies the storage settings for the virtual machine disks.
+ StorageProfile *ImageStorageProfile
+
+ // READ-ONLY; The provisioning state.
+ ProvisioningState *string
+}
+
+// ImagePurchasePlan - Describes the gallery image definition purchase plan. This is used by marketplace images.
+type ImagePurchasePlan struct {
+ // The plan ID.
+ Name *string
+
+ // The product ID.
+ Product *string
+
+ // The publisher ID.
+ Publisher *string
+}
+
+// ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace
+// images, or virtual machine images. This element is required when you want to use a platform
+// image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference
+// publisher and offer can only be set when you create the scale set.
+type ImageReference struct {
+ // Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET
+ // call.
+ CommunityGalleryImageID *string
+
+ // Resource Id
+ ID *string
+
+ // Specifies the offer of the platform image or marketplace image used to create the virtual machine.
+ Offer *string
+
+ // The image publisher.
+ Publisher *string
+
+ // The image SKU.
+ SKU *string
+
+ // Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.
+ SharedGalleryImageID *string
+
+ // Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats
+ // are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers.
+ // Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image
+ // will not automatically update after deploy time even if a new version becomes
+ // available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for
+ // deployment, to use 'latest' version of gallery image, just set
+ // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}'
+ // in the 'id' field without version input.
+ Version *string
+
+ // READ-ONLY; Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual
+ // machine. This readonly field differs from 'version', only if the value specified in
+ // 'version' field is 'latest'.
+ ExactVersion *string
+}
+
+// ImageStorageProfile - Describes a storage profile.
+type ImageStorageProfile struct {
+ // Specifies the parameters that are used to add a data disk to a virtual machine.
+ // For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview].
+ DataDisks []*ImageDataDisk
+
+ // Specifies information about the operating system disk used by the virtual machine.
+ // For more information about disks, see About disks and VHDs for Azure virtual machines [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview].
+ OSDisk *ImageOSDisk
+
+ // Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions
+ // that provide Zone Redundant Storage (ZRS).
+ ZoneResilient *bool
+}
+
+// ImageUpdate - The source user image virtual hard disk. Only tags may be updated.
+type ImageUpdate struct {
+ // Describes the properties of an Image.
+ Properties *ImageProperties
+
+ // Resource tags
+ Tags map[string]*string
+}
+
+// ImageVersionSecurityProfile - The security profile of a gallery image version
+type ImageVersionSecurityProfile struct {
+ // Contains UEFI settings for the image version.
+ UefiSettings *GalleryImageVersionUefiSettings
+}
+
+// InnerError - Inner error details.
+type InnerError struct {
+ // The internal error message or exception dump.
+ Errordetail *string
+
+ // The exception type.
+ Exceptiontype *string
+}
+
+// InstanceSKU - The role instance SKU.
+type InstanceSKU struct {
+ // READ-ONLY; The sku name.
+ Name *string
+
+ // READ-ONLY; The tier of the cloud service role instance.
+ Tier *string
+}
+
+// InstanceViewStatus - Instance view status.
+type InstanceViewStatus struct {
+ // The status code.
+ Code *string
+
+ // The short localizable label for the status.
+ DisplayStatus *string
+
+ // The level code.
+ Level *StatusLevelTypes
+
+ // The detailed status message, including for alerts and error messages.
+ Message *string
+
+ // The time of the status.
+ Time *time.Time
+}
+
+// InstanceViewStatusesSummary - Instance view statuses.
+type InstanceViewStatusesSummary struct {
+ // READ-ONLY; The summary.
+ StatusesSummary []*StatusCodeCount
+}
+
+// KeyForDiskEncryptionSet - Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots
+type KeyForDiskEncryptionSet struct {
+ // REQUIRED; Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled
+ // value.
+ KeyURL *string
+
+ // Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault
+ // subscription is not the same as the Disk Encryption Set subscription.
+ SourceVault *SourceVault
+}
+
+// KeyVaultAndKeyReference - Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the
+// encryptionKey
+type KeyVaultAndKeyReference struct {
+ // REQUIRED; Url pointing to a key or secret in KeyVault
+ KeyURL *string
+
+ // REQUIRED; Resource id of the KeyVault containing the key or secret
+ SourceVault *SourceVault
+}
+
+// KeyVaultAndSecretReference - Key Vault Secret Url and vault id of the encryption key
+type KeyVaultAndSecretReference struct {
+ // REQUIRED; Url pointing to a key or secret in KeyVault
+ SecretURL *string
+
+ // REQUIRED; Resource id of the KeyVault containing the key or secret
+ SourceVault *SourceVault
+}
+
+// KeyVaultKeyReference - Describes a reference to Key Vault Key
+type KeyVaultKeyReference struct {
+ // REQUIRED; The URL referencing a key encryption key in Key Vault.
+ KeyURL *string
+
+ // REQUIRED; The relative URL of the Key Vault containing the key.
+ SourceVault *SubResource
+}
+
+// KeyVaultSecretReference - Describes a reference to Key Vault Secret
+type KeyVaultSecretReference struct {
+ // REQUIRED; The URL referencing a secret in a Key Vault.
+ SecretURL *string
+
+ // REQUIRED; The relative URL of the Key Vault containing the secret.
+ SourceVault *SubResource
+}
+
+// LastPatchInstallationSummary - Describes the properties of the last installed patch summary.
+type LastPatchInstallationSummary struct {
+ // READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
+ Error *APIError
+
+ // READ-ONLY; The number of all available patches but excluded explicitly by a customer-specified exclusion list match.
+ ExcludedPatchCount *int32
+
+ // READ-ONLY; The count of patches that failed installation.
+ FailedPatchCount *int32
+
+ // READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension
+ // logs.
+ InstallationActivityID *string
+
+ // READ-ONLY; The count of patches that successfully installed.
+ InstalledPatchCount *int32
+
+ // READ-ONLY; The UTC timestamp when the operation began.
+ LastModifiedTime *time.Time
+
+ // READ-ONLY; Describes whether the operation ran out of time before it completed all its intended actions
+ MaintenanceWindowExceeded *bool
+
+ // READ-ONLY; The number of all available patches but not going to be installed because it didn't match a classification or
+ // inclusion list entry.
+ NotSelectedPatchCount *int32
+
+ // READ-ONLY; The number of all available patches expected to be installed over the course of the patch installation operation.
+ PendingPatchCount *int32
+
+ // READ-ONLY; The UTC timestamp when the operation began.
+ StartTime *time.Time
+
+ // READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes.
+ // At that point it will become "Unknown", "Failed", "Succeeded", or
+ // "CompletedWithWarnings."
+ Status *PatchOperationStatus
+}
+
+// LatestGalleryImageVersion - The gallery image version with latest version in a particular region.
+type LatestGalleryImageVersion struct {
+ // The name of the latest version in the region.
+ LatestVersionName *string
+
+ // region of the Gallery Image Version.
+ Location *string
+}
+
+// LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux
+// distributions, see Linux on Azure-Endorsed Distributions
+// [https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros].
+type LinuxConfiguration struct {
+ // Specifies whether password authentication should be disabled.
+ DisablePasswordAuthentication *bool
+
+ // Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default value is false.
+ EnableVMAgentPlatformUpdates *bool
+
+ // [Preview Feature] Specifies settings related to VM Guest Patching on Linux.
+ PatchSettings *LinuxPatchSettings
+
+ // Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified
+ // in the request body, default behavior is to set it to true. This will ensure
+ // that VM Agent is installed on the VM so that extensions can be added to the VM later.
+ ProvisionVMAgent *bool
+
+ // Specifies the ssh key configuration for a Linux OS.
+ SSH *SSHConfiguration
+}
+
+// LinuxParameters - Input for InstallPatches on a Linux VM, as directly received by the API
+type LinuxParameters struct {
+ // The update classifications to select when installing patches for Linux.
+ ClassificationsToInclude []*VMGuestPatchClassificationLinux
+
+ // This is used as a maintenance run identifier for Auto VM Guest Patching in Linux.
+ MaintenanceRunID *string
+
+ // packages to exclude in the patch operation. Format: packageName_packageVersion
+ PackageNameMasksToExclude []*string
+
+ // packages to include in the patch operation. Format: packageName_packageVersion
+ PackageNameMasksToInclude []*string
+}
+
+// LinuxPatchSettings - Specifies settings related to VM Guest Patching on Linux.
+type LinuxPatchSettings struct {
+ // Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.
+ // Possible values are:
+ // ImageDefault - You control the timing of patch assessments on a virtual machine.
+ // AutomaticByPlatform - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.
+ AssessmentMode *LinuxPatchAssessmentMode
+
+ // Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux.
+ AutomaticByPlatformSettings *LinuxVMGuestPatchAutomaticByPlatformSettings
+
+ // Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale
+ // set with OrchestrationMode as Flexible.
+ // Possible values are:
+ // ImageDefault - The virtual machine's default patching configuration is used.
+ // AutomaticByPlatform - The virtual machine will be automatically updated by the platform. The property provisionVMAgent
+ // must be true
+ PatchMode *LinuxVMGuestPatchMode
+}
+
+// LinuxVMGuestPatchAutomaticByPlatformSettings - Specifies additional settings to be applied when patch mode AutomaticByPlatform
+// is selected in Linux patch settings.
+type LinuxVMGuestPatchAutomaticByPlatformSettings struct {
+ // Enables customer to schedule patching without accidental upgrades
+ BypassPlatformSafetyChecksOnUserSchedule *bool
+
+ // Specifies the reboot setting for all AutomaticByPlatform patch installation operations.
+ RebootSetting *LinuxVMGuestPatchAutomaticByPlatformRebootSetting
+}
+
+// ListUsagesResult - The List Usages operation response.
+type ListUsagesResult struct {
+ // REQUIRED; The list of compute resource usages.
+ Value []*Usage
+
+ // The URI to fetch the next page of compute resource usage information. Call ListNext() with this to fetch the next page
+ // of compute resource usage information.
+ NextLink *string
+}
+
+// LoadBalancerConfiguration - Describes the load balancer configuration.
+type LoadBalancerConfiguration struct {
+ // REQUIRED; The name of the Load balancer
+ Name *string
+
+ // REQUIRED; Properties of the load balancer configuration.
+ Properties *LoadBalancerConfigurationProperties
+
+ // Resource Id
+ ID *string
+}
+
+// LoadBalancerConfigurationProperties - Describes the properties of the load balancer configuration.
+type LoadBalancerConfigurationProperties struct {
+ // REQUIRED; Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each
+ // load balancer configuration must have exactly one frontend IP configuration.
+ FrontendIPConfigurations []*LoadBalancerFrontendIPConfiguration
+}
+
+// LoadBalancerFrontendIPConfiguration - Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP
+// address is supported. Each load balancer configuration must have exactly one frontend IP configuration.
+type LoadBalancerFrontendIPConfiguration struct {
+ // REQUIRED; The name of the resource that is unique within the set of frontend IP configurations used by the load balancer.
+ // This name can be used to access the resource.
+ Name *string
+
+ // REQUIRED; Properties of load balancer frontend ip configuration.
+ Properties *LoadBalancerFrontendIPConfigurationProperties
+}
+
+// LoadBalancerFrontendIPConfigurationProperties - Describes a cloud service IP Configuration
+type LoadBalancerFrontendIPConfigurationProperties struct {
+ // The virtual network private IP address of the IP configuration.
+ PrivateIPAddress *string
+
+ // The reference to the public ip address resource.
+ PublicIPAddress *SubResource
+
+ // The reference to the virtual network subnet resource.
+ Subnet *SubResource
+}
+
+// LogAnalyticsInputBase - Api input base class for LogAnalytics Api.
+type LogAnalyticsInputBase struct {
+ // REQUIRED; SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
+ BlobContainerSasURI *string
+
+ // REQUIRED; From time of the query
+ FromTime *time.Time
+
+ // REQUIRED; To time of the query
+ ToTime *time.Time
+
+ // Group query result by Client Application ID.
+ GroupByClientApplicationID *bool
+
+ // Group query result by Operation Name.
+ GroupByOperationName *bool
+
+ // Group query result by Resource Name.
+ GroupByResourceName *bool
+
+ // Group query result by Throttle Policy applied.
+ GroupByThrottlePolicy *bool
+
+ // Group query result by User Agent.
+ GroupByUserAgent *bool
+}
+
+// LogAnalyticsOperationResult - LogAnalytics operation status response
+type LogAnalyticsOperationResult struct {
+ // READ-ONLY; LogAnalyticsOutput
+ Properties *LogAnalyticsOutput
+}
+
+// LogAnalyticsOutput - LogAnalytics output properties
+type LogAnalyticsOutput struct {
+ // READ-ONLY; Output file Uri path to blob container.
+ Output *string
+}
+
+// MaintenanceRedeployStatus - Maintenance Operation Status.
+type MaintenanceRedeployStatus struct {
+ // True, if customer is allowed to perform Maintenance.
+ IsCustomerInitiatedMaintenanceAllowed *bool
+
+ // Message returned for the last Maintenance Operation.
+ LastOperationMessage *string
+
+ // The Last Maintenance Operation Result Code.
+ LastOperationResultCode *MaintenanceOperationResultCodeTypes
+
+ // End Time for the Maintenance Window.
+ MaintenanceWindowEndTime *time.Time
+
+ // Start Time for the Maintenance Window.
+ MaintenanceWindowStartTime *time.Time
+
+ // End Time for the Pre Maintenance Window.
+ PreMaintenanceWindowEndTime *time.Time
+
+ // Start Time for the Pre Maintenance Window.
+ PreMaintenanceWindowStartTime *time.Time
+}
+
+// ManagedArtifact - The managed artifact.
+type ManagedArtifact struct {
+ // REQUIRED; The managed artifact id.
+ ID *string
+}
+
+// ManagedDiskParameters - The parameters of a managed disk.
+type ManagedDiskParameters struct {
+ // Specifies the customer managed disk encryption set resource id for the managed disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters
+
+ // Resource Id
+ ID *string
+
+ // Specifies the security profile for the managed disk.
+ SecurityProfile *VMDiskSecurityProfile
+
+ // Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot
+ // be used with OS Disk.
+ StorageAccountType *StorageAccountTypes
+}
+
+// NetworkInterfaceReference - Describes a network interface reference.
+type NetworkInterfaceReference struct {
+ // Resource Id
+ ID *string
+
+ // Describes a network interface reference properties.
+ Properties *NetworkInterfaceReferenceProperties
+}
+
+// NetworkInterfaceReferenceProperties - Describes a network interface reference properties.
+type NetworkInterfaceReferenceProperties struct {
+ // Specify what happens to the network interface when the VM is deleted
+ DeleteOption *DeleteOptions
+
+ // Specifies the primary network interface in case the virtual machine has more than 1 network interface.
+ Primary *bool
+}
+
+// NetworkProfile - Specifies the network interfaces or the networking configuration of the virtual machine.
+type NetworkProfile struct {
+ // specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations
+ NetworkAPIVersion *NetworkAPIVersion
+
+ // Specifies the networking configurations that will be used to create the virtual machine networking resources.
+ NetworkInterfaceConfigurations []*VirtualMachineNetworkInterfaceConfiguration
+
+ // Specifies the list of resource Ids for the network interfaces associated with the virtual machine.
+ NetworkInterfaces []*NetworkInterfaceReference
+}
+
+// OSDisk - Specifies information about the operating system disk used by the virtual machine. For more information about
+// disks, see About disks and VHDs for Azure virtual machines
+// [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview].
+type OSDisk struct {
+ // REQUIRED; Specifies how the virtual machine disk should be created. Possible values are Attach: This value is used when
+ // you are using a specialized disk to create the virtual machine. FromImage: This value is
+ // used when you are using an image to create the virtual machine. If you are using a platform image, you should also use
+ // the imageReference element described above. If you are using a marketplace image,
+ // you should also use the plan element previously described.
+ CreateOption *DiskCreateOptionTypes
+
+ // Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The defaulting behavior is: None for
+ // Standard storage. ReadOnly for Premium storage.
+ Caching *CachingTypes
+
+ // Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible values are: Delete. If this value is
+ // used, the OS disk is deleted when VM is deleted. Detach. If this value is used,
+ // the os disk is retained after VM is deleted. The default value is set to Detach. For an ephemeral OS Disk, the default
+ // value is set to Delete. The user cannot change the delete option for an ephemeral
+ // OS Disk.
+ DeleteOption *DiskDeleteOptionTypes
+
+ // Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.
+ DiffDiskSettings *DiffDiskSettings
+
+ // Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a
+ // virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3
+ // for the disk and the value cannot be larger than 1023.
+ DiskSizeGB *int32
+
+ // Specifies the encryption settings for the OS Disk. Minimum api-version: 2015-06-15.
+ EncryptionSettings *DiskEncryptionSettings
+
+ // The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine.
+ // If SourceImage is provided, the destination virtual hard drive must not
+ // exist.
+ Image *VirtualHardDisk
+
+ // The managed disk parameters.
+ ManagedDisk *ManagedDiskParameters
+
+ // The disk name.
+ Name *string
+
+ // This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or
+ // a specialized VHD. Possible values are: Windows, Linux.
+ OSType *OperatingSystemTypes
+
+ // The virtual hard disk.
+ Vhd *VirtualHardDisk
+
+ // Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool
+}
+
+// OSDiskImage - Contains the os disk image information.
+type OSDiskImage struct {
+ // REQUIRED; The operating system of the osDiskImage.
+ OperatingSystem *OperatingSystemTypes
+}
+
+// OSDiskImageEncryption - Contains encryption settings for an OS disk image.
+type OSDiskImageEncryption struct {
+ // A relative URI containing the resource ID of the disk encryption set.
+ DiskEncryptionSetID *string
+
+ // This property specifies the security profile of an OS disk image.
+ SecurityProfile *OSDiskImageSecurityProfile
+}
+
+// OSDiskImageSecurityProfile - Contains security profile for an OS disk image.
+type OSDiskImageSecurityProfile struct {
+ // confidential VM encryption types
+ ConfidentialVMEncryptionType *ConfidentialVMEncryptionType
+
+ // secure VM disk encryption set id
+ SecureVMDiskEncryptionSetID *string
+}
+
+// OSFamily - Describes a cloud service OS family.
+type OSFamily struct {
+ // OS family properties.
+ Properties *OSFamilyProperties
+
+ // READ-ONLY; Resource Id.
+ ID *string
+
+ // READ-ONLY; Resource location.
+ Location *string
+
+ // READ-ONLY; Resource name.
+ Name *string
+
+ // READ-ONLY; Resource type.
+ Type *string
+}
+
+// OSFamilyListResult - The list operation result.
+type OSFamilyListResult struct {
+ // REQUIRED; The list of resources.
+ Value []*OSFamily
+
+ // The URI to fetch the next page of resources. Use this to get the next page of resources. Do this till nextLink is null
+ // to fetch all the resources.
+ NextLink *string
+}
+
+// OSFamilyProperties - OS family properties.
+type OSFamilyProperties struct {
+ // READ-ONLY; The OS family label.
+ Label *string
+
+ // READ-ONLY; The OS family name.
+ Name *string
+
+ // READ-ONLY; List of OS versions belonging to this family.
+ Versions []*OSVersionPropertiesBase
+}
+
+type OSImageNotificationProfile struct {
+ // Specifies whether the OS Image Scheduled event is enabled or disabled.
+ Enable *bool
+
+ // Length of time a Virtual Machine being reimaged or having its OS upgraded will have to potentially approve the OS Image
+ // Scheduled Event before the event is auto approved (timed out). The configuration
+ // is specified in ISO 8601 format, and the value must be 15 minutes (PT15M)
+ NotBeforeTimeout *string
+}
+
+// OSProfile - Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once
+// VM is provisioned.
+type OSProfile struct {
+ // Specifies the password of the administrator account.
+ // Minimum-length (Windows): 8 characters
+ // Minimum-length (Linux): 6 characters
+ // Max-length (Windows): 123 characters
+ // Max-length (Linux): 72 characters
+ // Complexity requirements: 3 out of 4 conditions below need to be fulfilled
+ // Has lower characters
+ // Has upper characters
+ // Has a digit
+ // Has a special character (Regex match [\W_])
+ // Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1",
+ // "Password22", "iloveyou!"
+ // For resetting the password, see How to reset the Remote Desktop service or its login password in a Windows VM [https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp]
+ // For resetting root password, see Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension
+ // [https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection]
+ AdminPassword *string
+
+ // Specifies the name of the administrator account.
+ // This property cannot be updated after the VM is created.
+ // Windows-only restriction: Cannot end in "."
+ // Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123",
+ // "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest",
+ // "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
+ // Minimum-length (Linux): 1 character
+ // Max-length (Linux): 64 characters
+ // Max-length (Windows): 20 characters.
+ AdminUsername *string
+
+ // Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no
+ // extensions are present on the virtual machine.
+ AllowExtensionOperations *bool
+
+ // Specifies the host OS name of the virtual machine. This name cannot be updated after the VM is created. Max-length (Windows):
+ // 15 characters. Max-length (Linux): 64 characters. For naming conventions
+ // and restrictions see Azure infrastructure services implementation guidelines [https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules].
+ ComputerName *string
+
+ // Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved
+ // as a file on the Virtual Machine. The maximum length of the binary array is
+ // 65535 bytes. Note: Do not pass any secrets or passwords in customData property. This property cannot be updated after the
+ // VM is created. The property 'customData' is passed to the VM to be saved as a
+ // file, for more information see Custom Data on Azure VMs [https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/].
+ // For using cloud-init for your Linux VM, see Using cloud-init to
+ // customize a Linux VM during creation [https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init].
+ CustomData *string
+
+ // Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see
+ // Linux on Azure-Endorsed Distributions
+ // [https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros].
+ LinuxConfiguration *LinuxConfiguration
+
+ // Optional property which must either be set to True or omitted.
+ RequireGuestProvisionSignal *bool
+
+ // Specifies set of certificates that should be installed onto the virtual machine. To install certificates on a virtual machine
+ // it is recommended to use the Azure Key Vault virtual machine extension for
+ // Linux [https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux] or the Azure Key Vault virtual machine
+ // extension for Windows
+ // [https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows].
+ Secrets []*VaultSecretGroup
+
+ // Specifies Windows operating system settings on the virtual machine.
+ WindowsConfiguration *WindowsConfiguration
+}
+
+// OSProfileProvisioningData - Additional parameters for Reimaging Non-Ephemeral Virtual Machine.
+type OSProfileProvisioningData struct {
+ // Specifies the password of the administrator account.
+ // Minimum-length (Windows): 8 characters
+ // Minimum-length (Linux): 6 characters
+ // Max-length (Windows): 123 characters
+ // Max-length (Linux): 72 characters
+ // Complexity requirements: 3 out of 4 conditions below need to be fulfilled
+ // Has lower characters
+ // Has upper characters
+ // Has a digit
+ // Has a special character (Regex match [\W_])
+ // Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1",
+ // "Password22", "iloveyou!"
+ // For resetting the password, see How to reset the Remote Desktop service or its login password in a Windows VM [https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp]
+ // For resetting root password, see Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension
+ // [https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection]
+ AdminPassword *string
+
+ // Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved
+ // as a file on the Virtual Machine. The maximum length of the binary array is
+ // 65535 bytes. Note: Do not pass any secrets or passwords in customData property. This property cannot be updated after the
+ // VM is created. The property customData is passed to the VM to be saved as a
+ // file, for more information see Custom Data on Azure VMs [https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/].
+ // If using cloud-init for your Linux VM, see Using cloud-init to
+ // customize a Linux VM during creation [https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init].
+ CustomData *string
+}
+
+// OSVersion - Describes a cloud service OS version.
+type OSVersion struct {
+ // OS version properties.
+ Properties *OSVersionProperties
+
+ // READ-ONLY; Resource Id.
+ ID *string
+
+ // READ-ONLY; Resource location.
+ Location *string
+
+ // READ-ONLY; Resource name.
+ Name *string
+
+ // READ-ONLY; Resource type.
+ Type *string
+}
+
+// OSVersionListResult - The list operation result.
+type OSVersionListResult struct {
+ // REQUIRED; The list of resources.
+ Value []*OSVersion
+
+ // The URI to fetch the next page of resources. Use this to get the next page of resources. Do this till nextLink is null
+ // to fetch all the resources.
+ NextLink *string
+}
+
+// OSVersionProperties - OS version properties.
+type OSVersionProperties struct {
+ // READ-ONLY; The family of this OS version.
+ Family *string
+
+ // READ-ONLY; The family label of this OS version.
+ FamilyLabel *string
+
+ // READ-ONLY; Specifies whether this OS version is active.
+ IsActive *bool
+
+ // READ-ONLY; Specifies whether this is the default OS version for its family.
+ IsDefault *bool
+
+ // READ-ONLY; The OS version label.
+ Label *string
+
+ // READ-ONLY; The OS version.
+ Version *string
+}
+
+// OSVersionPropertiesBase - Configuration view of an OS version.
+type OSVersionPropertiesBase struct {
+ // READ-ONLY; Specifies whether this OS version is active.
+ IsActive *bool
+
+ // READ-ONLY; Specifies whether this is the default OS version for its family.
+ IsDefault *bool
+
+ // READ-ONLY; The OS version label.
+ Label *string
+
+ // READ-ONLY; The OS version.
+ Version *string
+}
+
+// OperationListResult - The List Compute Operation operation response.
+type OperationListResult struct {
+ // READ-ONLY; The list of compute operations
+ Value []*OperationValue
+}
+
+// OperationValue - Describes the properties of a Compute Operation value.
+type OperationValue struct {
+ // Describes the properties of a Compute Operation Value Display.
+ Display *OperationValueDisplay
+
+ // READ-ONLY; The name of the compute operation.
+ Name *string
+
+ // READ-ONLY; The origin of the compute operation.
+ Origin *string
+}
+
+// OperationValueDisplay - Describes the properties of a Compute Operation Value Display.
+type OperationValueDisplay struct {
+ // READ-ONLY; The description of the operation.
+ Description *string
+
+ // READ-ONLY; The display name of the compute operation.
+ Operation *string
+
+ // READ-ONLY; The resource provider for the operation.
+ Provider *string
+
+ // READ-ONLY; The display name of the resource the operation applies to.
+ Resource *string
+}
+
+// OrchestrationServiceStateInput - The input for OrchestrationServiceState
+type OrchestrationServiceStateInput struct {
+ // REQUIRED; The action to be performed.
+ Action *OrchestrationServiceStateAction
+
+ // REQUIRED; The name of the service.
+ ServiceName *OrchestrationServiceNames
+}
+
+// OrchestrationServiceSummary - Summary for an orchestration service of a virtual machine scale set.
+type OrchestrationServiceSummary struct {
+ // READ-ONLY; The name of the service.
+ ServiceName *OrchestrationServiceNames
+
+ // READ-ONLY; The current state of the service.
+ ServiceState *OrchestrationServiceState
+}
+
+// PatchInstallationDetail - Information about a specific patch that was encountered during an installation action.
+type PatchInstallationDetail struct {
+ // READ-ONLY; The classification(s) of the patch as provided by the patch publisher.
+ Classifications []*string
+
+ // READ-ONLY; The state of the patch after the installation operation completed.
+ InstallationState *PatchInstallationState
+
+ // READ-ONLY; The KBID of the patch. Only applies to Windows patches.
+ KbID *string
+
+ // READ-ONLY; The friendly name of the patch.
+ Name *string
+
+ // READ-ONLY; A unique identifier for the patch.
+ PatchID *string
+
+ // READ-ONLY; The version string of the package. It may conform to Semantic Versioning. Only applies to Linux.
+ Version *string
+}
+
+// PatchSettings - Specifies settings related to VM Guest Patching on Windows.
+type PatchSettings struct {
+ // Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.
+ // Possible values are:
+ // ImageDefault - You control the timing of patch assessments on a virtual machine.
+ // AutomaticByPlatform - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.
+ AssessmentMode *WindowsPatchAssessmentMode
+
+ // Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows.
+ AutomaticByPlatformSettings *WindowsVMGuestPatchAutomaticByPlatformSettings
+
+ // Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must
+ // be set to true and 'patchMode' must be set to 'AutomaticByPlatform'.
+ EnableHotpatching *bool
+
+ // Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale
+ // set with OrchestrationMode as Flexible.
+ // Possible values are:
+ // Manual - You control the application of patches to a virtual machine. You do this by applying patches manually inside the
+ // VM. In this mode, automatic updates are disabled; the property
+ // WindowsConfiguration.enableAutomaticUpdates must be false
+ // AutomaticByOS - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates
+ // must be true.
+ // AutomaticByPlatform - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and
+ // WindowsConfiguration.enableAutomaticUpdates must be true
+ PatchMode *WindowsVMGuestPatchMode
+}
+
+// PirCommunityGalleryResource - Base information about the community gallery resource in azure compute gallery.
+type PirCommunityGalleryResource struct {
+ // The identifier information of community gallery.
+ Identifier *CommunityGalleryIdentifier
+
+ // READ-ONLY; Resource location
+ Location *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// PirResource - The Resource model definition.
+type PirResource struct {
+ // READ-ONLY; Resource location
+ Location *string
+
+ // READ-ONLY; Resource name
+ Name *string
+}
+
+// PirSharedGalleryResource - Base information about the shared gallery resource in pir.
+type PirSharedGalleryResource struct {
+ // The identifier information of shared gallery.
+ Identifier *SharedGalleryIdentifier
+
+ // READ-ONLY; Resource location
+ Location *string
+
+ // READ-ONLY; Resource name
+ Name *string
+}
+
+// Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used
+// for marketplace images. Before you can use a marketplace image from an API, you must
+// enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click
+// Want to deploy programmatically, Get Started ->. Enter any required
+// information and then click Save.
+type Plan struct {
+ // The plan ID.
+ Name *string
+
+ // Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
+ Product *string
+
+ // The promotion code.
+ PromotionCode *string
+
+ // The publisher ID.
+ Publisher *string
+}
+
+// PolicyViolation - A policy violation reported against a gallery artifact.
+type PolicyViolation struct {
+ // Describes the nature of the policy violation.
+ Category *PolicyViolationCategory
+
+ // Describes specific details about why this policy violation was reported.
+ Details *string
+}
+
+// PriorityMixPolicy - Specifies the target splits for Spot and Regular priority VMs within a scale set with flexible orchestration
+// mode. With this property the customer is able to specify the base number of regular
+// priority VMs created as the VMSS flex instance scales out and the split between Spot and Regular priority VMs after this
+// base target has been reached.
+type PriorityMixPolicy struct {
+ // The base number of regular priority VMs that will be created in this scale set as it scales out.
+ BaseRegularPriorityCount *int32
+
+ // The percentage of VM instances, after the base regular priority count has been reached, that are expected to use regular
+ // priority.
+ RegularPriorityPercentageAboveBase *int32
+}
+
+// PrivateEndpoint - The Private Endpoint resource.
+type PrivateEndpoint struct {
+ // READ-ONLY; The ARM identifier for Private Endpoint
+ ID *string
+}
+
+// PrivateEndpointConnection - The Private Endpoint Connection resource.
+type PrivateEndpointConnection struct {
+ // Resource properties.
+ Properties *PrivateEndpointConnectionProperties
+
+ // READ-ONLY; private endpoint connection Id
+ ID *string
+
+ // READ-ONLY; private endpoint connection name
+ Name *string
+
+ // READ-ONLY; private endpoint connection type
+ Type *string
+}
+
+// PrivateEndpointConnectionListResult - A list of private link resources
+type PrivateEndpointConnectionListResult struct {
+ // The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
+ NextLink *string
+
+ // Array of private endpoint connections
+ Value []*PrivateEndpointConnection
+}
+
+// PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties.
+type PrivateEndpointConnectionProperties struct {
+ // REQUIRED; A collection of information about the state of the connection between DiskAccess and Virtual Network.
+ PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState
+
+ // READ-ONLY; The resource of private end point.
+ PrivateEndpoint *PrivateEndpoint
+
+ // READ-ONLY; The provisioning state of the private endpoint connection resource.
+ ProvisioningState *PrivateEndpointConnectionProvisioningState
+}
+
+// PrivateLinkResource - A private link resource
+type PrivateLinkResource struct {
+ // Resource properties.
+ Properties *PrivateLinkResourceProperties
+
+ // READ-ONLY; private link resource Id
+ ID *string
+
+ // READ-ONLY; private link resource name
+ Name *string
+
+ // READ-ONLY; private link resource type
+ Type *string
+}
+
+// PrivateLinkResourceListResult - A list of private link resources
+type PrivateLinkResourceListResult struct {
+ // Array of private link resources
+ Value []*PrivateLinkResource
+}
+
+// PrivateLinkResourceProperties - Properties of a private link resource.
+type PrivateLinkResourceProperties struct {
+ // The private link resource DNS zone name.
+ RequiredZoneNames []*string
+
+ // READ-ONLY; The private link resource group id.
+ GroupID *string
+
+ // READ-ONLY; The private link resource required member names.
+ RequiredMembers []*string
+}
+
+// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer
+// and provider.
+type PrivateLinkServiceConnectionState struct {
+ // A message indicating if changes on the service provider require any updates on the consumer.
+ ActionsRequired *string
+
+ // The reason for approval/rejection of the connection.
+ Description *string
+
+ // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
+ Status *PrivateEndpointServiceConnectionStatus
+}
+
+// PropertyUpdatesInProgress - Properties of the disk for which update is pending.
+type PropertyUpdatesInProgress struct {
+ // The target performance tier of the disk if a tier change operation is in progress.
+ TargetTier *string
+}
+
+// ProximityPlacementGroup - Specifies information about the proximity placement group.
+type ProximityPlacementGroup struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // Describes the properties of a Proximity Placement Group.
+ Properties *ProximityPlacementGroupProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the
+ // proximity placement group can be created.
+ Zones []*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// ProximityPlacementGroupListResult - The List Proximity Placement Group operation response.
+type ProximityPlacementGroupListResult struct {
+ // REQUIRED; The list of proximity placement groups
+ Value []*ProximityPlacementGroup
+
+ // The URI to fetch the next page of proximity placement groups.
+ NextLink *string
+}
+
+// ProximityPlacementGroupProperties - Describes the properties of a Proximity Placement Group.
+type ProximityPlacementGroupProperties struct {
+ // Describes colocation status of the Proximity Placement Group.
+ ColocationStatus *InstanceViewStatus
+
+ // Specifies the user intent of the proximity placement group.
+ Intent *ProximityPlacementGroupPropertiesIntent
+
+ // Specifies the type of the proximity placement group. Possible values are: Standard : Co-locate resources within an Azure
+ // region or Availability Zone. Ultra : For future use.
+ ProximityPlacementGroupType *ProximityPlacementGroupType
+
+ // READ-ONLY; A list of references to all availability sets in the proximity placement group.
+ AvailabilitySets []*SubResourceWithColocationStatus
+
+ // READ-ONLY; A list of references to all virtual machine scale sets in the proximity placement group.
+ VirtualMachineScaleSets []*SubResourceWithColocationStatus
+
+ // READ-ONLY; A list of references to all virtual machines in the proximity placement group.
+ VirtualMachines []*SubResourceWithColocationStatus
+}
+
+// ProximityPlacementGroupPropertiesIntent - Specifies the user intent of the proximity placement group.
+type ProximityPlacementGroupPropertiesIntent struct {
+ // Specifies possible sizes of virtual machines that can be created in the proximity placement group.
+ VMSizes []*string
+}
+
+// ProximityPlacementGroupUpdate - Specifies information about the proximity placement group.
+type ProximityPlacementGroupUpdate struct {
+ // Resource tags
+ Tags map[string]*string
+}
+
+// ProxyAgentSettings - Specifies ProxyAgent settings while creating the virtual machine. Minimum api-version: 2024-03-01.
+type ProxyAgentSettings struct {
+ // Specifies whether ProxyAgent feature should be enabled on the virtual machine or virtual machine scale set.
+ Enabled *bool
+
+ // Increase the value of this property allows user to reset the key used for securing communication channel between guest
+ // and host.
+ KeyIncarnationID *int32
+
+ // Specifies the mode that ProxyAgent will execute on if the feature is enabled. ProxyAgent will start to audit or monitor
+ // but not enforce access control over requests to host endpoints in Audit mode,
+ // while in Enforce mode it will enforce access control. The default value is Enforce mode.
+ Mode *Mode
+}
+
+// ProxyOnlyResource - The ProxyOnly Resource model definition.
+type ProxyOnlyResource struct {
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// ProxyResource - The resource model definition for an Azure Resource Manager proxy resource. It will not have tags and a
+// location
+type ProxyResource struct {
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// PublicIPAddressSKU - Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.
+type PublicIPAddressSKU struct {
+ // Specify public IP sku name
+ Name *PublicIPAddressSKUName
+
+ // Specify public IP sku tier
+ Tier *PublicIPAddressSKUTier
+}
+
+// PurchasePlan - Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
+type PurchasePlan struct {
+ // REQUIRED; The plan ID.
+ Name *string
+
+ // REQUIRED; Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference
+ // element.
+ Product *string
+
+ // REQUIRED; The publisher ID.
+ Publisher *string
+}
+
+// RecommendedMachineConfiguration - The properties describe the recommended machine configuration for this Image Definition.
+// These properties are updatable.
+type RecommendedMachineConfiguration struct {
+ // Describes the resource range.
+ Memory *ResourceRange
+
+ // Describes the resource range.
+ VCPUs *ResourceRange
+}
+
+// RecoveryWalkResponse - Response after calling a manual recovery walk
+type RecoveryWalkResponse struct {
+ // READ-ONLY; The next update domain that needs to be walked. Null means walk spanning all update domains has been completed
+ NextPlatformUpdateDomain *int32
+
+ // READ-ONLY; Whether the recovery walk was performed
+ WalkPerformed *bool
+}
+
+// RegionalReplicationStatus - This is the regional replication status.
+type RegionalReplicationStatus struct {
+ // READ-ONLY; The details of the replication status.
+ Details *string
+
+ // READ-ONLY; It indicates progress of the replication job.
+ Progress *int32
+
+ // READ-ONLY; The region to which the gallery image version is being replicated to.
+ Region *string
+
+ // READ-ONLY; This is the regional replication state.
+ State *ReplicationState
+}
+
+// RegionalSharingStatus - Gallery regional sharing status
+type RegionalSharingStatus struct {
+ // Details of gallery regional sharing failure.
+ Details *string
+
+ // Region name
+ Region *string
+
+ // READ-ONLY; Gallery sharing state in current region
+ State *SharingState
+}
+
+// ReplicationStatus - This is the replication status of the gallery image version.
+type ReplicationStatus struct {
+ // READ-ONLY; This is the aggregated replication status based on all the regional replication status flags.
+ AggregatedState *AggregatedReplicationState
+
+ // READ-ONLY; This is a summary of replication status for each region.
+ Summary []*RegionalReplicationStatus
+}
+
+// RequestRateByIntervalInput - Api request input for LogAnalytics getRequestRateByInterval Api.
+type RequestRateByIntervalInput struct {
+ // REQUIRED; SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
+ BlobContainerSasURI *string
+
+ // REQUIRED; From time of the query
+ FromTime *time.Time
+
+ // REQUIRED; Interval value in minutes used to create LogAnalytics call rate logs.
+ IntervalLength *IntervalInMins
+
+ // REQUIRED; To time of the query
+ ToTime *time.Time
+
+ // Group query result by Client Application ID.
+ GroupByClientApplicationID *bool
+
+ // Group query result by Operation Name.
+ GroupByOperationName *bool
+
+ // Group query result by Resource Name.
+ GroupByResourceName *bool
+
+ // Group query result by Throttle Policy applied.
+ GroupByThrottlePolicy *bool
+
+ // Group query result by User Agent.
+ GroupByUserAgent *bool
+}
+
+// ResiliencyPolicy - Describes an resiliency policy - resilientVMCreationPolicy and/or resilientVMDeletionPolicy.
+type ResiliencyPolicy struct {
+ // The configuration parameters used while performing resilient VM creation.
+ ResilientVMCreationPolicy *ResilientVMCreationPolicy
+
+ // The configuration parameters used while performing resilient VM deletion.
+ ResilientVMDeletionPolicy *ResilientVMDeletionPolicy
+}
+
+// ResilientVMCreationPolicy - The configuration parameters used while performing resilient VM creation.
+type ResilientVMCreationPolicy struct {
+ // Specifies whether resilient VM creation should be enabled on the virtual machine scale set. The default value is false.
+ Enabled *bool
+}
+
+// ResilientVMDeletionPolicy - The configuration parameters used while performing resilient VM deletion.
+type ResilientVMDeletionPolicy struct {
+ // Specifies whether resilient VM deletion should be enabled on the virtual machine scale set. The default value is false.
+ Enabled *bool
+}
+
+// Resource - The Resource model definition.
+type Resource struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// ResourceInstanceViewStatus - Instance view status.
+type ResourceInstanceViewStatus struct {
+ // The level code.
+ Level *StatusLevelTypes
+
+ // READ-ONLY; The status code.
+ Code *string
+
+ // READ-ONLY; The short localizable label for the status.
+ DisplayStatus *string
+
+ // READ-ONLY; The detailed status message, including for alerts and error messages.
+ Message *string
+
+ // READ-ONLY; The time of the status.
+ Time *time.Time
+}
+
+// ResourceRange - Describes the resource range.
+type ResourceRange struct {
+ // The maximum number of the resource.
+ Max *int32
+
+ // The minimum number of the resource.
+ Min *int32
+}
+
+// ResourceSKU - Describes an available Compute SKU.
+type ResourceSKU struct {
+ // READ-ONLY; The api versions that support this SKU.
+ APIVersions []*string
+
+ // READ-ONLY; A name value pair to describe the capability.
+ Capabilities []*ResourceSKUCapabilities
+
+ // READ-ONLY; Specifies the number of virtual machines in the scale set.
+ Capacity *ResourceSKUCapacity
+
+ // READ-ONLY; Metadata for retrieving price info.
+ Costs []*ResourceSKUCosts
+
+ // READ-ONLY; The Family of this particular SKU.
+ Family *string
+
+ // READ-ONLY; The Kind of resources that are supported in this SKU.
+ Kind *string
+
+ // READ-ONLY; A list of locations and availability zones in those locations where the SKU is available.
+ LocationInfo []*ResourceSKULocationInfo
+
+ // READ-ONLY; The set of locations that the SKU is available.
+ Locations []*string
+
+ // READ-ONLY; The name of SKU.
+ Name *string
+
+ // READ-ONLY; The type of resource the SKU applies to.
+ ResourceType *string
+
+ // READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
+ Restrictions []*ResourceSKURestrictions
+
+ // READ-ONLY; The Size of the SKU.
+ Size *string
+
+ // READ-ONLY; Specifies the tier of virtual machines in a scale set.
+ // Possible Values:
+ // Standard
+ // Basic
+ Tier *string
+}
+
+// ResourceSKUCapabilities - Describes The SKU capabilities object.
+type ResourceSKUCapabilities struct {
+ // READ-ONLY; An invariant to describe the feature.
+ Name *string
+
+ // READ-ONLY; An invariant if the feature is measured by quantity.
+ Value *string
+}
+
+// ResourceSKUCapacity - Describes scaling information of a SKU.
+type ResourceSKUCapacity struct {
+ // READ-ONLY; The default capacity.
+ Default *int64
+
+ // READ-ONLY; The maximum capacity that can be set.
+ Maximum *int64
+
+ // READ-ONLY; The minimum capacity.
+ Minimum *int64
+
+ // READ-ONLY; The scale type applicable to the sku.
+ ScaleType *ResourceSKUCapacityScaleType
+}
+
+// ResourceSKUCosts - Describes metadata for retrieving price info.
+type ResourceSKUCosts struct {
+ // READ-ONLY; An invariant to show the extended unit.
+ ExtendedUnit *string
+
+ // READ-ONLY; Used for querying price from commerce.
+ MeterID *string
+
+ // READ-ONLY; The multiplier is needed to extend the base metered cost.
+ Quantity *int64
+}
+
+// ResourceSKULocationInfo - Describes an available Compute SKU Location Information.
+type ResourceSKULocationInfo struct {
+ // READ-ONLY; The names of extended locations.
+ ExtendedLocations []*string
+
+ // READ-ONLY; Location of the SKU
+ Location *string
+
+ // READ-ONLY; The type of the extended location.
+ Type *ExtendedLocationType
+
+ // READ-ONLY; Details of capabilities available to a SKU in specific zones.
+ ZoneDetails []*ResourceSKUZoneDetails
+
+ // READ-ONLY; List of availability zones where the SKU is supported.
+ Zones []*string
+}
+
+// ResourceSKURestrictionInfo - Describes an available Compute SKU Restriction Information.
+type ResourceSKURestrictionInfo struct {
+ // READ-ONLY; Locations where the SKU is restricted
+ Locations []*string
+
+ // READ-ONLY; List of availability zones where the SKU is restricted.
+ Zones []*string
+}
+
+// ResourceSKURestrictions - Describes scaling information of a SKU.
+type ResourceSKURestrictions struct {
+ // READ-ONLY; The reason for restriction.
+ ReasonCode *ResourceSKURestrictionsReasonCode
+
+ // READ-ONLY; The information about the restriction where the SKU cannot be used.
+ RestrictionInfo *ResourceSKURestrictionInfo
+
+ // READ-ONLY; The type of restrictions.
+ Type *ResourceSKURestrictionsType
+
+ // READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where
+ // the SKU is restricted.
+ Values []*string
+}
+
+// ResourceSKUZoneDetails - Describes The zonal capabilities of a SKU.
+type ResourceSKUZoneDetails struct {
+ // READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones.
+ Capabilities []*ResourceSKUCapabilities
+
+ // READ-ONLY; The set of zones that the SKU is available in with the specified capabilities.
+ Name []*string
+}
+
+// ResourceSKUsResult - The List Resource Skus operation response.
+type ResourceSKUsResult struct {
+ // REQUIRED; The list of skus available for the subscription.
+ Value []*ResourceSKU
+
+ // The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus
+ NextLink *string
+}
+
+type ResourceSharingProfile struct {
+ // Specifies an array of subscription resource IDs that capacity reservation group is shared with. Note: Minimum api-version:
+ // 2024-03-01. Please refer to https://aka.ms/computereservationsharing for more
+ // details.
+ SubscriptionIDs []*SubResource
+}
+
+// ResourceURIList - The List resources which are encrypted with the disk encryption set.
+type ResourceURIList struct {
+ // REQUIRED; A list of IDs or Owner IDs of resources which are encrypted with the disk encryption set.
+ Value []*string
+
+ // The uri to fetch the next page of encrypted resources. Call ListNext() with this to fetch the next page of encrypted resources.
+ NextLink *string
+}
+
+// ResourceWithOptionalLocation - The Resource model definition with location property as optional.
+type ResourceWithOptionalLocation struct {
+ // Resource location
+ Location *string
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// RestorePoint - Restore Point details.
+type RestorePoint struct {
+ // The restore point properties.
+ Properties *RestorePointProperties
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// RestorePointCollection - Create or update Restore Point collection parameters.
+type RestorePointCollection struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // The restore point collection properties.
+ Properties *RestorePointCollectionProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// RestorePointCollectionListResult - The List restore point collection operation response.
+type RestorePointCollectionListResult struct {
+ // The uri to fetch the next page of RestorePointCollections. Call ListNext() with this to fetch the next page of RestorePointCollections
+ NextLink *string
+
+ // Gets the list of restore point collections.
+ Value []*RestorePointCollection
+}
+
+// RestorePointCollectionProperties - The restore point collection properties.
+type RestorePointCollectionProperties struct {
+ // The properties of the source resource that this restore point collection is created from.
+ Source *RestorePointCollectionSourceProperties
+
+ // READ-ONLY; The provisioning state of the restore point collection.
+ ProvisioningState *string
+
+ // READ-ONLY; The unique id of the restore point collection.
+ RestorePointCollectionID *string
+
+ // READ-ONLY; A list containing all restore points created under this restore point collection.
+ RestorePoints []*RestorePoint
+}
+
+// RestorePointCollectionSourceProperties - The properties of the source resource that this restore point collection is created
+// from.
+type RestorePointCollectionSourceProperties struct {
+ // Resource Id of the source resource used to create this restore point collection
+ ID *string
+
+ // READ-ONLY; Location of the source resource used to create this restore point collection.
+ Location *string
+}
+
+// RestorePointCollectionUpdate - Update Restore Point collection parameters.
+type RestorePointCollectionUpdate struct {
+ // The restore point collection properties.
+ Properties *RestorePointCollectionProperties
+
+ // Resource tags
+ Tags map[string]*string
+}
+
+// RestorePointEncryption - Encryption at rest settings for disk restore point. It is an optional property that can be specified
+// in the input while creating a restore point.
+type RestorePointEncryption struct {
+ // Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. Note: The disk
+ // encryption set resource id can only be specified for managed disk. Please
+ // refer https://aka.ms/mdssewithcmkoverview for more details.
+ DiskEncryptionSet *DiskEncryptionSetParameters
+
+ // The type of key used to encrypt the data of the disk restore point.
+ Type *RestorePointEncryptionType
+}
+
+// RestorePointInstanceView - The instance view of a restore point.
+type RestorePointInstanceView struct {
+ // The disk restore points information.
+ DiskRestorePoints []*DiskRestorePointInstanceView
+
+ // The resource status information.
+ Statuses []*InstanceViewStatus
+}
+
+// RestorePointProperties - The restore point properties.
+type RestorePointProperties struct {
+ // ConsistencyMode of the RestorePoint. Can be specified in the input while creating a restore point. For now, only CrashConsistent
+ // is accepted as a valid input. Please refer to
+ // https://aka.ms/RestorePoints for more details.
+ ConsistencyMode *ConsistencyModeTypes
+
+ // List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks
+ // will be included.
+ ExcludeDisks []*APIEntityReference
+
+ // Gets the details of the VM captured at the time of the restore point creation.
+ SourceMetadata *RestorePointSourceMetadata
+
+ // Resource Id of the source restore point from which a copy needs to be created.
+ SourceRestorePoint *APIEntityReference
+
+ // Gets the creation time of the restore point.
+ TimeCreated *time.Time
+
+ // READ-ONLY; The restore point instance view.
+ InstanceView *RestorePointInstanceView
+
+ // READ-ONLY; Gets the provisioning state of the restore point.
+ ProvisioningState *string
+}
+
+// RestorePointSourceMetadata - Describes the properties of the Virtual Machine for which the restore point was created. The
+// properties provided are a subset and the snapshot of the overall Virtual Machine properties captured at the
+// time of the restore point creation.
+type RestorePointSourceMetadata struct {
+ // Gets the storage profile.
+ StorageProfile *RestorePointSourceVMStorageProfile
+
+ // READ-ONLY; Gets the diagnostics profile.
+ DiagnosticsProfile *DiagnosticsProfile
+
+ // READ-ONLY; Gets the hardware profile.
+ HardwareProfile *HardwareProfile
+
+ // READ-ONLY; HyperVGeneration of the source VM for which restore point is captured.
+ HyperVGeneration *HyperVGenerationTypes
+
+ // READ-ONLY; Gets the license type, which is for bring your own license scenario.
+ LicenseType *string
+
+ // READ-ONLY; Location of the VM from which the restore point was created.
+ Location *string
+
+ // READ-ONLY; Gets the OS profile.
+ OSProfile *OSProfile
+
+ // READ-ONLY; Gets the security profile.
+ SecurityProfile *SecurityProfile
+
+ // READ-ONLY; UserData associated with the source VM for which restore point is captured, which is a base-64 encoded value.
+ UserData *string
+
+ // READ-ONLY; Gets the virtual machine unique id.
+ VMID *string
+}
+
+// RestorePointSourceVMDataDisk - Describes a data disk.
+type RestorePointSourceVMDataDisk struct {
+ // Contains Disk Restore Point properties.
+ DiskRestorePoint *DiskRestorePointAttributes
+
+ // Contains the managed disk details.
+ ManagedDisk *ManagedDiskParameters
+
+ // READ-ONLY; Gets the caching type.
+ Caching *CachingTypes
+
+ // READ-ONLY; Gets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks.
+ DiskSizeGB *int32
+
+ // READ-ONLY; Gets the logical unit number.
+ Lun *int32
+
+ // READ-ONLY; Gets the disk name.
+ Name *string
+
+ // READ-ONLY; Shows true if the disk is write-accelerator enabled.
+ WriteAcceleratorEnabled *bool
+}
+
+// RestorePointSourceVMOSDisk - Describes an Operating System disk.
+type RestorePointSourceVMOSDisk struct {
+ // Contains Disk Restore Point properties.
+ DiskRestorePoint *DiskRestorePointAttributes
+
+ // Gets the managed disk details
+ ManagedDisk *ManagedDiskParameters
+
+ // READ-ONLY; Gets the caching type.
+ Caching *CachingTypes
+
+ // READ-ONLY; Gets the disk size in GB.
+ DiskSizeGB *int32
+
+ // READ-ONLY; Gets the disk encryption settings.
+ EncryptionSettings *DiskEncryptionSettings
+
+ // READ-ONLY; Gets the disk name.
+ Name *string
+
+ // READ-ONLY; Gets the Operating System type.
+ OSType *OperatingSystemType
+
+ // READ-ONLY; Shows true if the disk is write-accelerator enabled.
+ WriteAcceleratorEnabled *bool
+}
+
+// RestorePointSourceVMStorageProfile - Describes the storage profile.
+type RestorePointSourceVMStorageProfile struct {
+ // Gets the data disks of the VM captured at the time of the restore point creation.
+ DataDisks []*RestorePointSourceVMDataDisk
+
+ // Gets the OS disk of the VM captured at the time of the restore point creation.
+ OSDisk *RestorePointSourceVMOSDisk
+
+ // READ-ONLY; Gets the disk controller type of the VM captured at the time of the restore point creation.
+ DiskControllerType *DiskControllerTypes
+}
+
+// RetrieveBootDiagnosticsDataResult - The SAS URIs of the console screenshot and serial log blobs.
+type RetrieveBootDiagnosticsDataResult struct {
+ // READ-ONLY; The console screenshot blob URI
+ ConsoleScreenshotBlobURI *string
+
+ // READ-ONLY; The serial console log blob URI.
+ SerialConsoleLogBlobURI *string
+}
+
+// RoleInstance - Describes the cloud service role instance.
+type RoleInstance struct {
+ // Role instance properties.
+ Properties *RoleInstanceProperties
+
+ // The role instance SKU.
+ SKU *InstanceSKU
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource Location.
+ Location *string
+
+ // READ-ONLY; Resource Name.
+ Name *string
+
+ // READ-ONLY; Resource tags.
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Type.
+ Type *string
+}
+
+// RoleInstanceListResult - The list operation result.
+type RoleInstanceListResult struct {
+ // REQUIRED; The list of resources.
+ Value []*RoleInstance
+
+ // The URI to fetch the next page of resources. Use this to get the next page of resources. Do this till nextLink is null
+ // to fetch all the resources.
+ NextLink *string
+}
+
+// RoleInstanceNetworkProfile - Describes the network profile for the role instance.
+type RoleInstanceNetworkProfile struct {
+ // READ-ONLY; Specifies the list of resource Ids for the network interfaces associated with the role instance.
+ NetworkInterfaces []*SubResource
+}
+
+// RoleInstanceProperties - Role instance properties.
+type RoleInstanceProperties struct {
+ // The instance view of the role instance.
+ InstanceView *RoleInstanceView
+
+ // Describes the network profile for the role instance.
+ NetworkProfile *RoleInstanceNetworkProfile
+}
+
+// RoleInstanceView - The instance view of the role instance.
+type RoleInstanceView struct {
+ // READ-ONLY; The Fault Domain.
+ PlatformFaultDomain *int32
+
+ // READ-ONLY; The Update Domain.
+ PlatformUpdateDomain *int32
+
+ // READ-ONLY; Specifies a unique identifier generated internally for the cloud service associated with this role instance.
+ // NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details.
+ PrivateID *string
+
+ // READ-ONLY
+ Statuses []*ResourceInstanceViewStatus
+}
+
+// RoleInstances - Specifies a list of role instances from the cloud service.
+type RoleInstances struct {
+ // REQUIRED; List of cloud service role instance names. Value of '*' will signify all role instances of the cloud service.
+ RoleInstances []*string
+}
+
+// RollbackStatusInfo - Information about rollback on failed VM instances after a OS Upgrade operation.
+type RollbackStatusInfo struct {
+ // READ-ONLY; The number of instances which failed to rollback.
+ FailedRolledbackInstanceCount *int32
+
+ // READ-ONLY; Error details if OS rollback failed.
+ RollbackError *APIError
+
+ // READ-ONLY; The number of instances which have been successfully rolled back.
+ SuccessfullyRolledbackInstanceCount *int32
+}
+
+// RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade.
+type RollingUpgradePolicy struct {
+ // Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent
+ // to determine the batch size.
+ EnableCrossZoneUpgrade *bool
+
+ // The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one
+ // batch. As this is a maximum, unhealthy instances in previous or future batches
+ // can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter
+ // is 20%.
+ MaxBatchInstancePercent *int32
+
+ // Create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines. Existing virtual
+ // machines will be deleted once the new virtual machines are created for each
+ // batch.
+ MaxSurge *bool
+
+ // The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either
+ // as a result of being upgraded, or by being found in an unhealthy state by
+ // the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting
+ // any batch. The default value for this parameter is 20%.
+ MaxUnhealthyInstancePercent *int32
+
+ // The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check
+ // will happen after each batch is upgraded. If this percentage is ever exceeded,
+ // the rolling update aborts. The default value for this parameter is 20%.
+ MaxUnhealthyUpgradedInstancePercent *int32
+
+ // The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time
+ // duration should be specified in ISO 8601 format. The default value is 0 seconds
+ // (PT0S).
+ PauseTimeBetweenBatches *string
+
+ // Upgrade all unhealthy instances in a scale set before any healthy instances.
+ PrioritizeUnhealthyInstances *bool
+
+ // Rollback failed instances to previous model if the Rolling Upgrade policy is violated.
+ RollbackFailedInstancesOnPolicyBreach *bool
+}
+
+// RollingUpgradeProgressInfo - Information about the number of virtual machine instances in each upgrade state.
+type RollingUpgradeProgressInfo struct {
+ // READ-ONLY; The number of instances that have failed to be upgraded successfully.
+ FailedInstanceCount *int32
+
+ // READ-ONLY; The number of instances that are currently being upgraded.
+ InProgressInstanceCount *int32
+
+ // READ-ONLY; The number of instances that have not yet begun to be upgraded.
+ PendingInstanceCount *int32
+
+ // READ-ONLY; The number of instances that have been successfully upgraded.
+ SuccessfulInstanceCount *int32
+}
+
+// RollingUpgradeRunningStatus - Information about the current running state of the overall upgrade.
+type RollingUpgradeRunningStatus struct {
+ // READ-ONLY; Code indicating the current status of the upgrade.
+ Code *RollingUpgradeStatusCode
+
+ // READ-ONLY; The last action performed on the rolling upgrade.
+ LastAction *RollingUpgradeActionType
+
+ // READ-ONLY; Last action time of the upgrade.
+ LastActionTime *time.Time
+
+ // READ-ONLY; Start time of the upgrade.
+ StartTime *time.Time
+}
+
+// RollingUpgradeStatusInfo - The status of the latest virtual machine scale set rolling upgrade.
+type RollingUpgradeStatusInfo struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // The status of the latest virtual machine scale set rolling upgrade.
+ Properties *RollingUpgradeStatusInfoProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// RollingUpgradeStatusInfoProperties - The status of the latest virtual machine scale set rolling upgrade.
+type RollingUpgradeStatusInfoProperties struct {
+ // READ-ONLY; Error details for this upgrade, if there are any.
+ Error *APIError
+
+ // READ-ONLY; The rolling upgrade policies applied for this upgrade.
+ Policy *RollingUpgradePolicy
+
+ // READ-ONLY; Information about the number of virtual machine instances in each upgrade state.
+ Progress *RollingUpgradeProgressInfo
+
+ // READ-ONLY; Information about the current running state of the overall upgrade.
+ RunningStatus *RollingUpgradeRunningStatus
+}
+
+// RunCommandDocument - Describes the properties of a Run Command.
+type RunCommandDocument struct {
+ // REQUIRED; The VM run command description.
+ Description *string
+
+ // REQUIRED; The VM run command id.
+ ID *string
+
+ // REQUIRED; The VM run command label.
+ Label *string
+
+ // REQUIRED; The Operating System type.
+ OSType *OperatingSystemTypes
+
+ // REQUIRED; The VM run command schema.
+ Schema *string
+
+ // REQUIRED; The script to be executed.
+ Script []*string
+
+ // The parameters used by the script.
+ Parameters []*RunCommandParameterDefinition
+}
+
+// RunCommandDocumentBase - Describes the properties of a Run Command metadata.
+type RunCommandDocumentBase struct {
+ // REQUIRED; The VM run command description.
+ Description *string
+
+ // REQUIRED; The VM run command id.
+ ID *string
+
+ // REQUIRED; The VM run command label.
+ Label *string
+
+ // REQUIRED; The Operating System type.
+ OSType *OperatingSystemTypes
+
+ // REQUIRED; The VM run command schema.
+ Schema *string
+}
+
+// RunCommandInput - Capture Virtual Machine parameters.
+type RunCommandInput struct {
+ // REQUIRED; The run command id.
+ CommandID *string
+
+ // The run command parameters.
+ Parameters []*RunCommandInputParameter
+
+ // Optional. The script to be executed. When this value is given, the given script will override the default script of the
+ // command.
+ Script []*string
+}
+
+// RunCommandInputParameter - Describes the properties of a run command parameter.
+type RunCommandInputParameter struct {
+ // REQUIRED; The run command parameter name.
+ Name *string
+
+ // REQUIRED; The run command parameter value.
+ Value *string
+}
+
+// RunCommandListResult - The List Virtual Machine operation response.
+type RunCommandListResult struct {
+ // REQUIRED; The list of virtual machine run commands.
+ Value []*RunCommandDocumentBase
+
+ // The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands.
+ NextLink *string
+}
+
+// RunCommandManagedIdentity - Contains clientId or objectId (use only one, not both) of a user-assigned managed identity
+// that has access to storage blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of
+// system-assigned identity. Make sure the Azure storage blob exists in case of scriptUri, and managed identity has been given
+// access to blob's container with 'Storage Blob Data Reader' role assignment
+// with scriptUri blob and 'Storage Blob Data Contributor' for Append blobs(outputBlobUri, errorBlobUri). In case of user
+// assigned identity, make sure you add it under VM's identity. For more info on
+// managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged.
+type RunCommandManagedIdentity struct {
+ // Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided.
+ ClientID *string
+
+ // Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided.
+ ObjectID *string
+}
+
+// RunCommandParameterDefinition - Describes the properties of a run command parameter.
+type RunCommandParameterDefinition struct {
+ // REQUIRED; The run command parameter name.
+ Name *string
+
+ // REQUIRED; The run command parameter type.
+ Type *string
+
+ // The run command parameter default value.
+ DefaultValue *string
+
+ // The run command parameter required.
+ Required *bool
+}
+
+type RunCommandResult struct {
+ // Run command operation response.
+ Value []*InstanceViewStatus
+}
+
+// SKU - Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set
+// is currently on, you need to deallocate the VMs in the scale set before you modify the
+// SKU name.
+type SKU struct {
+ // Specifies the number of virtual machines in the scale set.
+ Capacity *int64
+
+ // The sku name.
+ Name *string
+
+ // Specifies the tier of virtual machines in a scale set.
+ // Possible Values:
+ // Standard
+ // Basic
+ Tier *string
+}
+
+// SSHConfiguration - SSH configuration for Linux based VMs running on Azure
+type SSHConfiguration struct {
+ // The list of SSH public keys used to authenticate with linux based VMs.
+ PublicKeys []*SSHPublicKey
+}
+
+// SSHGenerateKeyPairInputParameters - Parameters for GenerateSshKeyPair.
+type SSHGenerateKeyPairInputParameters struct {
+ // The encryption type of the SSH keys to be generated. See SshEncryptionTypes for possible set of values. If not provided,
+ // will default to RSA
+ EncryptionType *SSHEncryptionTypes
+}
+
+// SSHPublicKey - Contains information about SSH certificate public key and the path on the Linux VM where the public key
+// is placed.
+type SSHPublicKey struct {
+ // SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa
+ // format. For creating ssh keys, see [Create SSH keys on Linux and Mac for
+ // Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
+ KeyData *string
+
+ // Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key
+ // is appended to the file. Example: /home/user/.ssh/authorized_keys
+ Path *string
+}
+
+// SSHPublicKeyGenerateKeyPairResult - Response from generation of an SSH key pair.
+type SSHPublicKeyGenerateKeyPairResult struct {
+ // REQUIRED; The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}
+ ID *string
+
+ // REQUIRED; Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is
+ // returned in RFC3447 format and should be treated as a secret.
+ PrivateKey *string
+
+ // REQUIRED; Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in
+ // ssh-rsa format.
+ PublicKey *string
+}
+
+// SSHPublicKeyResource - Specifies information about the SSH public key.
+type SSHPublicKeyResource struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // Properties of the SSH public key.
+ Properties *SSHPublicKeyResourceProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// SSHPublicKeyResourceProperties - Properties of the SSH public key.
+type SSHPublicKeyResourceProperties struct {
+ // SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the
+ // resource is created, the publicKey property will be populated when
+ // generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at
+ // least 2048-bit and in ssh-rsa format.
+ PublicKey *string
+}
+
+// SSHPublicKeyUpdateResource - Specifies information about the SSH public key.
+type SSHPublicKeyUpdateResource struct {
+ // Properties of the SSH public key.
+ Properties *SSHPublicKeyResourceProperties
+
+ // Resource tags
+ Tags map[string]*string
+}
+
+// SSHPublicKeysGroupListResult - The list SSH public keys operation response.
+type SSHPublicKeysGroupListResult struct {
+ // REQUIRED; The list of SSH public keys
+ Value []*SSHPublicKeyResource
+
+ // The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the next page of SSH public keys.
+ NextLink *string
+}
+
+// ScaleInPolicy - Describes a scale-in policy for a virtual machine scale set.
+type ScaleInPolicy struct {
+ // This property allows you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine
+ // scale set is being scaled-in.(Feature in Preview)
+ ForceDeletion *bool
+
+ // The rules to be followed when scaling-in a virtual machine scale set.
+ // Possible values are:
+ // Default When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal
+ // scale set. Then, it will be balanced across Fault Domains as far as possible.
+ // Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.
+ // OldestVM When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in
+ // will be chosen for removal. For zonal virtual machine scale sets, the
+ // scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will
+ // be chosen for removal.
+ // NewestVM When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in
+ // will be chosen for removal. For zonal virtual machine scale sets, the
+ // scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will
+ // be chosen for removal.
+ Rules []*VirtualMachineScaleSetScaleInRules
+}
+
+type ScheduledEventsAdditionalPublishingTargets struct {
+ // The configuration parameters used while creating eventGridAndResourceGraph Scheduled Event setting.
+ EventGridAndResourceGraph *EventGridAndResourceGraph
+}
+
+// ScheduledEventsPolicy - Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related
+// configurations.
+type ScheduledEventsPolicy struct {
+ // The configuration parameters used while publishing scheduledEventsAdditionalPublishingTargets.
+ ScheduledEventsAdditionalPublishingTargets *ScheduledEventsAdditionalPublishingTargets
+
+ // The configuration parameters used while creating userInitiatedReboot scheduled event setting creation.
+ UserInitiatedReboot *UserInitiatedReboot
+
+ // The configuration parameters used while creating userInitiatedRedeploy scheduled event setting creation.
+ UserInitiatedRedeploy *UserInitiatedRedeploy
+}
+
+type ScheduledEventsProfile struct {
+ // Specifies OS Image Scheduled Event related configurations.
+ OSImageNotificationProfile *OSImageNotificationProfile
+
+ // Specifies Terminate Scheduled Event related configurations.
+ TerminateNotificationProfile *TerminateNotificationProfile
+}
+
+// SecurityPostureReference - Specifies the security posture to be used in the scale set. Minimum api-version: 2023-03-01
+type SecurityPostureReference struct {
+ // REQUIRED; The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest
+ ID *string
+
+ // The list of virtual machine extension names to exclude when applying the security posture.
+ ExcludeExtensions []*string
+
+ // Whether the security posture can be overridden by the user.
+ IsOverridable *bool
+}
+
+// SecurityPostureReferenceUpdate - Specifies the security posture to be used in the scale set. Minimum api-version: 2023-03-01
+type SecurityPostureReferenceUpdate struct {
+ // The list of virtual machine extension names to exclude when applying the security posture.
+ ExcludeExtensions []*string
+
+ // The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|latest
+ ID *string
+
+ // Whether the security posture can be overridden by the user.
+ IsOverridable *bool
+}
+
+// SecurityProfile - Specifies the Security profile settings for the virtual machine or virtual machine scale set.
+type SecurityProfile struct {
+ // This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual
+ // machine scale set. This will enable the encryption for all the disks
+ // including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be disabled unless this
+ // property is set to true for the resource.
+ EncryptionAtHost *bool
+
+ // Specifies the Managed Identity used by ADE to get access token for keyvault operations.
+ EncryptionIdentity *EncryptionIdentity
+
+ // Specifies ProxyAgent settings while creating the virtual machine. Minimum api-version: 2024-03-01.
+ ProxyAgentSettings *ProxyAgentSettings
+
+ // Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The
+ // default behavior is: UefiSettings will not be enabled unless this property is
+ // set.
+ SecurityType *SecurityTypes
+
+ // Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version:
+ // 2020-12-01.
+ UefiSettings *UefiSettings
+}
+
+// ServiceArtifactReference - Specifies the service artifact reference id used to set same image version for all virtual machines
+// in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01
+type ServiceArtifactReference struct {
+ // The service artifact reference id in the form of
+ // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}
+ ID *string
+}
+
+type ShareInfoElement struct {
+ // READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
+ VMURI *string
+}
+
+// SharedGallery - Specifies information about the Shared Gallery that you want to create or update.
+type SharedGallery struct {
+ // The identifier information of shared gallery.
+ Identifier *SharedGalleryIdentifier
+
+ // Specifies the properties of a shared gallery
+ Properties *SharedGalleryProperties
+
+ // READ-ONLY; Resource location
+ Location *string
+
+ // READ-ONLY; Resource name
+ Name *string
+}
+
+// SharedGalleryDataDiskImage - This is the data disk image.
+type SharedGalleryDataDiskImage struct {
+ // REQUIRED; This property specifies the logical unit number of the data disk. This value is used to identify data disks within
+ // the Virtual Machine and therefore must be unique for each data disk attached to the
+ // Virtual Machine.
+ Lun *int32
+
+ // The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
+ HostCaching *SharedGalleryHostCaching
+
+ // READ-ONLY; This property indicates the size of the VHD to be created.
+ DiskSizeGB *int32
+}
+
+// SharedGalleryDiskImage - This is the disk image base class.
+type SharedGalleryDiskImage struct {
+ // The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
+ HostCaching *SharedGalleryHostCaching
+
+ // READ-ONLY; This property indicates the size of the VHD to be created.
+ DiskSizeGB *int32
+}
+
+// SharedGalleryIdentifier - The identifier information of shared gallery.
+type SharedGalleryIdentifier struct {
+ // The unique id of this shared gallery.
+ UniqueID *string
+}
+
+// SharedGalleryImage - Specifies information about the gallery image definition that you want to create or update.
+type SharedGalleryImage struct {
+ // The identifier information of shared gallery.
+ Identifier *SharedGalleryIdentifier
+
+ // Describes the properties of a gallery image definition.
+ Properties *SharedGalleryImageProperties
+
+ // READ-ONLY; Resource location
+ Location *string
+
+ // READ-ONLY; Resource name
+ Name *string
+}
+
+// SharedGalleryImageList - The List Shared Gallery Images operation response.
+type SharedGalleryImageList struct {
+ // REQUIRED; A list of shared gallery images.
+ Value []*SharedGalleryImage
+
+ // The uri to fetch the next page of shared gallery images. Call ListNext() with this to fetch the next page of shared gallery
+ // images.
+ NextLink *string
+}
+
+// SharedGalleryImageProperties - Describes the properties of a gallery image definition.
+type SharedGalleryImageProperties struct {
+ // REQUIRED; This is the gallery image definition identifier.
+ Identifier *GalleryImageIdentifier
+
+ // REQUIRED; This property allows the user to specify whether the virtual machines created under this image are 'Generalized'
+ // or 'Specialized'.
+ OSState *OperatingSystemStateTypes
+
+ // REQUIRED; This property allows you to specify the type of the OS that is included in the disk when creating a VM from a
+ // managed image. Possible values are: Windows, Linux.
+ OSType *OperatingSystemTypes
+
+ // The architecture of the image. Applicable to OS disks only.
+ Architecture *Architecture
+
+ // The artifact tags of a shared gallery resource.
+ ArtifactTags map[string]*string
+
+ // Describes the disallowed disk types.
+ Disallowed *Disallowed
+
+ // The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property
+ // is updatable.
+ EndOfLifeDate *time.Time
+
+ // End-user license agreement for the current community gallery image.
+ Eula *string
+
+ // A list of gallery image features.
+ Features []*GalleryImageFeature
+
+ // The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
+ HyperVGeneration *HyperVGeneration
+
+ // Privacy statement uri for the current community gallery image.
+ PrivacyStatementURI *string
+
+ // Describes the gallery image definition purchase plan. This is used by marketplace images.
+ PurchasePlan *ImagePurchasePlan
+
+ // The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.
+ Recommended *RecommendedMachineConfiguration
+}
+
+// SharedGalleryImageVersion - Specifies information about the gallery image version that you want to create or update.
+type SharedGalleryImageVersion struct {
+ // The identifier information of shared gallery.
+ Identifier *SharedGalleryIdentifier
+
+ // Describes the properties of a gallery image version.
+ Properties *SharedGalleryImageVersionProperties
+
+ // READ-ONLY; Resource location
+ Location *string
+
+ // READ-ONLY; Resource name
+ Name *string
+}
+
+// SharedGalleryImageVersionList - The List Shared Gallery Image versions operation response.
+type SharedGalleryImageVersionList struct {
+ // REQUIRED; A list of shared gallery images versions.
+ Value []*SharedGalleryImageVersion
+
+ // The uri to fetch the next page of shared gallery image versions. Call ListNext() with this to fetch the next page of shared
+ // gallery image versions.
+ NextLink *string
+}
+
+// SharedGalleryImageVersionProperties - Describes the properties of a gallery image version.
+type SharedGalleryImageVersionProperties struct {
+ // The artifact tags of a shared gallery resource.
+ ArtifactTags map[string]*string
+
+ // The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This
+ // property is updatable.
+ EndOfLifeDate *time.Time
+
+ // If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
+ ExcludeFromLatest *bool
+
+ // The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This
+ // property is updatable.
+ PublishedDate *time.Time
+
+ // Describes the storage profile of the image version.
+ StorageProfile *SharedGalleryImageVersionStorageProfile
+}
+
+// SharedGalleryImageVersionStorageProfile - This is the storage profile of a Gallery Image Version.
+type SharedGalleryImageVersionStorageProfile struct {
+ // A list of data disk images.
+ DataDiskImages []*SharedGalleryDataDiskImage
+
+ // This is the OS disk image.
+ OSDiskImage *SharedGalleryOSDiskImage
+}
+
+// SharedGalleryList - The List Shared Galleries operation response.
+type SharedGalleryList struct {
+ // REQUIRED; A list of shared galleries.
+ Value []*SharedGallery
+
+ // The uri to fetch the next page of shared galleries. Call ListNext() with this to fetch the next page of shared galleries.
+ NextLink *string
+}
+
+// SharedGalleryOSDiskImage - This is the OS disk image.
+type SharedGalleryOSDiskImage struct {
+ // The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'
+ HostCaching *SharedGalleryHostCaching
+
+ // READ-ONLY; This property indicates the size of the VHD to be created.
+ DiskSizeGB *int32
+}
+
+// SharedGalleryProperties - Specifies the properties of a shared gallery
+type SharedGalleryProperties struct {
+ // READ-ONLY; The artifact tags of a shared gallery resource.
+ ArtifactTags map[string]*string
+}
+
+// SharingProfile - Profile for gallery sharing to subscription or tenant
+type SharingProfile struct {
+ // Information of community gallery if current gallery is shared to community.
+ CommunityGalleryInfo *CommunityGalleryInfo
+
+ // This property allows you to specify the permission of sharing gallery. Possible values are: Private, Groups, Community.
+ Permissions *GallerySharingPermissionTypes
+
+ // READ-ONLY; A list of sharing profile groups.
+ Groups []*SharingProfileGroup
+}
+
+// SharingProfileGroup - Group of the gallery sharing profile
+type SharingProfileGroup struct {
+ // A list of subscription/tenant ids the gallery is aimed to be shared to.
+ IDs []*string
+
+ // This property allows you to specify the type of sharing group. Possible values are: Subscriptions, AADTenants.
+ Type *SharingProfileGroupTypes
+}
+
+// SharingStatus - Sharing status of current gallery.
+type SharingStatus struct {
+ // Summary of all regional sharing status.
+ Summary []*RegionalSharingStatus
+
+ // READ-ONLY; Aggregated sharing state of current gallery.
+ AggregatedState *SharingState
+}
+
+// SharingUpdate - Specifies information about the gallery sharing profile update.
+type SharingUpdate struct {
+ // REQUIRED; This property allows you to specify the operation type of gallery sharing update. Possible values are: Add, Remove,
+ // Reset.
+ OperationType *SharingUpdateOperationTypes
+
+ // A list of sharing profile groups.
+ Groups []*SharingProfileGroup
+}
+
+// Snapshot resource.
+type Snapshot struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // The extended location where the snapshot will be created. Extended location cannot be changed.
+ ExtendedLocation *ExtendedLocation
+
+ // Snapshot resource properties.
+ Properties *SnapshotProperties
+
+ // The snapshots sku name. Can be StandardLRS, PremiumLRS, or Standard_ZRS. This is an optional parameter for incremental
+ // snapshot and the default behavior is the SKU will be set to the same sku as the
+ // previous snapshot
+ SKU *SnapshotSKU
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Unused. Always Null.
+ ManagedBy *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// SnapshotList - The List Snapshots operation response.
+type SnapshotList struct {
+ // REQUIRED; A list of snapshots.
+ Value []*Snapshot
+
+ // The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
+ NextLink *string
+}
+
+// SnapshotProperties - Snapshot resource properties.
+type SnapshotProperties struct {
+ // REQUIRED; Disk source information. CreationData information cannot be changed after the disk has been created.
+ CreationData *CreationData
+
+ // Percentage complete for the background copy when a resource is created via the CopyStart operation.
+ CompletionPercent *float32
+
+ // Indicates the error details if the background copy of a resource created via the CopyStart operation fails.
+ CopyCompletionError *CopyCompletionError
+
+ // Additional authentication requirements when exporting or uploading to a disk or snapshot.
+ DataAccessAuthMode *DataAccessAuthMode
+
+ // ARM id of the DiskAccess resource for using private endpoints on disks.
+ DiskAccessID *string
+
+ // If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this
+ // field is present for updates or creation with other options, it indicates a
+ // resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
+ DiskSizeGB *int32
+
+ // Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption
+
+ // Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
+ EncryptionSettingsCollection *EncryptionSettingsCollection
+
+ // The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
+ HyperVGeneration *HyperVGeneration
+
+ // Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can
+ // be diffed.
+ Incremental *bool
+
+ // Policy for accessing the disk via network.
+ NetworkAccessPolicy *NetworkAccessPolicy
+
+ // The Operating System type.
+ OSType *OperatingSystemTypes
+
+ // Policy for controlling export on the disk.
+ PublicNetworkAccess *PublicNetworkAccess
+
+ // Purchase plan information for the image from which the source disk for the snapshot was originally created.
+ PurchasePlan *DiskPurchasePlan
+
+ // Contains the security related information for the resource.
+ SecurityProfile *DiskSecurityProfile
+
+ // List of supported capabilities for the image from which the source disk from the snapshot was originally created.
+ SupportedCapabilities *SupportedCapabilities
+
+ // Indicates the OS on a snapshot supports hibernation.
+ SupportsHibernation *bool
+
+ // READ-ONLY; The size of the disk in bytes. This field is read only.
+ DiskSizeBytes *int64
+
+ // READ-ONLY; The state of the snapshot.
+ DiskState *DiskState
+
+ // READ-ONLY; Incremental snapshots for a disk share an incremental snapshot family id. The Get Page Range Diff API can only
+ // be called on incremental snapshots with the same family id.
+ IncrementalSnapshotFamilyID *string
+
+ // READ-ONLY; The disk provisioning state.
+ ProvisioningState *string
+
+ // READ-ONLY; The time when the snapshot was created.
+ TimeCreated *time.Time
+
+ // READ-ONLY; Unique Guid identifying the resource.
+ UniqueID *string
+}
+
+// SnapshotSKU - The snapshots sku name. Can be StandardLRS, PremiumLRS, or Standard_ZRS. This is an optional parameter for
+// incremental snapshot and the default behavior is the SKU will be set to the same sku as the
+// previous snapshot
+type SnapshotSKU struct {
+ // The sku name.
+ Name *SnapshotStorageAccountTypes
+
+ // READ-ONLY; The sku tier.
+ Tier *string
+}
+
+// SnapshotUpdate - Snapshot update resource.
+type SnapshotUpdate struct {
+ // Snapshot resource update properties.
+ Properties *SnapshotUpdateProperties
+
+ // The snapshots sku name. Can be StandardLRS, PremiumLRS, or Standard_ZRS. This is an optional parameter for incremental
+ // snapshot and the default behavior is the SKU will be set to the same sku as the
+ // previous snapshot
+ SKU *SnapshotSKU
+
+ // Resource tags
+ Tags map[string]*string
+}
+
+// SnapshotUpdateProperties - Snapshot resource update properties.
+type SnapshotUpdateProperties struct {
+ // Additional authentication requirements when exporting or uploading to a disk or snapshot.
+ DataAccessAuthMode *DataAccessAuthMode
+
+ // ARM id of the DiskAccess resource for using private endpoints on disks.
+ DiskAccessID *string
+
+ // If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this
+ // field is present for updates or creation with other options, it indicates a
+ // resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
+ DiskSizeGB *int32
+
+ // Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption
+
+ // Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
+ EncryptionSettingsCollection *EncryptionSettingsCollection
+
+ // Policy for accessing the disk via network.
+ NetworkAccessPolicy *NetworkAccessPolicy
+
+ // the Operating System type.
+ OSType *OperatingSystemTypes
+
+ // Policy for controlling export on the disk.
+ PublicNetworkAccess *PublicNetworkAccess
+
+ // List of supported capabilities for the image from which the OS disk was created.
+ SupportedCapabilities *SupportedCapabilities
+
+ // Indicates the OS on a snapshot supports hibernation.
+ SupportsHibernation *bool
+}
+
+// SoftDeletePolicy - Contains information about the soft deletion policy of the gallery.
+type SoftDeletePolicy struct {
+ // Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time.
+ IsSoftDeleteEnabled *bool
+}
+
+// SourceVault - The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}
+type SourceVault struct {
+ // Resource Id
+ ID *string
+}
+
+// SpotRestorePolicy - Specifies the Spot-Try-Restore properties for the virtual machine scale set. With this property customer
+// can enable or disable automatic restore of the evicted Spot VMSS VM instances opportunistically
+// based on capacity availability and pricing constraint.
+type SpotRestorePolicy struct {
+ // Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based
+ // on capacity availability and pricing constraints
+ Enabled *bool
+
+ // Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances
+ RestoreTimeout *string
+}
+
+// StatusCodeCount - The status code and count of the cloud service instance view statuses
+type StatusCodeCount struct {
+ // READ-ONLY; The instance view status code
+ Code *string
+
+ // READ-ONLY; Number of instances having this status code
+ Count *int32
+}
+
+// StorageProfile - Specifies the storage settings for the virtual machine disks.
+type StorageProfile struct {
+ // Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see About
+ // disks and VHDs for Azure virtual machines
+ // [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview].
+ DataDisks []*DataDisk
+
+ // Specifies the disk controller type configured for the VM. Note: This property will be set to the default disk controller
+ // type if not specified provided virtual machine is being created with
+ // 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified
+ // minimum api version. You need to deallocate the VM before updating its disk
+ // controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates
+ // the VM. Minimum api-version: 2022-08-01.
+ DiskControllerType *DiskControllerTypes
+
+ // Specifies information about the image to use. You can specify information about platform images, marketplace images, or
+ // virtual machine images. This element is required when you want to use a platform
+ // image, marketplace image, or virtual machine image, but is not used in other creation operations.
+ ImageReference *ImageReference
+
+ // Specifies information about the operating system disk used by the virtual machine. For more information about disks, see
+ // About disks and VHDs for Azure virtual machines
+ // [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview].
+ OSDisk *OSDisk
+}
+
+type SubResource struct {
+ // Resource Id
+ ID *string
+}
+
+type SubResourceReadOnly struct {
+ // READ-ONLY; Resource Id
+ ID *string
+}
+
+type SubResourceWithColocationStatus struct {
+ // Describes colocation status of a resource in the Proximity Placement Group.
+ ColocationStatus *InstanceViewStatus
+
+ // Resource Id
+ ID *string
+}
+
+// SupportedCapabilities - List of supported capabilities persisted on the disk resource for VM use.
+type SupportedCapabilities struct {
+ // True if the image from which the OS disk is created supports accelerated networking.
+ AcceleratedNetwork *bool
+
+ // CPU architecture supported by an OS disk.
+ Architecture *Architecture
+
+ // The disk controllers that an OS disk supports. If set it can be SCSI or SCSI, NVME or NVME, SCSI.
+ DiskControllerTypes *string
+}
+
+// SystemData - The system meta data relating to this resource.
+type SystemData struct {
+ // READ-ONLY; Specifies the time in UTC at which the Cloud Service (extended support) resource was created.
+ // Minimum api-version: 2022-04-04.
+ CreatedAt *time.Time
+
+ // READ-ONLY; Specifies the time in UTC at which the Cloud Service (extended support) resource was last modified.
+ // Minimum api-version: 2022-04-04.
+ LastModifiedAt *time.Time
+}
+
+// TargetRegion - Describes the target region information.
+type TargetRegion struct {
+ // REQUIRED; The name of the region.
+ Name *string
+
+ // Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.
+ Encryption *EncryptionImages
+
+ // Contains the flag setting to hide an image when users specify version='latest'
+ ExcludeFromLatest *bool
+
+ // The number of replicas of the Image Version to be created per region. This property is updatable.
+ RegionalReplicaCount *int32
+
+ // Specifies the storage account type to be used to store the image. This property is not updatable.
+ StorageAccountType *StorageAccountType
+}
+
+type TerminateNotificationProfile struct {
+ // Specifies whether the Terminate Scheduled event is enabled or disabled.
+ Enable *bool
+
+ // Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event
+ // before the event is auto approved (timed out). The configuration must be
+ // specified in ISO 8601 format, the default value is 5 minutes (PT5M)
+ NotBeforeTimeout *string
+}
+
+// ThrottledRequestsInput - Api request input for LogAnalytics getThrottledRequests Api.
+type ThrottledRequestsInput struct {
+ // REQUIRED; SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
+ BlobContainerSasURI *string
+
+ // REQUIRED; From time of the query
+ FromTime *time.Time
+
+ // REQUIRED; To time of the query
+ ToTime *time.Time
+
+ // Group query result by Client Application ID.
+ GroupByClientApplicationID *bool
+
+ // Group query result by Operation Name.
+ GroupByOperationName *bool
+
+ // Group query result by Resource Name.
+ GroupByResourceName *bool
+
+ // Group query result by Throttle Policy applied.
+ GroupByThrottlePolicy *bool
+
+ // Group query result by User Agent.
+ GroupByUserAgent *bool
+}
+
+// UefiKey - A UEFI key signature.
+type UefiKey struct {
+ // The type of key signature.
+ Type *UefiKeyType
+
+ // The value of the key signature.
+ Value []*string
+}
+
+// UefiKeySignatures - Additional UEFI key signatures that will be added to the image in addition to the signature templates
+type UefiKeySignatures struct {
+ // The database of UEFI keys for this image version.
+ Db []*UefiKey
+
+ // The database of revoked UEFI keys for this image version.
+ Dbx []*UefiKey
+
+ // The Key Encryption Keys of this image version.
+ Kek []*UefiKey
+
+ // The Platform Key of this image version.
+ Pk *UefiKey
+}
+
+// UefiSettings - Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum
+// api-version: 2020-12-01.
+type UefiSettings struct {
+ // Specifies whether secure boot should be enabled on the virtual machine. Minimum api-version: 2020-12-01.
+ SecureBootEnabled *bool
+
+ // Specifies whether vTPM should be enabled on the virtual machine. Minimum api-version: 2020-12-01.
+ VTpmEnabled *bool
+}
+
+// UpdateDomain - Defines an update domain for the cloud service.
+type UpdateDomain struct {
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource Name
+ Name *string
+}
+
+// UpdateDomainListResult - The list operation result.
+type UpdateDomainListResult struct {
+ // REQUIRED; The list of resources.
+ Value []*UpdateDomain
+
+ // The URI to fetch the next page of resources. Use this to get the next page of resources. Do this till nextLink is null
+ // to fetch all the resources.
+ NextLink *string
+}
+
+// UpdateResource - The Update Resource model definition.
+type UpdateResource struct {
+ // Resource tags
+ Tags map[string]*string
+}
+
+// UpdateResourceDefinition - The Update Resource model definition.
+type UpdateResourceDefinition struct {
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// UpgradeOperationHistoricalStatusInfo - Virtual Machine Scale Set OS Upgrade History operation response.
+type UpgradeOperationHistoricalStatusInfo struct {
+ // READ-ONLY; Resource location
+ Location *string
+
+ // READ-ONLY; Information about the properties of the upgrade operation.
+ Properties *UpgradeOperationHistoricalStatusInfoProperties
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// UpgradeOperationHistoricalStatusInfoProperties - Describes each OS upgrade on the Virtual Machine Scale Set.
+type UpgradeOperationHistoricalStatusInfoProperties struct {
+ // READ-ONLY; Error Details for this upgrade if there are any.
+ Error *APIError
+
+ // READ-ONLY; Counts of the VMs in each state.
+ Progress *RollingUpgradeProgressInfo
+
+ // READ-ONLY; Information about OS rollback if performed
+ RollbackInfo *RollbackStatusInfo
+
+ // READ-ONLY; Information about the overall status of the upgrade operation.
+ RunningStatus *UpgradeOperationHistoryStatus
+
+ // READ-ONLY; Invoker of the Upgrade Operation
+ StartedBy *UpgradeOperationInvoker
+
+ // READ-ONLY; Image Reference details
+ TargetImageReference *ImageReference
+}
+
+// UpgradeOperationHistoryStatus - Information about the current running state of the overall upgrade.
+type UpgradeOperationHistoryStatus struct {
+ // READ-ONLY; Code indicating the current status of the upgrade.
+ Code *UpgradeState
+
+ // READ-ONLY; End time of the upgrade.
+ EndTime *time.Time
+
+ // READ-ONLY; Start time of the upgrade.
+ StartTime *time.Time
+}
+
+// UpgradePolicy - Describes an upgrade policy - automatic, manual, or rolling.
+type UpgradePolicy struct {
+ // Configuration parameters used for performing automatic OS Upgrade.
+ AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy
+
+ // Specifies the mode of an upgrade to virtual machines in the scale set.
+ // Possible values are:
+ // Manual - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade
+ // action.
+ // Automatic - All virtual machines in the scale set are automatically updated at the same time.
+ Mode *UpgradeMode
+
+ // The configuration parameters used while performing a rolling upgrade.
+ RollingUpgradePolicy *RollingUpgradePolicy
+}
+
+// Usage - Describes Compute Resource Usage.
+type Usage struct {
+ // REQUIRED; The current usage of the resource.
+ CurrentValue *int32
+
+ // REQUIRED; The maximum permitted usage of the resource.
+ Limit *int64
+
+ // REQUIRED; The name of the type of usage.
+ Name *UsageName
+
+ // REQUIRED; An enum describing the unit of usage measurement.
+ Unit *string
+}
+
+// UsageName - The Usage Names.
+type UsageName struct {
+ // The localized name of the resource.
+ LocalizedValue *string
+
+ // The name of the resource.
+ Value *string
+}
+
+type UserArtifactManage struct {
+ // REQUIRED; Required. The path and arguments to install the gallery application. This is limited to 4096 characters.
+ Install *string
+
+ // REQUIRED; Required. The path and arguments to remove the gallery application. This is limited to 4096 characters.
+ Remove *string
+
+ // Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove
+ // command on the previous version and install command on the current version
+ // of the gallery application. This is limited to 4096 characters.
+ Update *string
+}
+
+// UserArtifactSettings - Additional settings for the VM app that contains the target package and config file name when it
+// is deployed to target VM or VM scale set.
+type UserArtifactSettings struct {
+ // Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified,
+ // the config file will be named the Gallery Application name appended with
+ // "_config".
+ ConfigFileName *string
+
+ // Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified,
+ // the package file will be named the same as the Gallery Application name.
+ PackageFileName *string
+}
+
+// UserArtifactSource - The source image from which the Image Version is going to be created.
+type UserArtifactSource struct {
+ // REQUIRED; Required. The mediaLink of the artifact, must be a readable storage page blob.
+ MediaLink *string
+
+ // Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob.
+ DefaultConfigurationLink *string
+}
+
+type UserAssignedIdentitiesValue struct {
+ // READ-ONLY; The client id of user assigned identity.
+ ClientID *string
+
+ // READ-ONLY; The principal id of user assigned identity.
+ PrincipalID *string
+}
+
+// UserInitiatedReboot - Specifies Reboot related Scheduled Event related configurations.
+type UserInitiatedReboot struct {
+ // Specifies Reboot Scheduled Event related configurations.
+ AutomaticallyApprove *bool
+}
+
+// UserInitiatedRedeploy - Specifies Redeploy related Scheduled Event related configurations.
+type UserInitiatedRedeploy struct {
+ // Specifies Redeploy Scheduled Event related configurations.
+ AutomaticallyApprove *bool
+}
+
+// VMDiskSecurityProfile - Specifies the security profile settings for the managed disk. Note: It can only be set for Confidential
+// VMs.
+type VMDiskSecurityProfile struct {
+ // Specifies the customer managed disk encryption set resource id for the managed disk that is used for Customer Managed Key
+ // encrypted ConfidentialVM OS Disk and VMGuest blob.
+ DiskEncryptionSet *DiskEncryptionSetParameters
+
+ // Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk
+ // along with VMGuestState blob, VMGuestStateOnly for encryption of just the
+ // VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the VMGuestState blob.. Note: It can be set
+ // for only Confidential VMs.
+ SecurityEncryptionType *SecurityEncryptionTypes
+}
+
+// VMGalleryApplication - Specifies the required information to reference a compute gallery application version
+type VMGalleryApplication struct {
+ // REQUIRED; Specifies the GalleryApplicationVersion resource id on the form of
+ // /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}
+ PackageReferenceID *string
+
+ // Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided
+ ConfigurationReference *string
+
+ // If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated for the
+ // VM/VMSS
+ EnableAutomaticUpgrade *bool
+
+ // Optional, Specifies the order in which the packages have to be installed
+ Order *int32
+
+ // Optional, Specifies a passthrough value for more generic context.
+ Tags *string
+
+ // Optional, If true, any failure for any operation in the VmApplication will fail the deployment
+ TreatFailureAsDeploymentFailure *bool
+}
+
+// VMImagesInEdgeZoneListResult - The List VmImages in EdgeZone operation response.
+type VMImagesInEdgeZoneListResult struct {
+ // The URI to fetch the next page of VMImages in EdgeZone. Call ListNext() with this URI to fetch the next page of VmImages.
+ NextLink *string
+
+ // The list of VMImages in EdgeZone
+ Value []*VirtualMachineImageResource
+}
+
+type VMScaleSetConvertToSinglePlacementGroupInput struct {
+ // Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id,
+ // please use Virtual Machine Scale Set VMs - Get API. If not provided, the
+ // platform will choose one with maximum number of virtual machine instances.
+ ActivePlacementGroupID *string
+}
+
+// VMSizeProperties - Specifies VM Size Property settings on the virtual machine.
+type VMSizeProperties struct {
+ // Specifies the number of vCPUs available for the VM. When this property is not specified in the request body the default
+ // behavior is to set it to the value of vCPUs available for that VM size exposed
+ // in api response of List all available virtual machine sizes in a region [https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list].
+ VCPUsAvailable *int32
+
+ // Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default behavior
+ // is set to the value of vCPUsPerCore for the VM Size exposed in api response of
+ // List all available virtual machine sizes in a region [https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list].
+ // Setting this property to 1 also means that hyper-threading is disabled.
+ VCPUsPerCore *int32
+}
+
+// VaultCertificate - Describes a single certificate reference in a Key Vault, and where the certificate should reside on
+// the VM.
+type VaultCertificate struct {
+ // For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified
+ // certificate store is implicitly in the LocalMachine account. For Linux
+ // VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name .crt
+ // for the X509 certificate file and .prv for private key. Both
+ // of these files are .pem formatted.
+ CertificateStore *string
+
+ // This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault,
+ // see Add a key or secret to the key vault
+ // [https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add]. In this case, your certificate needs to be It
+ // is the Base64 encoding of the following JSON Object which is encoded in UTF-8:
+ // {
+ // "data":"",
+ // "dataType":"pfx",
+ // "password":""
+ // }
+ // To install certificates on a virtual machine it is recommended to use the Azure Key Vault virtual machine extension for
+ // Linux
+ // [https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux] or the Azure Key Vault virtual machine extension
+ // for Windows
+ // [https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows].
+ CertificateURL *string
+}
+
+// VaultSecretGroup - Describes a set of certificates which are all in the same Key Vault.
+type VaultSecretGroup struct {
+ // The relative URL of the Key Vault containing all of the certificates in VaultCertificates.
+ SourceVault *SubResource
+
+ // The list of key vault references in SourceVault which contain certificates.
+ VaultCertificates []*VaultCertificate
+}
+
+// VirtualHardDisk - Describes the uri of a disk.
+type VirtualHardDisk struct {
+ // Specifies the virtual hard disk's uri.
+ URI *string
+}
+
+// VirtualMachine - Describes a Virtual Machine.
+type VirtualMachine struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // The extended location of the Virtual Machine.
+ ExtendedLocation *ExtendedLocation
+
+ // The identity of the virtual machine, if configured.
+ Identity *VirtualMachineIdentity
+
+ // Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace
+ // images. Before you can use a marketplace image from an API, you must
+ // enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click
+ // Want to deploy programmatically, Get Started ->. Enter any required
+ // information and then click Save.
+ Plan *Plan
+
+ // Describes the properties of a Virtual Machine.
+ Properties *VirtualMachineProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // The virtual machine zones.
+ Zones []*string
+
+ // READ-ONLY; Etag is property returned in Create/Update/Get response of the VM, so that customer can supply it in the header
+ // to ensure optimistic updates.
+ Etag *string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; ManagedBy is set to Virtual Machine Scale Set(VMSS) flex ARM resourceID, if the VM is part of the VMSS. This
+ // property is used by platform for internal resource group delete optimization.
+ ManagedBy *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; The virtual machine child extension resources.
+ Resources []*VirtualMachineExtension
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// VirtualMachineAgentInstanceView - The instance view of the VM Agent running on the virtual machine.
+type VirtualMachineAgentInstanceView struct {
+ // The virtual machine extension handler instance view.
+ ExtensionHandlers []*VirtualMachineExtensionHandlerInstanceView
+
+ // The resource status information.
+ Statuses []*InstanceViewStatus
+
+ // The VM Agent full version.
+ VMAgentVersion *string
+}
+
+// VirtualMachineAssessPatchesResult - Describes the properties of an AssessPatches result.
+type VirtualMachineAssessPatchesResult struct {
+ // READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension
+ // logs.
+ AssessmentActivityID *string
+
+ // READ-ONLY; The list of patches that have been detected as available for installation.
+ AvailablePatches []*VirtualMachineSoftwarePatchProperties
+
+ // READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed.
+ CriticalAndSecurityPatchCount *int32
+
+ // READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
+ Error *APIError
+
+ // READ-ONLY; The number of all available patches excluding critical and security.
+ OtherPatchCount *int32
+
+ // READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete
+ // installation but the reboot has not yet occurred.
+ RebootPending *bool
+
+ // READ-ONLY; The UTC timestamp when the operation began.
+ StartDateTime *time.Time
+
+ // READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes.
+ // At that point it will become "Unknown", "Failed", "Succeeded", or
+ // "CompletedWithWarnings."
+ Status *PatchOperationStatus
+}
+
+// VirtualMachineCaptureParameters - Capture Virtual Machine parameters.
+type VirtualMachineCaptureParameters struct {
+ // REQUIRED; The destination container name.
+ DestinationContainerName *string
+
+ // REQUIRED; Specifies whether to overwrite the destination virtual hard disk, in case of conflict.
+ OverwriteVhds *bool
+
+ // REQUIRED; The captured virtual hard disk's name prefix.
+ VhdPrefix *string
+}
+
+// VirtualMachineCaptureResult - Output of virtual machine capture operation.
+type VirtualMachineCaptureResult struct {
+ // Resource Id
+ ID *string
+
+ // READ-ONLY; the version of the content
+ ContentVersion *string
+
+ // READ-ONLY; parameters of the captured virtual machine
+ Parameters any
+
+ // READ-ONLY; a list of resource items of the captured virtual machine
+ Resources []any
+
+ // READ-ONLY; the schema of the captured virtual machine
+ Schema *string
+}
+
+// VirtualMachineExtension - Describes a Virtual Machine Extension.
+type VirtualMachineExtension struct {
+ // Resource location
+ Location *string
+
+ // Describes the properties of a Virtual Machine Extension.
+ Properties *VirtualMachineExtensionProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// VirtualMachineExtensionHandlerInstanceView - The instance view of a virtual machine extension handler.
+type VirtualMachineExtensionHandlerInstanceView struct {
+ // The extension handler status.
+ Status *InstanceViewStatus
+
+ // Specifies the type of the extension; an example is "CustomScriptExtension".
+ Type *string
+
+ // Specifies the version of the script handler.
+ TypeHandlerVersion *string
+}
+
+// VirtualMachineExtensionImage - Describes a Virtual Machine Extension Image.
+type VirtualMachineExtensionImage struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // Describes the properties of a Virtual Machine Extension Image.
+ Properties *VirtualMachineExtensionImageProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// VirtualMachineExtensionImageProperties - Describes the properties of a Virtual Machine Extension Image.
+type VirtualMachineExtensionImageProperties struct {
+ // REQUIRED; The type of role (IaaS or PaaS) this extension supports.
+ ComputeRole *string
+
+ // REQUIRED; The schema defined by publisher, where extension consumers should provide settings in a matching schema.
+ HandlerSchema *string
+
+ // REQUIRED; The operating system this extension supports.
+ OperatingSystem *string
+
+ // Whether the handler can support multiple extensions.
+ SupportsMultipleExtensions *bool
+
+ // Whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there
+ // might be cases where a publisher wants to explicitly indicate the extension is
+ // only enabled for CRP VMs but not VMSS.
+ VMScaleSetEnabled *bool
+}
+
+// VirtualMachineExtensionInstanceView - The instance view of a virtual machine extension.
+type VirtualMachineExtensionInstanceView struct {
+ // The virtual machine extension name.
+ Name *string
+
+ // The resource status information.
+ Statuses []*InstanceViewStatus
+
+ // The resource status information.
+ Substatuses []*InstanceViewStatus
+
+ // Specifies the type of the extension; an example is "CustomScriptExtension".
+ Type *string
+
+ // Specifies the version of the script handler.
+ TypeHandlerVersion *string
+}
+
+// VirtualMachineExtensionProperties - Describes the properties of a Virtual Machine Extension.
+type VirtualMachineExtensionProperties struct {
+ // Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed,
+ // however, the extension will not upgrade minor versions unless redeployed, even
+ // with this property set to true.
+ AutoUpgradeMinorVersion *bool
+
+ // Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension
+ // available.
+ EnableAutomaticUpgrade *bool
+
+ // How the extension handler should be forced to update even if the extension configuration has not changed.
+ ForceUpdateTag *string
+
+ // The virtual machine extension instance view.
+ InstanceView *VirtualMachineExtensionInstanceView
+
+ // The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
+ ProtectedSettings any
+
+ // The extensions protected settings that are passed by reference, and consumed from key vault
+ ProtectedSettingsFromKeyVault *KeyVaultSecretReference
+
+ // Collection of extension names after which this extension needs to be provisioned.
+ ProvisionAfterExtensions []*string
+
+ // The name of the extension handler publisher.
+ Publisher *string
+
+ // Json formatted public settings for the extension.
+ Settings any
+
+ // Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting
+ // to the VM will not be suppressed regardless of this value). The default is false.
+ SuppressFailures *bool
+
+ // Specifies the type of the extension; an example is "CustomScriptExtension".
+ Type *string
+
+ // Specifies the version of the script handler.
+ TypeHandlerVersion *string
+
+ // READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string
+}
+
+// VirtualMachineExtensionUpdate - Describes a Virtual Machine Extension.
+type VirtualMachineExtensionUpdate struct {
+ // Describes the properties of a Virtual Machine Extension.
+ Properties *VirtualMachineExtensionUpdateProperties
+
+ // Resource tags
+ Tags map[string]*string
+}
+
+// VirtualMachineExtensionUpdateProperties - Describes the properties of a Virtual Machine Extension.
+type VirtualMachineExtensionUpdateProperties struct {
+ // Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed,
+ // however, the extension will not upgrade minor versions unless redeployed, even
+ // with this property set to true.
+ AutoUpgradeMinorVersion *bool
+
+ // Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension
+ // available.
+ EnableAutomaticUpgrade *bool
+
+ // How the extension handler should be forced to update even if the extension configuration has not changed.
+ ForceUpdateTag *string
+
+ // The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
+ ProtectedSettings any
+
+ // The extensions protected settings that are passed by reference, and consumed from key vault
+ ProtectedSettingsFromKeyVault *KeyVaultSecretReference
+
+ // The name of the extension handler publisher.
+ Publisher *string
+
+ // Json formatted public settings for the extension.
+ Settings any
+
+ // Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting
+ // to the VM will not be suppressed regardless of this value). The default is false.
+ SuppressFailures *bool
+
+ // Specifies the type of the extension; an example is "CustomScriptExtension".
+ Type *string
+
+ // Specifies the version of the script handler.
+ TypeHandlerVersion *string
+}
+
+// VirtualMachineExtensionsListResult - The List Extension operation response
+type VirtualMachineExtensionsListResult struct {
+ // The list of extensions
+ Value []*VirtualMachineExtension
+}
+
+// VirtualMachineHealthStatus - The health status of the VM.
+type VirtualMachineHealthStatus struct {
+ // READ-ONLY; The health status information for the VM.
+ Status *InstanceViewStatus
+}
+
+// VirtualMachineIPTag - Contains the IP tag associated with the public IP address.
+type VirtualMachineIPTag struct {
+ // IP tag type. Example: FirstPartyUsage.
+ IPTagType *string
+
+ // IP tag associated with the public IP. Example: SQL, Storage etc.
+ Tag *string
+}
+
+// VirtualMachineIdentity - Identity for the virtual machine.
+type VirtualMachineIdentity struct {
+ // The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly
+ // created identity and a set of user assigned identities. The type 'None' will
+ // remove any identities from the virtual machine.
+ Type *ResourceIdentityType
+
+ // The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM
+ // resource ids in the form:
+ // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ UserAssignedIdentities map[string]*UserAssignedIdentitiesValue
+
+ // READ-ONLY; The principal id of virtual machine identity. This property will only be provided for a system assigned identity.
+ PrincipalID *string
+
+ // READ-ONLY; The tenant id associated with the virtual machine. This property will only be provided for a system assigned
+ // identity.
+ TenantID *string
+}
+
+// VirtualMachineImage - Describes a Virtual Machine Image.
+type VirtualMachineImage struct {
+ // REQUIRED; The supported Azure location of the resource.
+ Location *string
+
+ // REQUIRED; The name of the resource.
+ Name *string
+
+ // The extended location of the Virtual Machine.
+ ExtendedLocation *ExtendedLocation
+
+ // Resource Id
+ ID *string
+
+ // Describes the properties of a Virtual Machine Image.
+ Properties *VirtualMachineImageProperties
+
+ // Specifies the tags that are assigned to the virtual machine. For more information about using tags, see Using tags to organize
+ // your Azure resources
+ // [https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md].
+ Tags map[string]*string
+}
+
+// VirtualMachineImageFeature - Specifies additional capabilities supported by the image
+type VirtualMachineImageFeature struct {
+ // The name of the feature.
+ Name *string
+
+ // The corresponding value for the feature.
+ Value *string
+}
+
+// VirtualMachineImageProperties - Describes the properties of a Virtual Machine Image.
+type VirtualMachineImageProperties struct {
+ // Specifies the Architecture Type
+ Architecture *ArchitectureTypes
+
+ // Describes automatic OS upgrade properties on the image.
+ AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties
+ DataDiskImages []*DataDiskImage
+
+ // Specifies disallowed configuration for the VirtualMachine created from the image
+ Disallowed *DisallowedConfiguration
+ Features []*VirtualMachineImageFeature
+
+ // Specifies the HyperVGeneration Type
+ HyperVGeneration *HyperVGenerationTypes
+
+ // Describes image deprecation status properties on the image.
+ ImageDeprecationStatus *ImageDeprecationStatus
+
+ // Contains the os disk image information.
+ OSDiskImage *OSDiskImage
+
+ // Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
+ Plan *PurchasePlan
+}
+
+// VirtualMachineImageResource - Virtual machine image resource information.
+type VirtualMachineImageResource struct {
+ // REQUIRED; The supported Azure location of the resource.
+ Location *string
+
+ // REQUIRED; The name of the resource.
+ Name *string
+
+ // The extended location of the Virtual Machine.
+ ExtendedLocation *ExtendedLocation
+
+ // Resource Id
+ ID *string
+
+ // Specifies the tags that are assigned to the virtual machine. For more information about using tags, see Using tags to organize
+ // your Azure resources
+ // [https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md].
+ Tags map[string]*string
+}
+
+// VirtualMachineInstallPatchesParameters - Input for InstallPatches as directly received by the API
+type VirtualMachineInstallPatchesParameters struct {
+ // REQUIRED; Defines when it is acceptable to reboot a VM during a software update operation.
+ RebootSetting *VMGuestPatchRebootSetting
+
+ // Input for InstallPatches on a Linux VM, as directly received by the API
+ LinuxParameters *LinuxParameters
+
+ // Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such
+ // as PT4H (4 hours)
+ MaximumDuration *string
+
+ // Input for InstallPatches on a Windows VM, as directly received by the API
+ WindowsParameters *WindowsParameters
+}
+
+// VirtualMachineInstallPatchesResult - The result summary of an installation operation.
+type VirtualMachineInstallPatchesResult struct {
+ // READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
+ Error *APIError
+
+ // READ-ONLY; The number of patches that were not installed due to the user blocking their installation.
+ ExcludedPatchCount *int32
+
+ // READ-ONLY; The number of patches that could not be installed due to some issue. See errors for details.
+ FailedPatchCount *int32
+
+ // READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension
+ // logs.
+ InstallationActivityID *string
+
+ // READ-ONLY; The number of patches successfully installed.
+ InstalledPatchCount *int32
+
+ // READ-ONLY; Whether the operation ran out of time before it completed all its intended actions.
+ MaintenanceWindowExceeded *bool
+
+ // READ-ONLY; The number of patches that were detected as available for install, but did not meet the operation's criteria.
+ NotSelectedPatchCount *int32
+
+ // READ-ONLY; The patches that were installed during the operation.
+ Patches []*PatchInstallationDetail
+
+ // READ-ONLY; The number of patches that were identified as meeting the installation criteria, but were not able to be installed.
+ // Typically this happens when maintenanceWindowExceeded == true.
+ PendingPatchCount *int32
+
+ // READ-ONLY; The reboot state of the VM following completion of the operation.
+ RebootStatus *VMGuestPatchRebootStatus
+
+ // READ-ONLY; The UTC timestamp when the operation began.
+ StartDateTime *time.Time
+
+ // READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes.
+ // At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings."
+ Status *PatchOperationStatus
+}
+
+// VirtualMachineInstanceView - The instance view of a virtual machine.
+type VirtualMachineInstanceView struct {
+ // Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You
+ // can easily view the output of your console log. Azure also enables you to see
+ // a screenshot of the VM from the hypervisor.
+ BootDiagnostics *BootDiagnosticsInstanceView
+
+ // The computer name assigned to the virtual machine.
+ ComputerName *string
+
+ // The virtual machine disk information.
+ Disks []*DiskInstanceView
+
+ // The extensions information.
+ Extensions []*VirtualMachineExtensionInstanceView
+
+ // Specifies the HyperVGeneration Type associated with a resource
+ HyperVGeneration *HyperVGenerationType
+
+ // The Maintenance Operation status on the virtual machine.
+ MaintenanceRedeployStatus *MaintenanceRedeployStatus
+
+ // The Operating System running on the virtual machine.
+ OSName *string
+
+ // The version of Operating System running on the virtual machine.
+ OSVersion *string
+
+ // [Preview Feature] The status of virtual machine patch operations.
+ PatchStatus *VirtualMachinePatchStatus
+
+ // Specifies the fault domain of the virtual machine.
+ PlatformFaultDomain *int32
+
+ // Specifies the update domain of the virtual machine.
+ PlatformUpdateDomain *int32
+
+ // The Remote desktop certificate thumbprint.
+ RdpThumbPrint *string
+
+ // The resource status information.
+ Statuses []*InstanceViewStatus
+
+ // The VM Agent running on the virtual machine.
+ VMAgent *VirtualMachineAgentInstanceView
+
+ // READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when
+ // the virtual machine is associated with a dedicated host group that has automatic
+ // placement enabled. Minimum api-version: 2020-06-01.
+ AssignedHost *string
+
+ // READ-ONLY; [Preview Feature] Specifies whether the VM is currently in or out of the Standby Pool.
+ IsVMInStandbyPool *bool
+
+ // READ-ONLY; The health status for the VM.
+ VMHealth *VirtualMachineHealthStatus
+}
+
+// VirtualMachineListResult - The List Virtual Machine operation response.
+type VirtualMachineListResult struct {
+ // REQUIRED; The list of virtual machines.
+ Value []*VirtualMachine
+
+ // The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines.
+ NextLink *string
+}
+
+// VirtualMachineNetworkInterfaceConfiguration - Describes a virtual machine network interface configurations.
+type VirtualMachineNetworkInterfaceConfiguration struct {
+ // REQUIRED; The network interface configuration name.
+ Name *string
+
+ // Describes a virtual machine network profile's IP configuration.
+ Properties *VirtualMachineNetworkInterfaceConfigurationProperties
+}
+
+// VirtualMachineNetworkInterfaceConfigurationProperties - Describes a virtual machine network profile's IP configuration.
+type VirtualMachineNetworkInterfaceConfigurationProperties struct {
+ // REQUIRED; Specifies the IP configurations of the network interface.
+ IPConfigurations []*VirtualMachineNetworkInterfaceIPConfiguration
+
+ // Specifies whether the Auxiliary mode is enabled for the Network Interface resource.
+ AuxiliaryMode *NetworkInterfaceAuxiliaryMode
+
+ // Specifies whether the Auxiliary sku is enabled for the Network Interface resource.
+ AuxiliarySKU *NetworkInterfaceAuxiliarySKU
+
+ // The dns settings to be applied on the network interfaces.
+ DNSSettings *VirtualMachineNetworkInterfaceDNSSettingsConfiguration
+
+ // Specify what happens to the network interface when the VM is deleted
+ DeleteOption *DeleteOptions
+
+ // Specifies whether the network interface is disabled for tcp state tracking.
+ DisableTCPStateTracking *bool
+ DscpConfiguration *SubResource
+
+ // Specifies whether the network interface is accelerated networking-enabled.
+ EnableAcceleratedNetworking *bool
+
+ // Specifies whether the network interface is FPGA networking-enabled.
+ EnableFpga *bool
+
+ // Whether IP forwarding enabled on this NIC.
+ EnableIPForwarding *bool
+
+ // The network security group.
+ NetworkSecurityGroup *SubResource
+
+ // Specifies the primary network interface in case the virtual machine has more than 1 network interface.
+ Primary *bool
+}
+
+// VirtualMachineNetworkInterfaceDNSSettingsConfiguration - Describes a virtual machines network configuration's DNS settings.
+type VirtualMachineNetworkInterfaceDNSSettingsConfiguration struct {
+ // List of DNS servers IP addresses
+ DNSServers []*string
+}
+
+// VirtualMachineNetworkInterfaceIPConfiguration - Describes a virtual machine network profile's IP configuration.
+type VirtualMachineNetworkInterfaceIPConfiguration struct {
+ // REQUIRED; The IP configuration name.
+ Name *string
+
+ // Describes a virtual machine network interface IP configuration properties.
+ Properties *VirtualMachineNetworkInterfaceIPConfigurationProperties
+}
+
+// VirtualMachineNetworkInterfaceIPConfigurationProperties - Describes a virtual machine network interface IP configuration
+// properties.
+type VirtualMachineNetworkInterfaceIPConfigurationProperties struct {
+ // Specifies an array of references to backend address pools of application gateways. A virtual machine can reference backend
+ // address pools of multiple application gateways. Multiple virtual machines
+ // cannot use the same application gateway.
+ ApplicationGatewayBackendAddressPools []*SubResource
+
+ // Specifies an array of references to application security group.
+ ApplicationSecurityGroups []*SubResource
+
+ // Specifies an array of references to backend address pools of load balancers. A virtual machine can reference backend address
+ // pools of one public and one internal load balancer. [Multiple virtual
+ // machines cannot use the same basic sku load balancer].
+ LoadBalancerBackendAddressPools []*SubResource
+
+ // Specifies the primary network interface in case the virtual machine has more than 1 network interface.
+ Primary *bool
+
+ // Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default
+ // is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+ PrivateIPAddressVersion *IPVersions
+
+ // The publicIPAddressConfiguration.
+ PublicIPAddressConfiguration *VirtualMachinePublicIPAddressConfiguration
+
+ // Specifies the identifier of the subnet.
+ Subnet *SubResource
+}
+
+// VirtualMachinePatchStatus - The status of virtual machine patch operations.
+type VirtualMachinePatchStatus struct {
+ // The available patch summary of the latest assessment operation for the virtual machine.
+ AvailablePatchSummary *AvailablePatchSummary
+
+ // The installation summary of the latest installation operation for the virtual machine.
+ LastPatchInstallationSummary *LastPatchInstallationSummary
+
+ // READ-ONLY; The enablement status of the specified patchMode
+ ConfigurationStatuses []*InstanceViewStatus
+}
+
+// VirtualMachineProperties - Describes the properties of a Virtual Machine.
+type VirtualMachineProperties struct {
+ // Specifies additional capabilities enabled or disabled on the virtual machine.
+ AdditionalCapabilities *AdditionalCapabilities
+
+ // Specifies the gallery applications that should be made available to the VM/VMSS.
+ ApplicationProfile *ApplicationProfile
+
+ // Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified
+ // in the same availability set are allocated to different nodes to maximize
+ // availability. For more information about availability sets, see Availability sets overview [https://docs.microsoft.com/azure/virtual-machines/availability-set-overview].
+ // For more information on Azure
+ // planned maintenance, see Maintenance and updates for Virtual Machines in Azure [https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates].
+ // Currently, a VM can only be added to
+ // availability set at creation time. The availability set to which the VM is being added should be under the same resource
+ // group as the availability set resource. An existing VM cannot be added to an
+ // availability set. This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
+ AvailabilitySet *SubResource
+
+ // Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01.
+ BillingProfile *BillingProfile
+
+ // Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01.
+ CapacityReservation *CapacityReservationProfile
+
+ // Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.
+ DiagnosticsProfile *DiagnosticsProfile
+
+ // Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines,
+ // both 'Deallocate' and 'Delete' are supported and the minimum api-version is
+ // 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
+ EvictionPolicy *VirtualMachineEvictionPolicyTypes
+
+ // Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes
+ // (inclusive) and should be specified in ISO 8601 format. The default value is 90
+ // minutes (PT1H30M). Minimum api-version: 2020-06-01.
+ ExtensionsTimeBudget *string
+
+ // Specifies the hardware settings for the virtual machine.
+ HardwareProfile *HardwareProfile
+
+ // Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01.
+ Host *SubResource
+
+ // Specifies information about the dedicated host group that the virtual machine resides in. Note: User cannot specify both
+ // host and hostGroup properties. Minimum api-version: 2020-06-01.
+ HostGroup *SubResource
+
+ // Specifies that the image or disk that is being used was licensed on-premises.
+ // Possible values for Windows Server operating system are:
+ // WindowsClient
+ // WindowsServer
+ // Possible values for Linux Server operating system are:
+ // RHELBYOS (for RHEL)
+ // SLESBYOS (for SUSE)
+ // For more information, see Azure Hybrid Use Benefit for Windows Server [https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing]
+ // Azure Hybrid Use Benefit for Linux Server [https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux]
+ // Minimum api-version: 2015-06-15
+ LicenseType *string
+
+ // Specifies the network interfaces of the virtual machine.
+ NetworkProfile *NetworkProfile
+
+ // Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed
+ // once VM is provisioned.
+ OSProfile *OSProfile
+
+ // Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine
+ // will by automatically assigned to a fault domain that best maintains
+ // balance across available fault domains. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual
+ // Machine is set. The Virtual Machine Scale Set that is referenced, must have
+ // 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain
+ // assignment can be viewed in the Virtual Machine Instance View. Minimum
+ // api‐version: 2020‐12‐01.
+ PlatformFaultDomain *int32
+
+ // Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01
+ Priority *VirtualMachinePriorityTypes
+
+ // Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version:
+ // 2018-04-01.
+ ProximityPlacementGroup *SubResource
+
+ // Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations for the
+ // virtual machine.
+ ScheduledEventsPolicy *ScheduledEventsPolicy
+
+ // Specifies Scheduled Event related configurations.
+ ScheduledEventsProfile *ScheduledEventsProfile
+
+ // Specifies the Security related profile settings for the virtual machine.
+ SecurityProfile *SecurityProfile
+
+ // Specifies the storage settings for the virtual machine disks.
+ StorageProfile *StorageProfile
+
+ // UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version:
+ // 2021-03-01.
+ UserData *string
+
+ // Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines
+ // specified in the same virtual machine scale set are allocated to different
+ // nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing
+ // VM cannot be added to a virtual machine scale set. This property cannot
+ // exist along with a non-null properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01.
+ VirtualMachineScaleSet *SubResource
+
+ // READ-ONLY; The virtual machine instance view.
+ InstanceView *VirtualMachineInstanceView
+
+ // READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string
+
+ // READ-ONLY; Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01.
+ TimeCreated *time.Time
+
+ // READ-ONLY; Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS
+ // and can be read using platform BIOS commands.
+ VMID *string
+}
+
+// VirtualMachinePublicIPAddressConfiguration - Describes a virtual machines IP Configuration's PublicIPAddress configuration
+type VirtualMachinePublicIPAddressConfiguration struct {
+ // REQUIRED; The publicIP address configuration name.
+ Name *string
+
+ // Describes a virtual machines IP Configuration's PublicIPAddress configuration
+ Properties *VirtualMachinePublicIPAddressConfigurationProperties
+
+ // Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.
+ SKU *PublicIPAddressSKU
+}
+
+// VirtualMachinePublicIPAddressConfigurationProperties - Describes a virtual machines IP Configuration's PublicIPAddress
+// configuration
+type VirtualMachinePublicIPAddressConfigurationProperties struct {
+ // The dns settings to be applied on the publicIP addresses .
+ DNSSettings *VirtualMachinePublicIPAddressDNSSettingsConfiguration
+
+ // Specify what happens to the public IP address when the VM is deleted
+ DeleteOption *DeleteOptions
+
+ // The list of IP tags associated with the public IP address.
+ IPTags []*VirtualMachineIPTag
+
+ // The idle timeout of the public IP address.
+ IdleTimeoutInMinutes *int32
+
+ // Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default
+ // is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+ PublicIPAddressVersion *IPVersions
+
+ // Specify the public IP allocation type
+ PublicIPAllocationMethod *PublicIPAllocationMethod
+
+ // The PublicIPPrefix from which to allocate publicIP addresses.
+ PublicIPPrefix *SubResource
+}
+
+// VirtualMachinePublicIPAddressDNSSettingsConfiguration - Describes a virtual machines network configuration's DNS settings.
+type VirtualMachinePublicIPAddressDNSSettingsConfiguration struct {
+ // REQUIRED; The Domain name label prefix of the PublicIPAddress resources that will be created. The generated name label
+ // is the concatenation of the domain name label and vm network profile unique ID.
+ DomainNameLabel *string
+
+ // The Domain name label scope of the PublicIPAddress resources that will be created. The generated name label is the concatenation
+ // of the hashed domain name label with policy according to the domain
+ // name label scope and vm network profile unique ID.
+ DomainNameLabelScope *DomainNameLabelScopeTypes
+}
+
+// VirtualMachineReimageParameters - Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will always be
+// reimaged
+type VirtualMachineReimageParameters struct {
+ // Specifies in decimal number, the version the OS disk should be reimaged to. If exact version is not provided, the OS disk
+ // is reimaged to the existing version of OS Disk.
+ ExactVersion *string
+
+ // Specifies information required for reimaging the non-ephemeral OS disk.
+ OSProfile *OSProfileProvisioningData
+
+ // Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported
+ // for VM/VMSS with Ephemeral OS disk.
+ TempDisk *bool
+}
+
+// VirtualMachineRunCommand - Describes a Virtual Machine run command.
+type VirtualMachineRunCommand struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // Describes the properties of a Virtual Machine run command.
+ Properties *VirtualMachineRunCommandProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// VirtualMachineRunCommandInstanceView - The instance view of a virtual machine run command.
+type VirtualMachineRunCommandInstanceView struct {
+ // Script end time.
+ EndTime *time.Time
+
+ // Script error stream.
+ Error *string
+
+ // Communicate script configuration errors or execution messages.
+ ExecutionMessage *string
+
+ // Script execution status.
+ ExecutionState *ExecutionState
+
+ // Exit code returned from script execution.
+ ExitCode *int32
+
+ // Script output stream.
+ Output *string
+
+ // Script start time.
+ StartTime *time.Time
+
+ // The resource status information.
+ Statuses []*InstanceViewStatus
+}
+
+// VirtualMachineRunCommandProperties - Describes the properties of a Virtual Machine run command.
+type VirtualMachineRunCommandProperties struct {
+ // Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
+ AsyncExecution *bool
+
+ // User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned
+ // identity. Make sure managed identity has been given access to blob's
+ // container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it
+ // under VM's identity. For more info on managed identity and Run Command, refer
+ // https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
+ ErrorBlobManagedIdentity *RunCommandManagedIdentity
+
+ // Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write
+ // access OR use managed identity to provide the VM access to the blob. Refer
+ // errorBlobManagedIdentity parameter.
+ ErrorBlobURI *string
+
+ // User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned
+ // identity. Make sure managed identity has been given access to blob's
+ // container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it
+ // under VM's identity. For more info on managed identity and Run Command, refer
+ // https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
+ OutputBlobManagedIdentity *RunCommandManagedIdentity
+
+ // Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create,
+ // write access OR use managed identity to provide the VM access to the blob. Refer
+ // outputBlobManagedIdentity parameter.
+ OutputBlobURI *string
+
+ // The parameters used by the script.
+ Parameters []*RunCommandInputParameter
+
+ // The parameters used by the script.
+ ProtectedParameters []*RunCommandInputParameter
+
+ // Specifies the user account password on the VM when executing the run command.
+ RunAsPassword *string
+
+ // Specifies the user account on the VM when executing the run command.
+ RunAsUser *string
+
+ // The source of the run command script.
+ Source *VirtualMachineRunCommandScriptSource
+
+ // The timeout in seconds to execute the run command.
+ TimeoutInSeconds *int32
+
+ // Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed.
+ // If set to false, ProvisioningState would only reflect whether the run
+ // command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures.
+ // See instance view of run command in case of script failures to see
+ // executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results
+ TreatFailureAsDeploymentFailure *bool
+
+ // READ-ONLY; The virtual machine run command instance view.
+ InstanceView *VirtualMachineRunCommandInstanceView
+
+ // READ-ONLY; The provisioning state, which only appears in the response. If treatFailureAsDeploymentFailure set to true,
+ // any failure in the script will fail the deployment and ProvisioningState will be marked as
+ // Failed. If treatFailureAsDeploymentFailure set to false, ProvisioningState would only reflect whether the run command was
+ // run or not by the extensions platform, it would not indicate whether script
+ // failed in case of script failures. See instance view of run command in case of script failures to see executionMessage,
+ // output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results
+ ProvisioningState *string
+}
+
+// VirtualMachineRunCommandScriptSource - Describes the script sources for run command. Use only one of script, scriptUri,
+// commandId.
+type VirtualMachineRunCommandScriptSource struct {
+ // Specifies a commandId of predefined built-in script.
+ CommandID *string
+
+ // Specifies the script content to be executed on the VM.
+ Script *string
+
+ // Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
+ ScriptURI *string
+
+ // User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case
+ // of system-assigned identity. Make sure the Azure storage blob exists, and managed
+ // identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned
+ // identity, make sure you add it under VM's identity. For more info on
+ // managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged.
+ ScriptURIManagedIdentity *RunCommandManagedIdentity
+}
+
+// VirtualMachineRunCommandUpdate - Describes a Virtual Machine run command.
+type VirtualMachineRunCommandUpdate struct {
+ // Describes the properties of a Virtual Machine run command.
+ Properties *VirtualMachineRunCommandProperties
+
+ // Resource tags
+ Tags map[string]*string
+}
+
+// VirtualMachineRunCommandsListResult - The List run command operation response
+type VirtualMachineRunCommandsListResult struct {
+ // REQUIRED; The list of run commands
+ Value []*VirtualMachineRunCommand
+
+ // The uri to fetch the next page of run commands.
+ NextLink *string
+}
+
+// VirtualMachineScaleSet - Describes a Virtual Machine Scale Set.
+type VirtualMachineScaleSet struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // The extended location of the Virtual Machine Scale Set.
+ ExtendedLocation *ExtendedLocation
+
+ // The identity of the virtual machine scale set, if configured.
+ Identity *VirtualMachineScaleSetIdentity
+
+ // Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace
+ // images. Before you can use a marketplace image from an API, you must
+ // enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click
+ // Want to deploy programmatically, Get Started ->. Enter any required
+ // information and then click Save.
+ Plan *Plan
+
+ // Describes the properties of a Virtual Machine Scale Set.
+ Properties *VirtualMachineScaleSetProperties
+
+ // The virtual machine scale set sku.
+ SKU *SKU
+
+ // Resource tags
+ Tags map[string]*string
+
+ // The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set
+ Zones []*string
+
+ // READ-ONLY; Etag is property returned in Create/Update/Get response of the VMSS, so that customer can supply it in the header
+ // to ensure optimistic updates
+ Etag *string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// VirtualMachineScaleSetDataDisk - Describes a virtual machine scale set data disk.
+type VirtualMachineScaleSetDataDisk struct {
+ // REQUIRED; The create option.
+ CreateOption *DiskCreateOptionTypes
+
+ // REQUIRED; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and
+ // therefore must be unique for each data disk attached to a VM.
+ Lun *int32
+
+ // Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard
+ // storage. ReadOnly for Premium storage.
+ Caching *CachingTypes
+
+ // Specifies whether data disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with
+ // Flexible OrchestrationMode only).
+ // Possible values:
+ // Delete If this value is used, the data disk is deleted when the VMSS Flex VM is deleted.
+ // Detach If this value is used, the data disk is retained after VMSS Flex VM is deleted.
+ // The default value is set to Delete.
+ DeleteOption *DiskDeleteOptionTypes
+
+ // Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not
+ // specified, a default value would be assigned based on diskSizeGB.
+ DiskIOPSReadWrite *int64
+
+ // Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS.
+ // If not specified, a default value would be assigned based on diskSizeGB.
+ DiskMBpsReadWrite *int64
+
+ // Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a
+ // virtual machine image. The property diskSizeGB is the number of bytes x 1024^3
+ // for the disk and the value cannot be larger than 1023.
+ DiskSizeGB *int32
+
+ // The managed disk parameters.
+ ManagedDisk *VirtualMachineScaleSetManagedDiskParameters
+
+ // The disk name.
+ Name *string
+
+ // Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool
+}
+
+// VirtualMachineScaleSetExtension - Describes a Virtual Machine Scale Set Extension.
+type VirtualMachineScaleSetExtension struct {
+ // The name of the extension.
+ Name *string
+
+ // Describes the properties of a Virtual Machine Scale Set Extension.
+ Properties *VirtualMachineScaleSetExtensionProperties
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// VirtualMachineScaleSetExtensionListResult - The List VM scale set extension operation response.
+type VirtualMachineScaleSetExtensionListResult struct {
+ // REQUIRED; The list of VM scale set extensions.
+ Value []*VirtualMachineScaleSetExtension
+
+ // The uri to fetch the next page of VM scale set extensions. Call ListNext() with this to fetch the next page of VM scale
+ // set extensions.
+ NextLink *string
+}
+
+// VirtualMachineScaleSetExtensionProfile - Describes a virtual machine scale set extension profile.
+type VirtualMachineScaleSetExtensionProfile struct {
+ // The virtual machine scale set child extension resources.
+ Extensions []*VirtualMachineScaleSetExtension
+
+ // Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes
+ // (inclusive) and should be specified in ISO 8601 format. The default value is 90
+ // minutes (PT1H30M). Minimum api-version: 2020-06-01.
+ ExtensionsTimeBudget *string
+}
+
+// VirtualMachineScaleSetExtensionProperties - Describes the properties of a Virtual Machine Scale Set Extension.
+type VirtualMachineScaleSetExtensionProperties struct {
+ // Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed,
+ // however, the extension will not upgrade minor versions unless redeployed, even
+ // with this property set to true.
+ AutoUpgradeMinorVersion *bool
+
+ // Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension
+ // available.
+ EnableAutomaticUpgrade *bool
+
+ // If a value is provided and is different from the previous value, the extension handler will be forced to update even if
+ // the extension configuration has not changed.
+ ForceUpdateTag *string
+
+ // The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
+ ProtectedSettings any
+
+ // The extensions protected settings that are passed by reference, and consumed from key vault
+ ProtectedSettingsFromKeyVault *KeyVaultSecretReference
+
+ // Collection of extension names after which this extension needs to be provisioned.
+ ProvisionAfterExtensions []*string
+
+ // The name of the extension handler publisher.
+ Publisher *string
+
+ // Json formatted public settings for the extension.
+ Settings any
+
+ // Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting
+ // to the VM will not be suppressed regardless of this value). The default is false.
+ SuppressFailures *bool
+
+ // Specifies the type of the extension; an example is "CustomScriptExtension".
+ Type *string
+
+ // Specifies the version of the script handler.
+ TypeHandlerVersion *string
+
+ // READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string
+}
+
+// VirtualMachineScaleSetExtensionUpdate - Describes a Virtual Machine Scale Set Extension.
+type VirtualMachineScaleSetExtensionUpdate struct {
+ // Describes the properties of a Virtual Machine Scale Set Extension.
+ Properties *VirtualMachineScaleSetExtensionProperties
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; The name of the extension.
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// VirtualMachineScaleSetHardwareProfile - Specifies the hardware settings for the virtual machine scale set.
+type VirtualMachineScaleSetHardwareProfile struct {
+ // Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. Please follow
+ // the instructions in VM Customization [https://aka.ms/vmcustomization] for more
+ // details.
+ VMSizeProperties *VMSizeProperties
+}
+
+// VirtualMachineScaleSetIPConfiguration - Describes a virtual machine scale set network profile's IP configuration.
+type VirtualMachineScaleSetIPConfiguration struct {
+ // REQUIRED; The IP configuration name.
+ Name *string
+
+ // Describes a virtual machine scale set network profile's IP configuration properties.
+ Properties *VirtualMachineScaleSetIPConfigurationProperties
+}
+
+// VirtualMachineScaleSetIPConfigurationProperties - Describes a virtual machine scale set network profile's IP configuration
+// properties.
+type VirtualMachineScaleSetIPConfigurationProperties struct {
+ // Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address
+ // pools of multiple application gateways. Multiple scale sets cannot use the
+ // same application gateway.
+ ApplicationGatewayBackendAddressPools []*SubResource
+
+ // Specifies an array of references to application security group.
+ ApplicationSecurityGroups []*SubResource
+
+ // Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address
+ // pools of one public and one internal load balancer. Multiple scale sets cannot
+ // use the same basic sku load balancer.
+ LoadBalancerBackendAddressPools []*SubResource
+
+ // Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools
+ // of one public and one internal load balancer. Multiple scale sets cannot use
+ // the same basic sku load balancer.
+ LoadBalancerInboundNatPools []*SubResource
+
+ // Specifies the primary network interface in case the virtual machine has more than 1 network interface.
+ Primary *bool
+
+ // Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default
+ // is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+ PrivateIPAddressVersion *IPVersion
+
+ // The publicIPAddressConfiguration.
+ PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration
+
+ // Specifies the identifier of the subnet.
+ Subnet *APIEntityReference
+}
+
+// VirtualMachineScaleSetIPTag - Contains the IP tag associated with the public IP address.
+type VirtualMachineScaleSetIPTag struct {
+ // IP tag type. Example: FirstPartyUsage.
+ IPTagType *string
+
+ // IP tag associated with the public IP. Example: SQL, Storage etc.
+ Tag *string
+}
+
+// VirtualMachineScaleSetIdentity - Identity for the virtual machine scale set.
+type VirtualMachineScaleSetIdentity struct {
+ // The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly
+ // created identity and a set of user assigned identities. The type 'None'
+ // will remove any identities from the virtual machine scale set.
+ Type *ResourceIdentityType
+
+ // The list of user identities associated with the virtual machine scale set. The user identity dictionary key references
+ // will be ARM resource ids in the form:
+ // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ UserAssignedIdentities map[string]*UserAssignedIdentitiesValue
+
+ // READ-ONLY; The principal id of virtual machine scale set identity. This property will only be provided for a system assigned
+ // identity.
+ PrincipalID *string
+
+ // READ-ONLY; The tenant id associated with the virtual machine scale set. This property will only be provided for a system
+ // assigned identity.
+ TenantID *string
+}
+
+// VirtualMachineScaleSetInstanceView - The instance view of a virtual machine scale set.
+type VirtualMachineScaleSetInstanceView struct {
+ // The resource status information.
+ Statuses []*InstanceViewStatus
+
+ // READ-ONLY; The extensions information.
+ Extensions []*VirtualMachineScaleSetVMExtensionsSummary
+
+ // READ-ONLY; The orchestration services information.
+ OrchestrationServices []*OrchestrationServiceSummary
+
+ // READ-ONLY; The instance view status summary for the virtual machine scale set.
+ VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary
+}
+
+// VirtualMachineScaleSetInstanceViewStatusesSummary - Instance view statuses summary for virtual machines of a virtual machine
+// scale set.
+type VirtualMachineScaleSetInstanceViewStatusesSummary struct {
+ // READ-ONLY; The extensions information.
+ StatusesSummary []*VirtualMachineStatusCodeCount
+}
+
+// VirtualMachineScaleSetListOSUpgradeHistory - List of Virtual Machine Scale Set OS Upgrade History operation response.
+type VirtualMachineScaleSetListOSUpgradeHistory struct {
+ // REQUIRED; The list of OS upgrades performed on the virtual machine scale set.
+ Value []*UpgradeOperationHistoricalStatusInfo
+
+ // The uri to fetch the next page of OS Upgrade History. Call ListNext() with this to fetch the next page of history of upgrades.
+ NextLink *string
+}
+
+// VirtualMachineScaleSetListResult - The List Virtual Machine operation response.
+type VirtualMachineScaleSetListResult struct {
+ // REQUIRED; The list of virtual machine scale sets.
+ Value []*VirtualMachineScaleSet
+
+ // The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of VMSS.
+ NextLink *string
+}
+
+// VirtualMachineScaleSetListSKUsResult - The Virtual Machine Scale Set List Skus operation response.
+type VirtualMachineScaleSetListSKUsResult struct {
+ // REQUIRED; The list of skus available for the virtual machine scale set.
+ Value []*VirtualMachineScaleSetSKU
+
+ // The uri to fetch the next page of Virtual Machine Scale Set Skus. Call ListNext() with this to fetch the next page of VMSS
+ // Skus.
+ NextLink *string
+}
+
+// VirtualMachineScaleSetListWithLinkResult - The List Virtual Machine operation response.
+type VirtualMachineScaleSetListWithLinkResult struct {
+ // REQUIRED; The list of virtual machine scale sets.
+ Value []*VirtualMachineScaleSet
+
+ // The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of Virtual
+ // Machine Scale Sets.
+ NextLink *string
+}
+
+// VirtualMachineScaleSetManagedDiskParameters - Describes the parameters of a ScaleSet managed disk.
+type VirtualMachineScaleSetManagedDiskParameters struct {
+ // Specifies the customer managed disk encryption set resource id for the managed disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters
+
+ // Specifies the security profile for the managed disk.
+ SecurityProfile *VMDiskSecurityProfile
+
+ // Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot
+ // be used with OS Disk.
+ StorageAccountType *StorageAccountTypes
+}
+
+// VirtualMachineScaleSetNetworkConfiguration - Describes a virtual machine scale set network profile's network configurations.
+type VirtualMachineScaleSetNetworkConfiguration struct {
+ // REQUIRED; The network configuration name.
+ Name *string
+
+ // Describes a virtual machine scale set network profile's IP configuration.
+ Properties *VirtualMachineScaleSetNetworkConfigurationProperties
+}
+
+// VirtualMachineScaleSetNetworkConfigurationDNSSettings - Describes a virtual machines scale sets network configuration's
+// DNS settings.
+type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct {
+ // List of DNS servers IP addresses
+ DNSServers []*string
+}
+
+// VirtualMachineScaleSetNetworkConfigurationProperties - Describes a virtual machine scale set network profile's IP configuration.
+type VirtualMachineScaleSetNetworkConfigurationProperties struct {
+ // REQUIRED; Specifies the IP configurations of the network interface.
+ IPConfigurations []*VirtualMachineScaleSetIPConfiguration
+
+ // Specifies whether the Auxiliary mode is enabled for the Network Interface resource.
+ AuxiliaryMode *NetworkInterfaceAuxiliaryMode
+
+ // Specifies whether the Auxiliary sku is enabled for the Network Interface resource.
+ AuxiliarySKU *NetworkInterfaceAuxiliarySKU
+
+ // The dns settings to be applied on the network interfaces.
+ DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings
+
+ // Specify what happens to the network interface when the VM is deleted
+ DeleteOption *DeleteOptions
+
+ // Specifies whether the network interface is disabled for tcp state tracking.
+ DisableTCPStateTracking *bool
+
+ // Specifies whether the network interface is accelerated networking-enabled.
+ EnableAcceleratedNetworking *bool
+
+ // Specifies whether the network interface is FPGA networking-enabled.
+ EnableFpga *bool
+
+ // Whether IP forwarding enabled on this NIC.
+ EnableIPForwarding *bool
+
+ // The network security group.
+ NetworkSecurityGroup *SubResource
+
+ // Specifies the primary network interface in case the virtual machine has more than 1 network interface.
+ Primary *bool
+}
+
+// VirtualMachineScaleSetNetworkProfile - Describes a virtual machine scale set network profile.
+type VirtualMachineScaleSetNetworkProfile struct {
+ // A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The
+ // reference will be in the form:
+ // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.
+ HealthProbe *APIEntityReference
+
+ // specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations
+ // for Virtual Machine Scale Set with orchestration mode 'Flexible'
+ NetworkAPIVersion *NetworkAPIVersion
+
+ // The list of network configurations.
+ NetworkInterfaceConfigurations []*VirtualMachineScaleSetNetworkConfiguration
+}
+
+// VirtualMachineScaleSetOSDisk - Describes a virtual machine scale set operating system disk.
+type VirtualMachineScaleSetOSDisk struct {
+ // REQUIRED; Specifies how the virtual machines in the scale set should be created. The only allowed value is: FromImage.
+ // This value is used when you are using an image to create the virtual machine. If you are
+ // using a platform image, you also use the imageReference element described above. If you are using a marketplace image,
+ // you also use the plan element previously described.
+ CreateOption *DiskCreateOptionTypes
+
+ // Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard
+ // storage. ReadOnly for Premium storage.
+ Caching *CachingTypes
+
+ // Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with
+ // Flexible OrchestrationMode only).
+ // Possible values:
+ // Delete If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.
+ // Detach If this value is used, the OS disk is retained after VMSS Flex VM is deleted.
+ // The default value is set to Delete. For an Ephemeral OS Disk, the default value is set to Delete. User cannot change the
+ // delete option for Ephemeral OS Disk.
+ DeleteOption *DiskDeleteOptionTypes
+
+ // Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.
+ DiffDiskSettings *DiffDiskSettings
+
+ // Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a
+ // virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3
+ // for the disk and the value cannot be larger than 1023.
+ DiskSizeGB *int32
+
+ // Specifies information about the unmanaged user image to base the scale set on.
+ Image *VirtualHardDisk
+
+ // The managed disk parameters.
+ ManagedDisk *VirtualMachineScaleSetManagedDiskParameters
+
+ // The disk name.
+ Name *string
+
+ // This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or
+ // a specialized VHD. Possible values are: Windows, Linux.
+ OSType *OperatingSystemTypes
+
+ // Specifies the container urls that are used to store operating system disks for the scale set.
+ VhdContainers []*string
+
+ // Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool
+}
+
+// VirtualMachineScaleSetOSProfile - Describes a virtual machine scale set OS profile.
+type VirtualMachineScaleSetOSProfile struct {
+ // Specifies the password of the administrator account.
+ // Minimum-length (Windows): 8 characters
+ // Minimum-length (Linux): 6 characters
+ // Max-length (Windows): 123 characters
+ // Max-length (Linux): 72 characters
+ // Complexity requirements: 3 out of 4 conditions below need to be fulfilled
+ // Has lower characters
+ // Has upper characters
+ // Has a digit
+ // Has a special character (Regex match [\W_])
+ // Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1",
+ // "Password22", "iloveyou!"
+ // For resetting the password, see How to reset the Remote Desktop service or its login password in a Windows VM [https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp]
+ // For resetting root password, see Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension
+ // [https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection]
+ AdminPassword *string
+
+ // Specifies the name of the administrator account.
+ // Windows-only restriction: Cannot end in "."
+ // Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123",
+ // "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest",
+ // "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
+ // Minimum-length (Linux): 1 character
+ // Max-length (Linux): 64 characters
+ // Max-length (Windows): 20 characters
+ AdminUsername *string
+
+ // Specifies whether extension operations should be allowed on the virtual machine scale set. This may only be set to False
+ // when no extensions are present on the virtual machine scale set.
+ AllowExtensionOperations *bool
+
+ // Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to
+ // 15 characters long.
+ ComputerNamePrefix *string
+
+ // Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved
+ // as a file on the Virtual Machine. The maximum length of the binary array is
+ // 65535 bytes. For using cloud-init for your VM, see Using cloud-init to customize a Linux VM during creation [https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init]
+ CustomData *string
+
+ // Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see
+ // Linux on Azure-Endorsed Distributions
+ // [https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros].
+ LinuxConfiguration *LinuxConfiguration
+
+ // Optional property which must either be set to True or omitted.
+ RequireGuestProvisionSignal *bool
+
+ // Specifies set of certificates that should be installed onto the virtual machines in the scale set. To install certificates
+ // on a virtual machine it is recommended to use the Azure Key Vault virtual
+ // machine extension for Linux [https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux] or the Azure
+ // Key Vault virtual machine extension for Windows
+ // [https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows].
+ Secrets []*VaultSecretGroup
+
+ // Specifies Windows operating system settings on the virtual machine.
+ WindowsConfiguration *WindowsConfiguration
+}
+
+// VirtualMachineScaleSetProperties - Describes the properties of a Virtual Machine Scale Set.
+type VirtualMachineScaleSetProperties struct {
+ // Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance:
+ // whether the Virtual Machines have the capability to support attaching
+ // managed data disks with UltraSSD_LRS storage account type.
+ AdditionalCapabilities *AdditionalCapabilities
+
+ // Policy for automatic repairs.
+ AutomaticRepairsPolicy *AutomaticRepairsPolicy
+
+ // Optional property which must either be set to True or omitted.
+ ConstrainedMaximumCapacity *bool
+
+ // When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This
+ // property will hence ensure that the extensions do not run on the extra
+ // overprovisioned VMs.
+ DoNotRunExtensionsOnOverprovisionedVMs *bool
+
+ // Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version:
+ // 2020-06-01.
+ HostGroup *SubResource
+
+ // Specifies the orchestration mode for the virtual machine scale set.
+ OrchestrationMode *OrchestrationMode
+
+ // Specifies whether the Virtual Machine Scale Set should be overprovisioned.
+ Overprovision *bool
+
+ // Fault Domain count for each placement group.
+ PlatformFaultDomainCount *int32
+
+ // Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.
+ PriorityMixPolicy *PriorityMixPolicy
+
+ // Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum
+ // api-version: 2018-04-01.
+ ProximityPlacementGroup *SubResource
+
+ // Policy for Resiliency
+ ResiliencyPolicy *ResiliencyPolicy
+
+ // Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
+ ScaleInPolicy *ScaleInPolicy
+
+ // The ScheduledEventsPolicy.
+ ScheduledEventsPolicy *ScheduledEventsPolicy
+
+ // When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup
+ // is true, it may be modified to false. However, if singlePlacementGroup
+ // is false, it may not be modified to true.
+ SinglePlacementGroup *bool
+
+ // Specifies the Spot Restore properties for the virtual machine scale set.
+ SpotRestorePolicy *SpotRestorePolicy
+
+ // The upgrade policy.
+ UpgradePolicy *UpgradePolicy
+
+ // The virtual machine profile.
+ VirtualMachineProfile *VirtualMachineScaleSetVMProfile
+
+ // Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property
+ // can only be set if the zones property of the scale set contains more than
+ // one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set.
+ ZoneBalance *bool
+
+ // READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string
+
+ // READ-ONLY; Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01.
+ TimeCreated *time.Time
+
+ // READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
+ UniqueID *string
+}
+
+// VirtualMachineScaleSetPublicIPAddressConfiguration - Describes a virtual machines scale set IP Configuration's PublicIPAddress
+// configuration
+type VirtualMachineScaleSetPublicIPAddressConfiguration struct {
+ // REQUIRED; The publicIP address configuration name.
+ Name *string
+
+ // Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration
+ Properties *VirtualMachineScaleSetPublicIPAddressConfigurationProperties
+
+ // Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.
+ SKU *PublicIPAddressSKU
+}
+
+// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings - Describes a virtual machines scale sets network configuration's
+// DNS settings.
+type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct {
+ // REQUIRED; The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels
+ // of the PublicIPAddress resources that will be created
+ DomainNameLabel *string
+
+ // The Domain name label scope.The concatenation of the hashed domain name label that generated according to the policy from
+ // domain name label scope and vm index will be the domain name labels of the
+ // PublicIPAddress resources that will be created
+ DomainNameLabelScope *DomainNameLabelScopeTypes
+}
+
+// VirtualMachineScaleSetPublicIPAddressConfigurationProperties - Describes a virtual machines scale set IP Configuration's
+// PublicIPAddress configuration
+type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct {
+ // The dns settings to be applied on the publicIP addresses .
+ DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings
+
+ // Specify what happens to the public IP when the VM is deleted
+ DeleteOption *DeleteOptions
+
+ // The list of IP tags associated with the public IP address.
+ IPTags []*VirtualMachineScaleSetIPTag
+
+ // The idle timeout of the public IP address.
+ IdleTimeoutInMinutes *int32
+
+ // Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default
+ // is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+ PublicIPAddressVersion *IPVersion
+
+ // The PublicIPPrefix from which to allocate publicIP addresses.
+ PublicIPPrefix *SubResource
+}
+
+// VirtualMachineScaleSetReimageParameters - Describes a Virtual Machine Scale Set VM Reimage Parameters.
+type VirtualMachineScaleSetReimageParameters struct {
+ // Specifies in decimal number, the version the OS disk should be reimaged to. If exact version is not provided, the OS disk
+ // is reimaged to the existing version of OS Disk.
+ ExactVersion *string
+
+ // Parameter to force update ephemeral OS disk for a virtual machine scale set VM
+ ForceUpdateOSDiskForEphemeral *bool
+
+ // The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation
+ // being performed on all virtual machines in the virtual machine scale set.
+ InstanceIDs []*string
+
+ // Specifies information required for reimaging the non-ephemeral OS disk.
+ OSProfile *OSProfileProvisioningData
+
+ // Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported
+ // for VM/VMSS with Ephemeral OS disk.
+ TempDisk *bool
+}
+
+// VirtualMachineScaleSetSKU - Describes an available virtual machine scale set sku.
+type VirtualMachineScaleSetSKU struct {
+ // READ-ONLY; Specifies the number of virtual machines in the scale set.
+ Capacity *VirtualMachineScaleSetSKUCapacity
+
+ // READ-ONLY; The type of resource the sku applies to.
+ ResourceType *string
+
+ // READ-ONLY; The Sku.
+ SKU *SKU
+}
+
+// VirtualMachineScaleSetSKUCapacity - Describes scaling information of a sku.
+type VirtualMachineScaleSetSKUCapacity struct {
+ // READ-ONLY; The default capacity.
+ DefaultCapacity *int64
+
+ // READ-ONLY; The maximum capacity that can be set.
+ Maximum *int64
+
+ // READ-ONLY; The minimum capacity.
+ Minimum *int64
+
+ // READ-ONLY; The scale type applicable to the sku.
+ ScaleType *VirtualMachineScaleSetSKUScaleType
+}
+
+// VirtualMachineScaleSetStorageProfile - Describes a virtual machine scale set storage profile.
+type VirtualMachineScaleSetStorageProfile struct {
+ // Specifies the parameters that are used to add data disks to the virtual machines in the scale set. For more information
+ // about disks, see About disks and VHDs for Azure virtual machines
+ // [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview].
+ DataDisks []*VirtualMachineScaleSetDataDisk
+ DiskControllerType *string
+
+ // Specifies information about the image to use. You can specify information about platform images, marketplace images, or
+ // virtual machine images. This element is required when you want to use a platform
+ // image, marketplace image, or virtual machine image, but is not used in other creation operations.
+ ImageReference *ImageReference
+
+ // Specifies information about the operating system disk used by the virtual machines in the scale set. For more information
+ // about disks, see About disks and VHDs for Azure virtual machines
+ // [https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview].
+ OSDisk *VirtualMachineScaleSetOSDisk
+}
+
+// VirtualMachineScaleSetUpdate - Describes a Virtual Machine Scale Set.
+type VirtualMachineScaleSetUpdate struct {
+ // The identity of the virtual machine scale set, if configured.
+ Identity *VirtualMachineScaleSetIdentity
+
+ // The purchase plan when deploying a virtual machine scale set from VM Marketplace images.
+ Plan *Plan
+
+ // Describes the properties of a Virtual Machine Scale Set.
+ Properties *VirtualMachineScaleSetUpdateProperties
+
+ // The virtual machine scale set sku.
+ SKU *SKU
+
+ // Resource tags
+ Tags map[string]*string
+}
+
+// VirtualMachineScaleSetUpdateIPConfiguration - Describes a virtual machine scale set network profile's IP configuration.
+// NOTE: The subnet of a scale set may be modified as long as the original subnet and the new subnet are in the same virtual
+// network
+type VirtualMachineScaleSetUpdateIPConfiguration struct {
+ // The IP configuration name.
+ Name *string
+
+ // Describes a virtual machine scale set network profile's IP configuration properties.
+ Properties *VirtualMachineScaleSetUpdateIPConfigurationProperties
+}
+
+// VirtualMachineScaleSetUpdateIPConfigurationProperties - Describes a virtual machine scale set network profile's IP configuration
+// properties.
+type VirtualMachineScaleSetUpdateIPConfigurationProperties struct {
+ // The application gateway backend address pools.
+ ApplicationGatewayBackendAddressPools []*SubResource
+
+ // Specifies an array of references to application security group.
+ ApplicationSecurityGroups []*SubResource
+
+ // The load balancer backend address pools.
+ LoadBalancerBackendAddressPools []*SubResource
+
+ // The load balancer inbound nat pools.
+ LoadBalancerInboundNatPools []*SubResource
+
+ // Specifies the primary IP Configuration in case the network interface has more than one IP Configuration.
+ Primary *bool
+
+ // Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default
+ // is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+ PrivateIPAddressVersion *IPVersion
+
+ // The publicIPAddressConfiguration.
+ PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration
+
+ // The subnet.
+ Subnet *APIEntityReference
+}
+
+// VirtualMachineScaleSetUpdateNetworkConfiguration - Describes a virtual machine scale set network profile's network configurations.
+type VirtualMachineScaleSetUpdateNetworkConfiguration struct {
+ // The network configuration name.
+ Name *string
+
+ // Describes a virtual machine scale set updatable network profile's IP configuration.Use this object for updating network
+ // profile's IP Configuration.
+ Properties *VirtualMachineScaleSetUpdateNetworkConfigurationProperties
+}
+
+// VirtualMachineScaleSetUpdateNetworkConfigurationProperties - Describes a virtual machine scale set updatable network profile's
+// IP configuration.Use this object for updating network profile's IP Configuration.
+type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct {
+ // Specifies whether the Auxiliary mode is enabled for the Network Interface resource.
+ AuxiliaryMode *NetworkInterfaceAuxiliaryMode
+
+ // Specifies whether the Auxiliary sku is enabled for the Network Interface resource.
+ AuxiliarySKU *NetworkInterfaceAuxiliarySKU
+
+ // The dns settings to be applied on the network interfaces.
+ DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings
+
+ // Specify what happens to the network interface when the VM is deleted
+ DeleteOption *DeleteOptions
+
+ // Specifies whether the network interface is disabled for tcp state tracking.
+ DisableTCPStateTracking *bool
+
+ // Specifies whether the network interface is accelerated networking-enabled.
+ EnableAcceleratedNetworking *bool
+
+ // Specifies whether the network interface is FPGA networking-enabled.
+ EnableFpga *bool
+
+ // Whether IP forwarding enabled on this NIC.
+ EnableIPForwarding *bool
+
+ // The virtual machine scale set IP Configuration.
+ IPConfigurations []*VirtualMachineScaleSetUpdateIPConfiguration
+
+ // The network security group.
+ NetworkSecurityGroup *SubResource
+
+ // Whether this is a primary NIC on a virtual machine.
+ Primary *bool
+}
+
+// VirtualMachineScaleSetUpdateNetworkProfile - Describes a virtual machine scale set network profile.
+type VirtualMachineScaleSetUpdateNetworkProfile struct {
+ // A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The
+ // reference will be in the form:
+ // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.
+ HealthProbe *APIEntityReference
+
+ // specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations
+ // for Virtual Machine Scale Set with orchestration mode 'Flexible'
+ NetworkAPIVersion *NetworkAPIVersion
+
+ // The list of network configurations.
+ NetworkInterfaceConfigurations []*VirtualMachineScaleSetUpdateNetworkConfiguration
+}
+
+// VirtualMachineScaleSetUpdateOSDisk - Describes virtual machine scale set operating system disk Update Object. This should
+// be used for Updating VMSS OS Disk.
+type VirtualMachineScaleSetUpdateOSDisk struct {
+ // The caching type.
+ Caching *CachingTypes
+
+ // Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with
+ // Flexible OrchestrationMode only).
+ // Possible values:
+ // Delete If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.
+ // Detach If this value is used, the OS disk is retained after VMSS Flex VM is deleted.
+ // The default value is set to Delete. For an Ephemeral OS Disk, the default value is set to Delete. User cannot change the
+ // delete option for Ephemeral OS Disk.
+ DeleteOption *DiskDeleteOptionTypes
+
+ // Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.
+ DiffDiskSettings *DiffDiskSettings
+
+ // Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a
+ // virtual machine image.
+ // diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023
+ DiskSizeGB *int32
+
+ // The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine.
+ // If SourceImage is provided, the destination VirtualHardDisk should not
+ // exist.
+ Image *VirtualHardDisk
+
+ // The managed disk parameters.
+ ManagedDisk *VirtualMachineScaleSetManagedDiskParameters
+
+ // The list of virtual hard disk container uris.
+ VhdContainers []*string
+
+ // Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool
+}
+
+// VirtualMachineScaleSetUpdateOSProfile - Describes a virtual machine scale set OS profile.
+type VirtualMachineScaleSetUpdateOSProfile struct {
+ // A base-64 encoded string of custom data.
+ CustomData *string
+
+ // The Linux Configuration of the OS profile.
+ LinuxConfiguration *LinuxConfiguration
+
+ // The List of certificates for addition to the VM.
+ Secrets []*VaultSecretGroup
+
+ // The Windows Configuration of the OS profile.
+ WindowsConfiguration *WindowsConfiguration
+}
+
+// VirtualMachineScaleSetUpdateProperties - Describes the properties of a Virtual Machine Scale Set.
+type VirtualMachineScaleSetUpdateProperties struct {
+ // Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance:
+ // whether the Virtual Machines have the capability to support attaching
+ // managed data disks with UltraSSD_LRS storage account type.
+ AdditionalCapabilities *AdditionalCapabilities
+
+ // Policy for automatic repairs.
+ AutomaticRepairsPolicy *AutomaticRepairsPolicy
+
+ // When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This
+ // property will hence ensure that the extensions do not run on the extra
+ // overprovisioned VMs.
+ DoNotRunExtensionsOnOverprovisionedVMs *bool
+
+ // Specifies whether the Virtual Machine Scale Set should be overprovisioned.
+ Overprovision *bool
+
+ // Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.
+ PriorityMixPolicy *PriorityMixPolicy
+
+ // Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.
+ // Minimum api-version: 2018-04-01.
+ ProximityPlacementGroup *SubResource
+
+ // Policy for Resiliency
+ ResiliencyPolicy *ResiliencyPolicy
+
+ // Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
+ ScaleInPolicy *ScaleInPolicy
+
+ // When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup
+ // is true, it may be modified to false. However, if singlePlacementGroup
+ // is false, it may not be modified to true.
+ SinglePlacementGroup *bool
+
+ // Specifies the Spot Restore properties for the virtual machine scale set.
+ SpotRestorePolicy *SpotRestorePolicy
+
+ // The upgrade policy.
+ UpgradePolicy *UpgradePolicy
+
+ // The virtual machine profile.
+ VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile
+}
+
+// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration - Describes a virtual machines scale set IP Configuration's PublicIPAddress
+// configuration
+type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct {
+ // The publicIP address configuration name.
+ Name *string
+
+ // Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration
+ Properties *VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
+}
+
+// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties - Describes a virtual machines scale set IP Configuration's
+// PublicIPAddress configuration
+type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct {
+ // The dns settings to be applied on the publicIP addresses .
+ DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings
+
+ // Specify what happens to the public IP when the VM is deleted
+ DeleteOption *DeleteOptions
+
+ // The idle timeout of the public IP address.
+ IdleTimeoutInMinutes *int32
+
+ // The PublicIPPrefix from which to allocate publicIP addresses.
+ PublicIPPrefix *SubResource
+}
+
+// VirtualMachineScaleSetUpdateStorageProfile - Describes a virtual machine scale set storage profile.
+type VirtualMachineScaleSetUpdateStorageProfile struct {
+ // The data disks.
+ DataDisks []*VirtualMachineScaleSetDataDisk
+ DiskControllerType *string
+
+ // The image reference.
+ ImageReference *ImageReference
+
+ // The OS disk.
+ OSDisk *VirtualMachineScaleSetUpdateOSDisk
+}
+
+// VirtualMachineScaleSetUpdateVMProfile - Describes a virtual machine scale set virtual machine profile.
+type VirtualMachineScaleSetUpdateVMProfile struct {
+ // Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01.
+ BillingProfile *BillingProfile
+
+ // The virtual machine scale set diagnostics profile.
+ DiagnosticsProfile *DiagnosticsProfile
+
+ // The virtual machine scale set extension profile.
+ ExtensionProfile *VirtualMachineScaleSetExtensionProfile
+
+ // Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01.
+ HardwareProfile *VirtualMachineScaleSetHardwareProfile
+
+ // The license type, which is for bring your own license scenario.
+ LicenseType *string
+
+ // The virtual machine scale set network profile.
+ NetworkProfile *VirtualMachineScaleSetUpdateNetworkProfile
+
+ // The virtual machine scale set OS profile.
+ OSProfile *VirtualMachineScaleSetUpdateOSProfile
+
+ // Specifies Scheduled Event related configurations.
+ ScheduledEventsProfile *ScheduledEventsProfile
+
+ // The virtual machine scale set security posture reference.
+ SecurityPostureReference *SecurityPostureReferenceUpdate
+
+ // The virtual machine scale set Security profile
+ SecurityProfile *SecurityProfile
+
+ // The virtual machine scale set storage profile.
+ StorageProfile *VirtualMachineScaleSetUpdateStorageProfile
+
+ // UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.
+ // Minimum api-version: 2021-03-01
+ UserData *string
+}
+
+// VirtualMachineScaleSetVM - Describes a virtual machine scale set virtual machine.
+type VirtualMachineScaleSetVM struct {
+ // REQUIRED; Resource location
+ Location *string
+
+ // The identity of the virtual machine, if configured.
+ Identity *VirtualMachineIdentity
+
+ // Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace
+ // images. Before you can use a marketplace image from an API, you must
+ // enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click
+ // Want to deploy programmatically, Get Started ->. Enter any required
+ // information and then click Save.
+ Plan *Plan
+
+ // Describes the properties of a virtual machine scale set virtual machine.
+ Properties *VirtualMachineScaleSetVMProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // READ-ONLY; Etag is property returned in Update/Get response of the VMSS VM, so that customer can supply it in the header
+ // to ensure optimistic updates.
+ Etag *string
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; The virtual machine instance ID.
+ InstanceID *string
+
+ // READ-ONLY; Resource name
+ Name *string
+
+ // READ-ONLY; The virtual machine child extension resources.
+ Resources []*VirtualMachineExtension
+
+ // READ-ONLY; The virtual machine SKU.
+ SKU *SKU
+
+ // READ-ONLY; Resource type
+ Type *string
+
+ // READ-ONLY; The virtual machine zones.
+ Zones []*string
+}
+
+// VirtualMachineScaleSetVMExtension - Describes a VMSS VM Extension.
+type VirtualMachineScaleSetVMExtension struct {
+ // The location of the extension.
+ Location *string
+
+ // Describes the properties of a Virtual Machine Extension.
+ Properties *VirtualMachineExtensionProperties
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; The name of the extension.
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// VirtualMachineScaleSetVMExtensionUpdate - Describes a VMSS VM Extension.
+type VirtualMachineScaleSetVMExtensionUpdate struct {
+ // Describes the properties of a Virtual Machine Extension.
+ Properties *VirtualMachineExtensionUpdateProperties
+
+ // READ-ONLY; Resource Id
+ ID *string
+
+ // READ-ONLY; The name of the extension.
+ Name *string
+
+ // READ-ONLY; Resource type
+ Type *string
+}
+
+// VirtualMachineScaleSetVMExtensionsListResult - The List VMSS VM Extension operation response
+type VirtualMachineScaleSetVMExtensionsListResult struct {
+ // The list of VMSS VM extensions
+ Value []*VirtualMachineScaleSetVMExtension
+}
+
+// VirtualMachineScaleSetVMExtensionsSummary - Extensions summary for virtual machines of a virtual machine scale set.
+type VirtualMachineScaleSetVMExtensionsSummary struct {
+ // READ-ONLY; The extension name.
+ Name *string
+
+ // READ-ONLY; The extensions information.
+ StatusesSummary []*VirtualMachineStatusCodeCount
+}
+
+// VirtualMachineScaleSetVMInstanceIDs - Specifies a list of virtual machine instance IDs from the VM scale set.
+type VirtualMachineScaleSetVMInstanceIDs struct {
+ // The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation
+ // being performed on all virtual machines in the virtual machine scale set.
+ InstanceIDs []*string
+}
+
+// VirtualMachineScaleSetVMInstanceRequiredIDs - Specifies a list of virtual machine instance IDs from the VM scale set.
+type VirtualMachineScaleSetVMInstanceRequiredIDs struct {
+ // REQUIRED; The virtual machine scale set instance ids.
+ InstanceIDs []*string
+}
+
+// VirtualMachineScaleSetVMInstanceView - The instance view of a virtual machine scale set VM.
+type VirtualMachineScaleSetVMInstanceView struct {
+ // Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You
+ // can easily view the output of your console log. Azure also enables you to see
+ // a screenshot of the VM from the hypervisor.
+ BootDiagnostics *BootDiagnosticsInstanceView
+
+ // Specifies the host OS name of the virtual machine.
+ // This name cannot be updated after the VM is created.
+ // Max-length (Windows): 15 characters
+ // Max-length (Linux): 64 characters.
+ // For naming conventions and restrictions see Azure infrastructure services implementation guidelines
+ // [https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions].
+ ComputerName *string
+
+ // The disks information.
+ Disks []*DiskInstanceView
+
+ // The extensions information.
+ Extensions []*VirtualMachineExtensionInstanceView
+
+ // The hypervisor generation of the Virtual Machine [V1, V2]
+ HyperVGeneration *HyperVGeneration
+
+ // The Maintenance Operation status on the virtual machine.
+ MaintenanceRedeployStatus *MaintenanceRedeployStatus
+
+ // The Operating System running on the hybrid machine.
+ OSName *string
+
+ // The version of Operating System running on the hybrid machine.
+ OSVersion *string
+
+ // The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId.
+ PlacementGroupID *string
+
+ // The Fault Domain count.
+ PlatformFaultDomain *int32
+
+ // The Update Domain count.
+ PlatformUpdateDomain *int32
+
+ // The Remote desktop certificate thumbprint.
+ RdpThumbPrint *string
+
+ // The resource status information.
+ Statuses []*InstanceViewStatus
+
+ // The VM Agent running on the virtual machine.
+ VMAgent *VirtualMachineAgentInstanceView
+
+ // READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when
+ // the virtual machine is associated with a dedicated host group that has automatic
+ // placement enabled. Minimum api-version: 2020-06-01.
+ AssignedHost *string
+
+ // READ-ONLY; The health status for the VM.
+ VMHealth *VirtualMachineHealthStatus
+}
+
+// VirtualMachineScaleSetVMListResult - The List Virtual Machine Scale Set VMs operation response.
+type VirtualMachineScaleSetVMListResult struct {
+ // REQUIRED; The list of virtual machine scale sets VMs.
+ Value []*VirtualMachineScaleSetVM
+
+ // The uri to fetch the next page of Virtual Machine Scale Set VMs. Call ListNext() with this to fetch the next page of VMSS
+ // VMs
+ NextLink *string
+}
+
+// VirtualMachineScaleSetVMNetworkProfileConfiguration - Describes a virtual machine scale set VM network profile.
+type VirtualMachineScaleSetVMNetworkProfileConfiguration struct {
+ // The list of network configurations.
+ NetworkInterfaceConfigurations []*VirtualMachineScaleSetNetworkConfiguration
+}
+
+// VirtualMachineScaleSetVMProfile - Describes a virtual machine scale set virtual machine profile.
+type VirtualMachineScaleSetVMProfile struct {
+ // Specifies the gallery applications that should be made available to the VM/VMSS
+ ApplicationProfile *ApplicationProfile
+
+ // Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01.
+ BillingProfile *BillingProfile
+
+ // Specifies the capacity reservation related details of a scale set. Minimum api-version: 2021-04-01.
+ CapacityReservation *CapacityReservationProfile
+
+ // Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.
+ DiagnosticsProfile *DiagnosticsProfile
+
+ // Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines,
+ // both 'Deallocate' and 'Delete' are supported and the minimum api-version is
+ // 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
+ EvictionPolicy *VirtualMachineEvictionPolicyTypes
+
+ // Specifies a collection of settings for extensions installed on virtual machines in the scale set.
+ ExtensionProfile *VirtualMachineScaleSetExtensionProfile
+
+ // Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01.
+ HardwareProfile *VirtualMachineScaleSetHardwareProfile
+
+ // Specifies that the image or disk that is being used was licensed on-premises.
+ // Possible values for Windows Server operating system are:
+ // WindowsClient
+ // WindowsServer
+ // Possible values for Linux Server operating system are:
+ // RHELBYOS (for RHEL)
+ // SLESBYOS (for SUSE)
+ // For more information, see Azure Hybrid Use Benefit for Windows Server [https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing]
+ // Azure Hybrid Use Benefit for Linux Server [https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux]
+ // Minimum api-version: 2015-06-15
+ LicenseType *string
+
+ // Specifies properties of the network interfaces of the virtual machines in the scale set.
+ NetworkProfile *VirtualMachineScaleSetNetworkProfile
+
+ // Specifies the operating system settings for the virtual machines in the scale set.
+ OSProfile *VirtualMachineScaleSetOSProfile
+
+ // Specifies the priority for the virtual machines in the scale set. Minimum api-version: 2017-10-30-preview.
+ Priority *VirtualMachinePriorityTypes
+
+ // Specifies Scheduled Event related configurations.
+ ScheduledEventsProfile *ScheduledEventsProfile
+
+ // Specifies the security posture to be used in the scale set. Minimum api-version: 2023-03-01
+ SecurityPostureReference *SecurityPostureReference
+
+ // Specifies the Security related profile settings for the virtual machines in the scale set.
+ SecurityProfile *SecurityProfile
+
+ // Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when
+ // using 'latest' image version. Minimum api-version: 2022-11-01
+ ServiceArtifactReference *ServiceArtifactReference
+
+ // Specifies the storage settings for the virtual machine disks.
+ StorageProfile *VirtualMachineScaleSetStorageProfile
+
+ // UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets
+ // in here. Minimum api-version: 2021-03-01.
+ UserData *string
+
+ // READ-ONLY; Specifies the time in which this VM profile for the Virtual Machine Scale Set was created. Minimum API version
+ // for this property is 2024-03-01. This value will be added to VMSS Flex VM tags when
+ // creating/updating the VMSS VM Profile with minimum api-version 2024-03-01.
+ TimeCreated *time.Time
+}
+
+// VirtualMachineScaleSetVMProperties - Describes the properties of a virtual machine scale set virtual machine.
+type VirtualMachineScaleSetVMProperties struct {
+ // Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the
+ // virtual machine has the capability to support attaching managed data disks with
+ // UltraSSD_LRS storage account type.
+ AdditionalCapabilities *AdditionalCapabilities
+
+ // Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified
+ // in the same availability set are allocated to different nodes to maximize
+ // availability. For more information about availability sets, see Availability sets overview [https://docs.microsoft.com/azure/virtual-machines/availability-set-overview].
+ // For more information on Azure
+ // planned maintenance, see Maintenance and updates for Virtual Machines in Azure [https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates].
+ // Currently, a VM can only be added to
+ // availability set at creation time. An existing VM cannot be added to an availability set.
+ AvailabilitySet *SubResource
+
+ // Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.
+ DiagnosticsProfile *DiagnosticsProfile
+
+ // Specifies the hardware settings for the virtual machine.
+ HardwareProfile *HardwareProfile
+
+ // Specifies that the image or disk that is being used was licensed on-premises.
+ // Possible values for Windows Server operating system are:
+ // WindowsClient
+ // WindowsServer
+ // Possible values for Linux Server operating system are:
+ // RHELBYOS (for RHEL)
+ // SLESBYOS (for SUSE)
+ // For more information, see Azure Hybrid Use Benefit for Windows Server [https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing]
+ // Azure Hybrid Use Benefit for Linux Server [https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux]
+ // Minimum api-version: 2015-06-15
+ LicenseType *string
+
+ // Specifies the network interfaces of the virtual machine.
+ NetworkProfile *NetworkProfile
+
+ // Specifies the network profile configuration of the virtual machine.
+ NetworkProfileConfiguration *VirtualMachineScaleSetVMNetworkProfileConfiguration
+
+ // Specifies the operating system settings for the virtual machine.
+ OSProfile *OSProfile
+
+ // Specifies the protection policy of the virtual machine.
+ ProtectionPolicy *VirtualMachineScaleSetVMProtectionPolicy
+
+ // Specifies the Security related profile settings for the virtual machine.
+ SecurityProfile *SecurityProfile
+
+ // Specifies the storage settings for the virtual machine disks.
+ StorageProfile *StorageProfile
+
+ // UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.
+ // Minimum api-version: 2021-03-01
+ UserData *string
+
+ // READ-ONLY; The virtual machine instance view.
+ InstanceView *VirtualMachineScaleSetVMInstanceView
+
+ // READ-ONLY; Specifies whether the latest model has been applied to the virtual machine.
+ LatestModelApplied *bool
+
+ // READ-ONLY; Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or
+ // the customized model for the virtual machine.
+ ModelDefinitionApplied *string
+
+ // READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string
+
+ // READ-ONLY; Specifies the time at which the Virtual Machine resource was created.
+ // Minimum api-version: 2021-11-01.
+ TimeCreated *time.Time
+
+ // READ-ONLY; Azure VM unique ID.
+ VMID *string
+}
+
+// VirtualMachineScaleSetVMProtectionPolicy - The protection policy of a virtual machine scale set VM.
+type VirtualMachineScaleSetVMProtectionPolicy struct {
+ // Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.
+ ProtectFromScaleIn *bool
+
+ // Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied
+ // to the virtual machine scale set VM.
+ ProtectFromScaleSetActions *bool
+}
+
+// VirtualMachineScaleSetVMReimageParameters - Describes a Virtual Machine Scale Set VM Reimage Parameters.
+type VirtualMachineScaleSetVMReimageParameters struct {
+ // Specifies in decimal number, the version the OS disk should be reimaged to. If exact version is not provided, the OS disk
+ // is reimaged to the existing version of OS Disk.
+ ExactVersion *string
+
+ // Parameter to force update ephemeral OS disk for a virtual machine scale set VM
+ ForceUpdateOSDiskForEphemeral *bool
+
+ // Specifies information required for reimaging the non-ephemeral OS disk.
+ OSProfile *OSProfileProvisioningData
+
+ // Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported
+ // for VM/VMSS with Ephemeral OS disk.
+ TempDisk *bool
+}
+
+// VirtualMachineSize - Describes the properties of a VM size.
+type VirtualMachineSize struct {
+ // The maximum number of data disks that can be attached to the virtual machine size.
+ MaxDataDiskCount *int32
+
+ // The amount of memory, in MB, supported by the virtual machine size.
+ MemoryInMB *int32
+
+ // The name of the virtual machine size.
+ Name *string
+
+ // The number of cores supported by the virtual machine size. For Constrained vCPU capable VM sizes, this number represents
+ // the total vCPUs of quota that the VM uses. For accurate vCPU count, please
+ // refer to https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu or https://docs.microsoft.com/rest/api/compute/resourceskus/list
+ NumberOfCores *int32
+
+ // The OS disk size, in MB, allowed by the virtual machine size.
+ OSDiskSizeInMB *int32
+
+ // The resource disk size, in MB, allowed by the virtual machine size.
+ ResourceDiskSizeInMB *int32
+}
+
+// VirtualMachineSizeListResult - The List Virtual Machine operation response.
+type VirtualMachineSizeListResult struct {
+ // The list of virtual machine sizes.
+ Value []*VirtualMachineSize
+}
+
+// VirtualMachineSoftwarePatchProperties - Describes the properties of a Virtual Machine software patch.
+type VirtualMachineSoftwarePatchProperties struct {
+ // READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension
+ // logs.
+ ActivityID *string
+
+ // READ-ONLY; Describes the availability of a given patch.
+ AssessmentState *PatchAssessmentState
+
+ // READ-ONLY; The classification(s) of the patch as provided by the patch publisher.
+ Classifications []*string
+
+ // READ-ONLY; The KBID of the patch. Only applies to Windows patches.
+ KbID *string
+
+ // READ-ONLY; The UTC timestamp of the last update to this patch record.
+ LastModifiedDateTime *time.Time
+
+ // READ-ONLY; The friendly name of the patch.
+ Name *string
+
+ // READ-ONLY; A unique identifier for the patch.
+ PatchID *string
+
+ // READ-ONLY; The UTC timestamp when the repository published this patch.
+ PublishedDate *time.Time
+
+ // READ-ONLY; Describes the reboot requirements of the patch.
+ RebootBehavior *VMGuestPatchRebootBehavior
+
+ // READ-ONLY; The version number of the patch. This property applies only to Linux patches.
+ Version *string
+}
+
+// VirtualMachineStatusCodeCount - The status code and count of the virtual machine scale set instance view status summary.
+type VirtualMachineStatusCodeCount struct {
+ // READ-ONLY; The instance view status code.
+ Code *string
+
+ // READ-ONLY; The number of instances having a particular status code.
+ Count *int32
+}
+
+// VirtualMachineUpdate - Describes a Virtual Machine Update.
+type VirtualMachineUpdate struct {
+ // The identity of the virtual machine, if configured.
+ Identity *VirtualMachineIdentity
+
+ // Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace
+ // images. Before you can use a marketplace image from an API, you must
+ // enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click
+ // Want to deploy programmatically, Get Started ->. Enter any required
+ // information and then click Save.
+ Plan *Plan
+
+ // Describes the properties of a Virtual Machine.
+ Properties *VirtualMachineProperties
+
+ // Resource tags
+ Tags map[string]*string
+
+ // The virtual machine zones.
+ Zones []*string
+}
+
+// WinRMConfiguration - Describes Windows Remote Management configuration of the VM
+type WinRMConfiguration struct {
+ // The list of Windows Remote Management listeners
+ Listeners []*WinRMListener
+}
+
+// WinRMListener - Describes Protocol and thumbprint of Windows Remote Management listener
+type WinRMListener struct {
+ // This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault,
+ // see Add a key or secret to the key vault
+ // [https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add]. In this case, your certificate needs to be the
+ // Base64 encoding of the following JSON Object which is encoded in UTF-8:
+ // {
+ // "data":"",
+ // "dataType":"pfx",
+ // "password":""
+ // }
+ // To install certificates on a virtual machine it is recommended to use the Azure Key Vault virtual machine extension for
+ // Linux
+ // [https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux] or the Azure Key Vault virtual machine extension
+ // for Windows
+ // [https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows].
+ CertificateURL *string
+
+ // Specifies the protocol of WinRM listener. Possible values are: http, https.
+ Protocol *ProtocolTypes
+}
+
+// WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
+type WindowsConfiguration struct {
+ // Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is
+ // used by Windows Setup.
+ AdditionalUnattendContent []*AdditionalUnattendContent
+
+ // Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine
+ // scale sets, this property can be updated and updates will take effect on OS
+ // reprovisioning.
+ EnableAutomaticUpdates *bool
+
+ // Indicates whether VMAgent Platform Updates is enabled for the Windows virtual machine. Default value is false.
+ EnableVMAgentPlatformUpdates *bool
+
+ // [Preview Feature] Specifies settings related to VM Guest Patching on Windows.
+ PatchSettings *PatchSettings
+
+ // Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified
+ // in the request body, it is set to true by default. This will ensure that VM
+ // Agent is installed on the VM so that extensions can be added to the VM later.
+ ProvisionVMAgent *bool
+
+ // Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Possible values can be TimeZoneInfo.Id
+ // [https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id] value from time zones returned by
+ // TimeZoneInfo.GetSystemTimeZones
+ // [https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones].
+ TimeZone *string
+
+ // Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.
+ WinRM *WinRMConfiguration
+}
+
+// WindowsParameters - Input for InstallPatches on a Windows VM, as directly received by the API
+type WindowsParameters struct {
+ // The update classifications to select when installing patches for Windows.
+ ClassificationsToInclude []*VMGuestPatchClassificationWindows
+
+ // Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true.
+ ExcludeKbsRequiringReboot *bool
+
+ // Kbs to exclude in the patch operation
+ KbNumbersToExclude []*string
+
+ // Kbs to include in the patch operation
+ KbNumbersToInclude []*string
+
+ // This is used to install patches that were published on or before this given max published date.
+ MaxPatchPublishDate *time.Time
+}
+
+// WindowsVMGuestPatchAutomaticByPlatformSettings - Specifies additional settings to be applied when patch mode AutomaticByPlatform
+// is selected in Windows patch settings.
+type WindowsVMGuestPatchAutomaticByPlatformSettings struct {
+ // Enables customer to schedule patching without accidental upgrades
+ BypassPlatformSafetyChecksOnUserSchedule *bool
+
+ // Specifies the reboot setting for all AutomaticByPlatform patch installation operations.
+ RebootSetting *WindowsVMGuestPatchAutomaticByPlatformRebootSetting
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/models_serde.go
new file mode 100644
index 000000000..d31902139
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/models_serde.go
@@ -0,0 +1,20009 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "encoding/json"
+ "fmt"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "reflect"
+)
+
+// MarshalJSON implements the json.Marshaller interface for type APIEntityReference.
+func (a APIEntityReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", a.ID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type APIEntityReference.
+func (a *APIEntityReference) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &a.ID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type APIError.
+func (a APIError) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "code", a.Code)
+ populate(objectMap, "details", a.Details)
+ populate(objectMap, "innererror", a.Innererror)
+ populate(objectMap, "message", a.Message)
+ populate(objectMap, "target", a.Target)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type APIError.
+func (a *APIError) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "code":
+ err = unpopulate(val, "Code", &a.Code)
+ delete(rawMsg, key)
+ case "details":
+ err = unpopulate(val, "Details", &a.Details)
+ delete(rawMsg, key)
+ case "innererror":
+ err = unpopulate(val, "Innererror", &a.Innererror)
+ delete(rawMsg, key)
+ case "message":
+ err = unpopulate(val, "Message", &a.Message)
+ delete(rawMsg, key)
+ case "target":
+ err = unpopulate(val, "Target", &a.Target)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type APIErrorBase.
+func (a APIErrorBase) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "code", a.Code)
+ populate(objectMap, "message", a.Message)
+ populate(objectMap, "target", a.Target)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type APIErrorBase.
+func (a *APIErrorBase) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "code":
+ err = unpopulate(val, "Code", &a.Code)
+ delete(rawMsg, key)
+ case "message":
+ err = unpopulate(val, "Message", &a.Message)
+ delete(rawMsg, key)
+ case "target":
+ err = unpopulate(val, "Target", &a.Target)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type AccessURI.
+func (a AccessURI) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "accessSAS", a.AccessSAS)
+ populate(objectMap, "securityDataAccessSAS", a.SecurityDataAccessSAS)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type AccessURI.
+func (a *AccessURI) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "accessSAS":
+ err = unpopulate(val, "AccessSAS", &a.AccessSAS)
+ delete(rawMsg, key)
+ case "securityDataAccessSAS":
+ err = unpopulate(val, "SecurityDataAccessSAS", &a.SecurityDataAccessSAS)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type AdditionalCapabilities.
+func (a AdditionalCapabilities) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "hibernationEnabled", a.HibernationEnabled)
+ populate(objectMap, "ultraSSDEnabled", a.UltraSSDEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type AdditionalCapabilities.
+func (a *AdditionalCapabilities) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "hibernationEnabled":
+ err = unpopulate(val, "HibernationEnabled", &a.HibernationEnabled)
+ delete(rawMsg, key)
+ case "ultraSSDEnabled":
+ err = unpopulate(val, "UltraSSDEnabled", &a.UltraSSDEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type AdditionalUnattendContent.
+func (a AdditionalUnattendContent) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ objectMap["componentName"] = "Microsoft-Windows-Shell-Setup"
+ populate(objectMap, "content", a.Content)
+ objectMap["passName"] = "OobeSystem"
+ populate(objectMap, "settingName", a.SettingName)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type AdditionalUnattendContent.
+func (a *AdditionalUnattendContent) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "componentName":
+ err = unpopulate(val, "ComponentName", &a.ComponentName)
+ delete(rawMsg, key)
+ case "content":
+ err = unpopulate(val, "Content", &a.Content)
+ delete(rawMsg, key)
+ case "passName":
+ err = unpopulate(val, "PassName", &a.PassName)
+ delete(rawMsg, key)
+ case "settingName":
+ err = unpopulate(val, "SettingName", &a.SettingName)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type AlternativeOption.
+func (a AlternativeOption) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "type", a.Type)
+ populate(objectMap, "value", a.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type AlternativeOption.
+func (a *AlternativeOption) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "type":
+ err = unpopulate(val, "Type", &a.Type)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &a.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ApplicationProfile.
+func (a ApplicationProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "galleryApplications", a.GalleryApplications)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationProfile.
+func (a *ApplicationProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "galleryApplications":
+ err = unpopulate(val, "GalleryApplications", &a.GalleryApplications)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type AttachDetachDataDisksRequest.
+func (a AttachDetachDataDisksRequest) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dataDisksToAttach", a.DataDisksToAttach)
+ populate(objectMap, "dataDisksToDetach", a.DataDisksToDetach)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type AttachDetachDataDisksRequest.
+func (a *AttachDetachDataDisksRequest) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dataDisksToAttach":
+ err = unpopulate(val, "DataDisksToAttach", &a.DataDisksToAttach)
+ delete(rawMsg, key)
+ case "dataDisksToDetach":
+ err = unpopulate(val, "DataDisksToDetach", &a.DataDisksToDetach)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type AutomaticOSUpgradePolicy.
+func (a AutomaticOSUpgradePolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "disableAutomaticRollback", a.DisableAutomaticRollback)
+ populate(objectMap, "enableAutomaticOSUpgrade", a.EnableAutomaticOSUpgrade)
+ populate(objectMap, "osRollingUpgradeDeferral", a.OSRollingUpgradeDeferral)
+ populate(objectMap, "useRollingUpgradePolicy", a.UseRollingUpgradePolicy)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type AutomaticOSUpgradePolicy.
+func (a *AutomaticOSUpgradePolicy) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "disableAutomaticRollback":
+ err = unpopulate(val, "DisableAutomaticRollback", &a.DisableAutomaticRollback)
+ delete(rawMsg, key)
+ case "enableAutomaticOSUpgrade":
+ err = unpopulate(val, "EnableAutomaticOSUpgrade", &a.EnableAutomaticOSUpgrade)
+ delete(rawMsg, key)
+ case "osRollingUpgradeDeferral":
+ err = unpopulate(val, "OSRollingUpgradeDeferral", &a.OSRollingUpgradeDeferral)
+ delete(rawMsg, key)
+ case "useRollingUpgradePolicy":
+ err = unpopulate(val, "UseRollingUpgradePolicy", &a.UseRollingUpgradePolicy)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type AutomaticOSUpgradeProperties.
+func (a AutomaticOSUpgradeProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "automaticOSUpgradeSupported", a.AutomaticOSUpgradeSupported)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type AutomaticOSUpgradeProperties.
+func (a *AutomaticOSUpgradeProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "automaticOSUpgradeSupported":
+ err = unpopulate(val, "AutomaticOSUpgradeSupported", &a.AutomaticOSUpgradeSupported)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type AutomaticRepairsPolicy.
+func (a AutomaticRepairsPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "enabled", a.Enabled)
+ populate(objectMap, "gracePeriod", a.GracePeriod)
+ populate(objectMap, "repairAction", a.RepairAction)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type AutomaticRepairsPolicy.
+func (a *AutomaticRepairsPolicy) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "enabled":
+ err = unpopulate(val, "Enabled", &a.Enabled)
+ delete(rawMsg, key)
+ case "gracePeriod":
+ err = unpopulate(val, "GracePeriod", &a.GracePeriod)
+ delete(rawMsg, key)
+ case "repairAction":
+ err = unpopulate(val, "RepairAction", &a.RepairAction)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type AvailabilitySet.
+func (a AvailabilitySet) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", a.ID)
+ populate(objectMap, "location", a.Location)
+ populate(objectMap, "name", a.Name)
+ populate(objectMap, "properties", a.Properties)
+ populate(objectMap, "sku", a.SKU)
+ populate(objectMap, "tags", a.Tags)
+ populate(objectMap, "type", a.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type AvailabilitySet.
+func (a *AvailabilitySet) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &a.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &a.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &a.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &a.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &a.SKU)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &a.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &a.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type AvailabilitySetListResult.
+func (a AvailabilitySetListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", a.NextLink)
+ populate(objectMap, "value", a.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type AvailabilitySetListResult.
+func (a *AvailabilitySetListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &a.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &a.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type AvailabilitySetProperties.
+func (a AvailabilitySetProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "platformFaultDomainCount", a.PlatformFaultDomainCount)
+ populate(objectMap, "platformUpdateDomainCount", a.PlatformUpdateDomainCount)
+ populate(objectMap, "proximityPlacementGroup", a.ProximityPlacementGroup)
+ populate(objectMap, "statuses", a.Statuses)
+ populate(objectMap, "virtualMachines", a.VirtualMachines)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type AvailabilitySetProperties.
+func (a *AvailabilitySetProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "platformFaultDomainCount":
+ err = unpopulate(val, "PlatformFaultDomainCount", &a.PlatformFaultDomainCount)
+ delete(rawMsg, key)
+ case "platformUpdateDomainCount":
+ err = unpopulate(val, "PlatformUpdateDomainCount", &a.PlatformUpdateDomainCount)
+ delete(rawMsg, key)
+ case "proximityPlacementGroup":
+ err = unpopulate(val, "ProximityPlacementGroup", &a.ProximityPlacementGroup)
+ delete(rawMsg, key)
+ case "statuses":
+ err = unpopulate(val, "Statuses", &a.Statuses)
+ delete(rawMsg, key)
+ case "virtualMachines":
+ err = unpopulate(val, "VirtualMachines", &a.VirtualMachines)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type AvailabilitySetUpdate.
+func (a AvailabilitySetUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "properties", a.Properties)
+ populate(objectMap, "sku", a.SKU)
+ populate(objectMap, "tags", a.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type AvailabilitySetUpdate.
+func (a *AvailabilitySetUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "properties":
+ err = unpopulate(val, "Properties", &a.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &a.SKU)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &a.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type AvailablePatchSummary.
+func (a AvailablePatchSummary) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "assessmentActivityId", a.AssessmentActivityID)
+ populate(objectMap, "criticalAndSecurityPatchCount", a.CriticalAndSecurityPatchCount)
+ populate(objectMap, "error", a.Error)
+ populateDateTimeRFC3339(objectMap, "lastModifiedTime", a.LastModifiedTime)
+ populate(objectMap, "otherPatchCount", a.OtherPatchCount)
+ populate(objectMap, "rebootPending", a.RebootPending)
+ populateDateTimeRFC3339(objectMap, "startTime", a.StartTime)
+ populate(objectMap, "status", a.Status)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type AvailablePatchSummary.
+func (a *AvailablePatchSummary) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "assessmentActivityId":
+ err = unpopulate(val, "AssessmentActivityID", &a.AssessmentActivityID)
+ delete(rawMsg, key)
+ case "criticalAndSecurityPatchCount":
+ err = unpopulate(val, "CriticalAndSecurityPatchCount", &a.CriticalAndSecurityPatchCount)
+ delete(rawMsg, key)
+ case "error":
+ err = unpopulate(val, "Error", &a.Error)
+ delete(rawMsg, key)
+ case "lastModifiedTime":
+ err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &a.LastModifiedTime)
+ delete(rawMsg, key)
+ case "otherPatchCount":
+ err = unpopulate(val, "OtherPatchCount", &a.OtherPatchCount)
+ delete(rawMsg, key)
+ case "rebootPending":
+ err = unpopulate(val, "RebootPending", &a.RebootPending)
+ delete(rawMsg, key)
+ case "startTime":
+ err = unpopulateDateTimeRFC3339(val, "StartTime", &a.StartTime)
+ delete(rawMsg, key)
+ case "status":
+ err = unpopulate(val, "Status", &a.Status)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", a, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type BillingProfile.
+func (b BillingProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "maxPrice", b.MaxPrice)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type BillingProfile.
+func (b *BillingProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", b, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "maxPrice":
+ err = unpopulate(val, "MaxPrice", &b.MaxPrice)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", b, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type BootDiagnostics.
+func (b BootDiagnostics) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "enabled", b.Enabled)
+ populate(objectMap, "storageUri", b.StorageURI)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type BootDiagnostics.
+func (b *BootDiagnostics) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", b, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "enabled":
+ err = unpopulate(val, "Enabled", &b.Enabled)
+ delete(rawMsg, key)
+ case "storageUri":
+ err = unpopulate(val, "StorageURI", &b.StorageURI)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", b, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type BootDiagnosticsInstanceView.
+func (b BootDiagnosticsInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "consoleScreenshotBlobUri", b.ConsoleScreenshotBlobURI)
+ populate(objectMap, "serialConsoleLogBlobUri", b.SerialConsoleLogBlobURI)
+ populate(objectMap, "status", b.Status)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type BootDiagnosticsInstanceView.
+func (b *BootDiagnosticsInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", b, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "consoleScreenshotBlobUri":
+ err = unpopulate(val, "ConsoleScreenshotBlobURI", &b.ConsoleScreenshotBlobURI)
+ delete(rawMsg, key)
+ case "serialConsoleLogBlobUri":
+ err = unpopulate(val, "SerialConsoleLogBlobURI", &b.SerialConsoleLogBlobURI)
+ delete(rawMsg, key)
+ case "status":
+ err = unpopulate(val, "Status", &b.Status)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", b, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CapacityReservation.
+func (c CapacityReservation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", c.ID)
+ populate(objectMap, "location", c.Location)
+ populate(objectMap, "name", c.Name)
+ populate(objectMap, "properties", c.Properties)
+ populate(objectMap, "sku", c.SKU)
+ populate(objectMap, "tags", c.Tags)
+ populate(objectMap, "type", c.Type)
+ populate(objectMap, "zones", c.Zones)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityReservation.
+func (c *CapacityReservation) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &c.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &c.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &c.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &c.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &c.SKU)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &c.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &c.Type)
+ delete(rawMsg, key)
+ case "zones":
+ err = unpopulate(val, "Zones", &c.Zones)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CapacityReservationGroup.
+func (c CapacityReservationGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", c.ID)
+ populate(objectMap, "location", c.Location)
+ populate(objectMap, "name", c.Name)
+ populate(objectMap, "properties", c.Properties)
+ populate(objectMap, "tags", c.Tags)
+ populate(objectMap, "type", c.Type)
+ populate(objectMap, "zones", c.Zones)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityReservationGroup.
+func (c *CapacityReservationGroup) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &c.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &c.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &c.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &c.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &c.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &c.Type)
+ delete(rawMsg, key)
+ case "zones":
+ err = unpopulate(val, "Zones", &c.Zones)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CapacityReservationGroupInstanceView.
+func (c CapacityReservationGroupInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "capacityReservations", c.CapacityReservations)
+ populate(objectMap, "sharedSubscriptionIds", c.SharedSubscriptionIDs)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityReservationGroupInstanceView.
+func (c *CapacityReservationGroupInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "capacityReservations":
+ err = unpopulate(val, "CapacityReservations", &c.CapacityReservations)
+ delete(rawMsg, key)
+ case "sharedSubscriptionIds":
+ err = unpopulate(val, "SharedSubscriptionIDs", &c.SharedSubscriptionIDs)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CapacityReservationGroupListResult.
+func (c CapacityReservationGroupListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", c.NextLink)
+ populate(objectMap, "value", c.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityReservationGroupListResult.
+func (c *CapacityReservationGroupListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &c.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &c.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CapacityReservationGroupProperties.
+func (c CapacityReservationGroupProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "capacityReservations", c.CapacityReservations)
+ populate(objectMap, "instanceView", c.InstanceView)
+ populate(objectMap, "sharingProfile", c.SharingProfile)
+ populate(objectMap, "virtualMachinesAssociated", c.VirtualMachinesAssociated)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityReservationGroupProperties.
+func (c *CapacityReservationGroupProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "capacityReservations":
+ err = unpopulate(val, "CapacityReservations", &c.CapacityReservations)
+ delete(rawMsg, key)
+ case "instanceView":
+ err = unpopulate(val, "InstanceView", &c.InstanceView)
+ delete(rawMsg, key)
+ case "sharingProfile":
+ err = unpopulate(val, "SharingProfile", &c.SharingProfile)
+ delete(rawMsg, key)
+ case "virtualMachinesAssociated":
+ err = unpopulate(val, "VirtualMachinesAssociated", &c.VirtualMachinesAssociated)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CapacityReservationGroupUpdate.
+func (c CapacityReservationGroupUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "properties", c.Properties)
+ populate(objectMap, "tags", c.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityReservationGroupUpdate.
+func (c *CapacityReservationGroupUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "properties":
+ err = unpopulate(val, "Properties", &c.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &c.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CapacityReservationInstanceView.
+func (c CapacityReservationInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "statuses", c.Statuses)
+ populate(objectMap, "utilizationInfo", c.UtilizationInfo)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityReservationInstanceView.
+func (c *CapacityReservationInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "statuses":
+ err = unpopulate(val, "Statuses", &c.Statuses)
+ delete(rawMsg, key)
+ case "utilizationInfo":
+ err = unpopulate(val, "UtilizationInfo", &c.UtilizationInfo)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CapacityReservationInstanceViewWithName.
+func (c CapacityReservationInstanceViewWithName) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", c.Name)
+ populate(objectMap, "statuses", c.Statuses)
+ populate(objectMap, "utilizationInfo", c.UtilizationInfo)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityReservationInstanceViewWithName.
+func (c *CapacityReservationInstanceViewWithName) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &c.Name)
+ delete(rawMsg, key)
+ case "statuses":
+ err = unpopulate(val, "Statuses", &c.Statuses)
+ delete(rawMsg, key)
+ case "utilizationInfo":
+ err = unpopulate(val, "UtilizationInfo", &c.UtilizationInfo)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CapacityReservationListResult.
+func (c CapacityReservationListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", c.NextLink)
+ populate(objectMap, "value", c.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityReservationListResult.
+func (c *CapacityReservationListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &c.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &c.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CapacityReservationProfile.
+func (c CapacityReservationProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "capacityReservationGroup", c.CapacityReservationGroup)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityReservationProfile.
+func (c *CapacityReservationProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "capacityReservationGroup":
+ err = unpopulate(val, "CapacityReservationGroup", &c.CapacityReservationGroup)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CapacityReservationProperties.
+func (c CapacityReservationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "instanceView", c.InstanceView)
+ populate(objectMap, "platformFaultDomainCount", c.PlatformFaultDomainCount)
+ populate(objectMap, "provisioningState", c.ProvisioningState)
+ populateDateTimeRFC3339(objectMap, "provisioningTime", c.ProvisioningTime)
+ populate(objectMap, "reservationId", c.ReservationID)
+ populateDateTimeRFC3339(objectMap, "timeCreated", c.TimeCreated)
+ populate(objectMap, "virtualMachinesAssociated", c.VirtualMachinesAssociated)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityReservationProperties.
+func (c *CapacityReservationProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "instanceView":
+ err = unpopulate(val, "InstanceView", &c.InstanceView)
+ delete(rawMsg, key)
+ case "platformFaultDomainCount":
+ err = unpopulate(val, "PlatformFaultDomainCount", &c.PlatformFaultDomainCount)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &c.ProvisioningState)
+ delete(rawMsg, key)
+ case "provisioningTime":
+ err = unpopulateDateTimeRFC3339(val, "ProvisioningTime", &c.ProvisioningTime)
+ delete(rawMsg, key)
+ case "reservationId":
+ err = unpopulate(val, "ReservationID", &c.ReservationID)
+ delete(rawMsg, key)
+ case "timeCreated":
+ err = unpopulateDateTimeRFC3339(val, "TimeCreated", &c.TimeCreated)
+ delete(rawMsg, key)
+ case "virtualMachinesAssociated":
+ err = unpopulate(val, "VirtualMachinesAssociated", &c.VirtualMachinesAssociated)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CapacityReservationUpdate.
+func (c CapacityReservationUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "properties", c.Properties)
+ populate(objectMap, "sku", c.SKU)
+ populate(objectMap, "tags", c.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityReservationUpdate.
+func (c *CapacityReservationUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "properties":
+ err = unpopulate(val, "Properties", &c.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &c.SKU)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &c.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CapacityReservationUtilization.
+func (c CapacityReservationUtilization) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "currentCapacity", c.CurrentCapacity)
+ populate(objectMap, "virtualMachinesAllocated", c.VirtualMachinesAllocated)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CapacityReservationUtilization.
+func (c *CapacityReservationUtilization) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "currentCapacity":
+ err = unpopulate(val, "CurrentCapacity", &c.CurrentCapacity)
+ delete(rawMsg, key)
+ case "virtualMachinesAllocated":
+ err = unpopulate(val, "VirtualMachinesAllocated", &c.VirtualMachinesAllocated)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudService.
+func (c CloudService) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", c.ID)
+ populate(objectMap, "location", c.Location)
+ populate(objectMap, "name", c.Name)
+ populate(objectMap, "properties", c.Properties)
+ populate(objectMap, "systemData", c.SystemData)
+ populate(objectMap, "tags", c.Tags)
+ populate(objectMap, "type", c.Type)
+ populate(objectMap, "zones", c.Zones)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudService.
+func (c *CloudService) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &c.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &c.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &c.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &c.Properties)
+ delete(rawMsg, key)
+ case "systemData":
+ err = unpopulate(val, "SystemData", &c.SystemData)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &c.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &c.Type)
+ delete(rawMsg, key)
+ case "zones":
+ err = unpopulate(val, "Zones", &c.Zones)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceExtensionProfile.
+func (c CloudServiceExtensionProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "extensions", c.Extensions)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceExtensionProfile.
+func (c *CloudServiceExtensionProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "extensions":
+ err = unpopulate(val, "Extensions", &c.Extensions)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceExtensionProperties.
+func (c CloudServiceExtensionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "autoUpgradeMinorVersion", c.AutoUpgradeMinorVersion)
+ populate(objectMap, "forceUpdateTag", c.ForceUpdateTag)
+ populateAny(objectMap, "protectedSettings", c.ProtectedSettings)
+ populate(objectMap, "protectedSettingsFromKeyVault", c.ProtectedSettingsFromKeyVault)
+ populate(objectMap, "provisioningState", c.ProvisioningState)
+ populate(objectMap, "publisher", c.Publisher)
+ populate(objectMap, "rolesAppliedTo", c.RolesAppliedTo)
+ populateAny(objectMap, "settings", c.Settings)
+ populate(objectMap, "type", c.Type)
+ populate(objectMap, "typeHandlerVersion", c.TypeHandlerVersion)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceExtensionProperties.
+func (c *CloudServiceExtensionProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "autoUpgradeMinorVersion":
+ err = unpopulate(val, "AutoUpgradeMinorVersion", &c.AutoUpgradeMinorVersion)
+ delete(rawMsg, key)
+ case "forceUpdateTag":
+ err = unpopulate(val, "ForceUpdateTag", &c.ForceUpdateTag)
+ delete(rawMsg, key)
+ case "protectedSettings":
+ err = unpopulate(val, "ProtectedSettings", &c.ProtectedSettings)
+ delete(rawMsg, key)
+ case "protectedSettingsFromKeyVault":
+ err = unpopulate(val, "ProtectedSettingsFromKeyVault", &c.ProtectedSettingsFromKeyVault)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &c.ProvisioningState)
+ delete(rawMsg, key)
+ case "publisher":
+ err = unpopulate(val, "Publisher", &c.Publisher)
+ delete(rawMsg, key)
+ case "rolesAppliedTo":
+ err = unpopulate(val, "RolesAppliedTo", &c.RolesAppliedTo)
+ delete(rawMsg, key)
+ case "settings":
+ err = unpopulate(val, "Settings", &c.Settings)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &c.Type)
+ delete(rawMsg, key)
+ case "typeHandlerVersion":
+ err = unpopulate(val, "TypeHandlerVersion", &c.TypeHandlerVersion)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceInstanceView.
+func (c CloudServiceInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "privateIds", c.PrivateIDs)
+ populate(objectMap, "roleInstance", c.RoleInstance)
+ populate(objectMap, "sdkVersion", c.SdkVersion)
+ populate(objectMap, "statuses", c.Statuses)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceInstanceView.
+func (c *CloudServiceInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "privateIds":
+ err = unpopulate(val, "PrivateIDs", &c.PrivateIDs)
+ delete(rawMsg, key)
+ case "roleInstance":
+ err = unpopulate(val, "RoleInstance", &c.RoleInstance)
+ delete(rawMsg, key)
+ case "sdkVersion":
+ err = unpopulate(val, "SdkVersion", &c.SdkVersion)
+ delete(rawMsg, key)
+ case "statuses":
+ err = unpopulate(val, "Statuses", &c.Statuses)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceListResult.
+func (c CloudServiceListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", c.NextLink)
+ populate(objectMap, "value", c.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceListResult.
+func (c *CloudServiceListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &c.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &c.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceNetworkProfile.
+func (c CloudServiceNetworkProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "loadBalancerConfigurations", c.LoadBalancerConfigurations)
+ populate(objectMap, "slotType", c.SlotType)
+ populate(objectMap, "swappableCloudService", c.SwappableCloudService)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceNetworkProfile.
+func (c *CloudServiceNetworkProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "loadBalancerConfigurations":
+ err = unpopulate(val, "LoadBalancerConfigurations", &c.LoadBalancerConfigurations)
+ delete(rawMsg, key)
+ case "slotType":
+ err = unpopulate(val, "SlotType", &c.SlotType)
+ delete(rawMsg, key)
+ case "swappableCloudService":
+ err = unpopulate(val, "SwappableCloudService", &c.SwappableCloudService)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceOsProfile.
+func (c CloudServiceOsProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "secrets", c.Secrets)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceOsProfile.
+func (c *CloudServiceOsProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "secrets":
+ err = unpopulate(val, "Secrets", &c.Secrets)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceProperties.
+func (c CloudServiceProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "allowModelOverride", c.AllowModelOverride)
+ populate(objectMap, "configuration", c.Configuration)
+ populate(objectMap, "configurationUrl", c.ConfigurationURL)
+ populate(objectMap, "extensionProfile", c.ExtensionProfile)
+ populate(objectMap, "networkProfile", c.NetworkProfile)
+ populate(objectMap, "osProfile", c.OSProfile)
+ populate(objectMap, "packageUrl", c.PackageURL)
+ populate(objectMap, "provisioningState", c.ProvisioningState)
+ populate(objectMap, "roleProfile", c.RoleProfile)
+ populate(objectMap, "startCloudService", c.StartCloudService)
+ populate(objectMap, "uniqueId", c.UniqueID)
+ populate(objectMap, "upgradeMode", c.UpgradeMode)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceProperties.
+func (c *CloudServiceProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "allowModelOverride":
+ err = unpopulate(val, "AllowModelOverride", &c.AllowModelOverride)
+ delete(rawMsg, key)
+ case "configuration":
+ err = unpopulate(val, "Configuration", &c.Configuration)
+ delete(rawMsg, key)
+ case "configurationUrl":
+ err = unpopulate(val, "ConfigurationURL", &c.ConfigurationURL)
+ delete(rawMsg, key)
+ case "extensionProfile":
+ err = unpopulate(val, "ExtensionProfile", &c.ExtensionProfile)
+ delete(rawMsg, key)
+ case "networkProfile":
+ err = unpopulate(val, "NetworkProfile", &c.NetworkProfile)
+ delete(rawMsg, key)
+ case "osProfile":
+ err = unpopulate(val, "OSProfile", &c.OSProfile)
+ delete(rawMsg, key)
+ case "packageUrl":
+ err = unpopulate(val, "PackageURL", &c.PackageURL)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &c.ProvisioningState)
+ delete(rawMsg, key)
+ case "roleProfile":
+ err = unpopulate(val, "RoleProfile", &c.RoleProfile)
+ delete(rawMsg, key)
+ case "startCloudService":
+ err = unpopulate(val, "StartCloudService", &c.StartCloudService)
+ delete(rawMsg, key)
+ case "uniqueId":
+ err = unpopulate(val, "UniqueID", &c.UniqueID)
+ delete(rawMsg, key)
+ case "upgradeMode":
+ err = unpopulate(val, "UpgradeMode", &c.UpgradeMode)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceRole.
+func (c CloudServiceRole) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", c.ID)
+ populate(objectMap, "location", c.Location)
+ populate(objectMap, "name", c.Name)
+ populate(objectMap, "properties", c.Properties)
+ populate(objectMap, "sku", c.SKU)
+ populate(objectMap, "type", c.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceRole.
+func (c *CloudServiceRole) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &c.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &c.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &c.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &c.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &c.SKU)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &c.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceRoleListResult.
+func (c CloudServiceRoleListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", c.NextLink)
+ populate(objectMap, "value", c.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceRoleListResult.
+func (c *CloudServiceRoleListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &c.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &c.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceRoleProfile.
+func (c CloudServiceRoleProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "roles", c.Roles)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceRoleProfile.
+func (c *CloudServiceRoleProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "roles":
+ err = unpopulate(val, "Roles", &c.Roles)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceRoleProfileProperties.
+func (c CloudServiceRoleProfileProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", c.Name)
+ populate(objectMap, "sku", c.SKU)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceRoleProfileProperties.
+func (c *CloudServiceRoleProfileProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &c.Name)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &c.SKU)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceRoleProperties.
+func (c CloudServiceRoleProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "uniqueId", c.UniqueID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceRoleProperties.
+func (c *CloudServiceRoleProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "uniqueId":
+ err = unpopulate(val, "UniqueID", &c.UniqueID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceRoleSKU.
+func (c CloudServiceRoleSKU) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "capacity", c.Capacity)
+ populate(objectMap, "name", c.Name)
+ populate(objectMap, "tier", c.Tier)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceRoleSKU.
+func (c *CloudServiceRoleSKU) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "capacity":
+ err = unpopulate(val, "Capacity", &c.Capacity)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &c.Name)
+ delete(rawMsg, key)
+ case "tier":
+ err = unpopulate(val, "Tier", &c.Tier)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceUpdate.
+func (c CloudServiceUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "tags", c.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceUpdate.
+func (c *CloudServiceUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "tags":
+ err = unpopulate(val, "Tags", &c.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceVaultAndSecretReference.
+func (c CloudServiceVaultAndSecretReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "secretUrl", c.SecretURL)
+ populate(objectMap, "sourceVault", c.SourceVault)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceVaultAndSecretReference.
+func (c *CloudServiceVaultAndSecretReference) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "secretUrl":
+ err = unpopulate(val, "SecretURL", &c.SecretURL)
+ delete(rawMsg, key)
+ case "sourceVault":
+ err = unpopulate(val, "SourceVault", &c.SourceVault)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceVaultCertificate.
+func (c CloudServiceVaultCertificate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "certificateUrl", c.CertificateURL)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceVaultCertificate.
+func (c *CloudServiceVaultCertificate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "certificateUrl":
+ err = unpopulate(val, "CertificateURL", &c.CertificateURL)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CloudServiceVaultSecretGroup.
+func (c CloudServiceVaultSecretGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "sourceVault", c.SourceVault)
+ populate(objectMap, "vaultCertificates", c.VaultCertificates)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CloudServiceVaultSecretGroup.
+func (c *CloudServiceVaultSecretGroup) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "sourceVault":
+ err = unpopulate(val, "SourceVault", &c.SourceVault)
+ delete(rawMsg, key)
+ case "vaultCertificates":
+ err = unpopulate(val, "VaultCertificates", &c.VaultCertificates)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CommunityGallery.
+func (c CommunityGallery) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "identifier", c.Identifier)
+ populate(objectMap, "location", c.Location)
+ populate(objectMap, "name", c.Name)
+ populate(objectMap, "properties", c.Properties)
+ populate(objectMap, "type", c.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGallery.
+func (c *CommunityGallery) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "identifier":
+ err = unpopulate(val, "Identifier", &c.Identifier)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &c.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &c.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &c.Properties)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &c.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CommunityGalleryIdentifier.
+func (c CommunityGalleryIdentifier) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "uniqueId", c.UniqueID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryIdentifier.
+func (c *CommunityGalleryIdentifier) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "uniqueId":
+ err = unpopulate(val, "UniqueID", &c.UniqueID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CommunityGalleryImage.
+func (c CommunityGalleryImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "identifier", c.Identifier)
+ populate(objectMap, "location", c.Location)
+ populate(objectMap, "name", c.Name)
+ populate(objectMap, "properties", c.Properties)
+ populate(objectMap, "type", c.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryImage.
+func (c *CommunityGalleryImage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "identifier":
+ err = unpopulate(val, "Identifier", &c.Identifier)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &c.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &c.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &c.Properties)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &c.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CommunityGalleryImageIdentifier.
+func (c CommunityGalleryImageIdentifier) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "offer", c.Offer)
+ populate(objectMap, "publisher", c.Publisher)
+ populate(objectMap, "sku", c.SKU)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryImageIdentifier.
+func (c *CommunityGalleryImageIdentifier) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "offer":
+ err = unpopulate(val, "Offer", &c.Offer)
+ delete(rawMsg, key)
+ case "publisher":
+ err = unpopulate(val, "Publisher", &c.Publisher)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &c.SKU)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CommunityGalleryImageList.
+func (c CommunityGalleryImageList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", c.NextLink)
+ populate(objectMap, "value", c.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryImageList.
+func (c *CommunityGalleryImageList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &c.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &c.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CommunityGalleryImageProperties.
+func (c CommunityGalleryImageProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "architecture", c.Architecture)
+ populate(objectMap, "artifactTags", c.ArtifactTags)
+ populate(objectMap, "disallowed", c.Disallowed)
+ populate(objectMap, "disclaimer", c.Disclaimer)
+ populateDateTimeRFC3339(objectMap, "endOfLifeDate", c.EndOfLifeDate)
+ populate(objectMap, "eula", c.Eula)
+ populate(objectMap, "features", c.Features)
+ populate(objectMap, "hyperVGeneration", c.HyperVGeneration)
+ populate(objectMap, "identifier", c.Identifier)
+ populate(objectMap, "osState", c.OSState)
+ populate(objectMap, "osType", c.OSType)
+ populate(objectMap, "privacyStatementUri", c.PrivacyStatementURI)
+ populate(objectMap, "purchasePlan", c.PurchasePlan)
+ populate(objectMap, "recommended", c.Recommended)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryImageProperties.
+func (c *CommunityGalleryImageProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "architecture":
+ err = unpopulate(val, "Architecture", &c.Architecture)
+ delete(rawMsg, key)
+ case "artifactTags":
+ err = unpopulate(val, "ArtifactTags", &c.ArtifactTags)
+ delete(rawMsg, key)
+ case "disallowed":
+ err = unpopulate(val, "Disallowed", &c.Disallowed)
+ delete(rawMsg, key)
+ case "disclaimer":
+ err = unpopulate(val, "Disclaimer", &c.Disclaimer)
+ delete(rawMsg, key)
+ case "endOfLifeDate":
+ err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &c.EndOfLifeDate)
+ delete(rawMsg, key)
+ case "eula":
+ err = unpopulate(val, "Eula", &c.Eula)
+ delete(rawMsg, key)
+ case "features":
+ err = unpopulate(val, "Features", &c.Features)
+ delete(rawMsg, key)
+ case "hyperVGeneration":
+ err = unpopulate(val, "HyperVGeneration", &c.HyperVGeneration)
+ delete(rawMsg, key)
+ case "identifier":
+ err = unpopulate(val, "Identifier", &c.Identifier)
+ delete(rawMsg, key)
+ case "osState":
+ err = unpopulate(val, "OSState", &c.OSState)
+ delete(rawMsg, key)
+ case "osType":
+ err = unpopulate(val, "OSType", &c.OSType)
+ delete(rawMsg, key)
+ case "privacyStatementUri":
+ err = unpopulate(val, "PrivacyStatementURI", &c.PrivacyStatementURI)
+ delete(rawMsg, key)
+ case "purchasePlan":
+ err = unpopulate(val, "PurchasePlan", &c.PurchasePlan)
+ delete(rawMsg, key)
+ case "recommended":
+ err = unpopulate(val, "Recommended", &c.Recommended)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CommunityGalleryImageVersion.
+func (c CommunityGalleryImageVersion) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "identifier", c.Identifier)
+ populate(objectMap, "location", c.Location)
+ populate(objectMap, "name", c.Name)
+ populate(objectMap, "properties", c.Properties)
+ populate(objectMap, "type", c.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryImageVersion.
+func (c *CommunityGalleryImageVersion) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "identifier":
+ err = unpopulate(val, "Identifier", &c.Identifier)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &c.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &c.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &c.Properties)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &c.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CommunityGalleryImageVersionList.
+func (c CommunityGalleryImageVersionList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", c.NextLink)
+ populate(objectMap, "value", c.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryImageVersionList.
+func (c *CommunityGalleryImageVersionList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &c.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &c.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CommunityGalleryImageVersionProperties.
+func (c CommunityGalleryImageVersionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "artifactTags", c.ArtifactTags)
+ populate(objectMap, "disclaimer", c.Disclaimer)
+ populateDateTimeRFC3339(objectMap, "endOfLifeDate", c.EndOfLifeDate)
+ populate(objectMap, "excludeFromLatest", c.ExcludeFromLatest)
+ populateDateTimeRFC3339(objectMap, "publishedDate", c.PublishedDate)
+ populate(objectMap, "storageProfile", c.StorageProfile)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryImageVersionProperties.
+func (c *CommunityGalleryImageVersionProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "artifactTags":
+ err = unpopulate(val, "ArtifactTags", &c.ArtifactTags)
+ delete(rawMsg, key)
+ case "disclaimer":
+ err = unpopulate(val, "Disclaimer", &c.Disclaimer)
+ delete(rawMsg, key)
+ case "endOfLifeDate":
+ err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &c.EndOfLifeDate)
+ delete(rawMsg, key)
+ case "excludeFromLatest":
+ err = unpopulate(val, "ExcludeFromLatest", &c.ExcludeFromLatest)
+ delete(rawMsg, key)
+ case "publishedDate":
+ err = unpopulateDateTimeRFC3339(val, "PublishedDate", &c.PublishedDate)
+ delete(rawMsg, key)
+ case "storageProfile":
+ err = unpopulate(val, "StorageProfile", &c.StorageProfile)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CommunityGalleryInfo.
+func (c CommunityGalleryInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "communityGalleryEnabled", c.CommunityGalleryEnabled)
+ populate(objectMap, "eula", c.Eula)
+ populate(objectMap, "publicNamePrefix", c.PublicNamePrefix)
+ populate(objectMap, "publicNames", c.PublicNames)
+ populate(objectMap, "publisherContact", c.PublisherContact)
+ populate(objectMap, "publisherUri", c.PublisherURI)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryInfo.
+func (c *CommunityGalleryInfo) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "communityGalleryEnabled":
+ err = unpopulate(val, "CommunityGalleryEnabled", &c.CommunityGalleryEnabled)
+ delete(rawMsg, key)
+ case "eula":
+ err = unpopulate(val, "Eula", &c.Eula)
+ delete(rawMsg, key)
+ case "publicNamePrefix":
+ err = unpopulate(val, "PublicNamePrefix", &c.PublicNamePrefix)
+ delete(rawMsg, key)
+ case "publicNames":
+ err = unpopulate(val, "PublicNames", &c.PublicNames)
+ delete(rawMsg, key)
+ case "publisherContact":
+ err = unpopulate(val, "PublisherContact", &c.PublisherContact)
+ delete(rawMsg, key)
+ case "publisherUri":
+ err = unpopulate(val, "PublisherURI", &c.PublisherURI)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CommunityGalleryMetadata.
+func (c CommunityGalleryMetadata) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "eula", c.Eula)
+ populate(objectMap, "privacyStatementUri", c.PrivacyStatementURI)
+ populate(objectMap, "publicNames", c.PublicNames)
+ populate(objectMap, "publisherContact", c.PublisherContact)
+ populate(objectMap, "publisherUri", c.PublisherURI)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryMetadata.
+func (c *CommunityGalleryMetadata) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "eula":
+ err = unpopulate(val, "Eula", &c.Eula)
+ delete(rawMsg, key)
+ case "privacyStatementUri":
+ err = unpopulate(val, "PrivacyStatementURI", &c.PrivacyStatementURI)
+ delete(rawMsg, key)
+ case "publicNames":
+ err = unpopulate(val, "PublicNames", &c.PublicNames)
+ delete(rawMsg, key)
+ case "publisherContact":
+ err = unpopulate(val, "PublisherContact", &c.PublisherContact)
+ delete(rawMsg, key)
+ case "publisherUri":
+ err = unpopulate(val, "PublisherURI", &c.PublisherURI)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CommunityGalleryProperties.
+func (c CommunityGalleryProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "artifactTags", c.ArtifactTags)
+ populate(objectMap, "communityMetadata", c.CommunityMetadata)
+ populate(objectMap, "disclaimer", c.Disclaimer)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CommunityGalleryProperties.
+func (c *CommunityGalleryProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "artifactTags":
+ err = unpopulate(val, "ArtifactTags", &c.ArtifactTags)
+ delete(rawMsg, key)
+ case "communityMetadata":
+ err = unpopulate(val, "CommunityMetadata", &c.CommunityMetadata)
+ delete(rawMsg, key)
+ case "disclaimer":
+ err = unpopulate(val, "Disclaimer", &c.Disclaimer)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CopyCompletionError.
+func (c CopyCompletionError) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "errorCode", c.ErrorCode)
+ populate(objectMap, "errorMessage", c.ErrorMessage)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CopyCompletionError.
+func (c *CopyCompletionError) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "errorCode":
+ err = unpopulate(val, "ErrorCode", &c.ErrorCode)
+ delete(rawMsg, key)
+ case "errorMessage":
+ err = unpopulate(val, "ErrorMessage", &c.ErrorMessage)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type CreationData.
+func (c CreationData) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "createOption", c.CreateOption)
+ populate(objectMap, "elasticSanResourceId", c.ElasticSanResourceID)
+ populate(objectMap, "galleryImageReference", c.GalleryImageReference)
+ populate(objectMap, "imageReference", c.ImageReference)
+ populate(objectMap, "logicalSectorSize", c.LogicalSectorSize)
+ populate(objectMap, "performancePlus", c.PerformancePlus)
+ populate(objectMap, "provisionedBandwidthCopySpeed", c.ProvisionedBandwidthCopySpeed)
+ populate(objectMap, "securityDataUri", c.SecurityDataURI)
+ populate(objectMap, "sourceResourceId", c.SourceResourceID)
+ populate(objectMap, "sourceUri", c.SourceURI)
+ populate(objectMap, "sourceUniqueId", c.SourceUniqueID)
+ populate(objectMap, "storageAccountId", c.StorageAccountID)
+ populate(objectMap, "uploadSizeBytes", c.UploadSizeBytes)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type CreationData.
+func (c *CreationData) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "createOption":
+ err = unpopulate(val, "CreateOption", &c.CreateOption)
+ delete(rawMsg, key)
+ case "elasticSanResourceId":
+ err = unpopulate(val, "ElasticSanResourceID", &c.ElasticSanResourceID)
+ delete(rawMsg, key)
+ case "galleryImageReference":
+ err = unpopulate(val, "GalleryImageReference", &c.GalleryImageReference)
+ delete(rawMsg, key)
+ case "imageReference":
+ err = unpopulate(val, "ImageReference", &c.ImageReference)
+ delete(rawMsg, key)
+ case "logicalSectorSize":
+ err = unpopulate(val, "LogicalSectorSize", &c.LogicalSectorSize)
+ delete(rawMsg, key)
+ case "performancePlus":
+ err = unpopulate(val, "PerformancePlus", &c.PerformancePlus)
+ delete(rawMsg, key)
+ case "provisionedBandwidthCopySpeed":
+ err = unpopulate(val, "ProvisionedBandwidthCopySpeed", &c.ProvisionedBandwidthCopySpeed)
+ delete(rawMsg, key)
+ case "securityDataUri":
+ err = unpopulate(val, "SecurityDataURI", &c.SecurityDataURI)
+ delete(rawMsg, key)
+ case "sourceResourceId":
+ err = unpopulate(val, "SourceResourceID", &c.SourceResourceID)
+ delete(rawMsg, key)
+ case "sourceUri":
+ err = unpopulate(val, "SourceURI", &c.SourceURI)
+ delete(rawMsg, key)
+ case "sourceUniqueId":
+ err = unpopulate(val, "SourceUniqueID", &c.SourceUniqueID)
+ delete(rawMsg, key)
+ case "storageAccountId":
+ err = unpopulate(val, "StorageAccountID", &c.StorageAccountID)
+ delete(rawMsg, key)
+ case "uploadSizeBytes":
+ err = unpopulate(val, "UploadSizeBytes", &c.UploadSizeBytes)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", c, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DataDisk.
+func (d DataDisk) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "caching", d.Caching)
+ populate(objectMap, "createOption", d.CreateOption)
+ populate(objectMap, "deleteOption", d.DeleteOption)
+ populate(objectMap, "detachOption", d.DetachOption)
+ populate(objectMap, "diskIOPSReadWrite", d.DiskIOPSReadWrite)
+ populate(objectMap, "diskMBpsReadWrite", d.DiskMBpsReadWrite)
+ populate(objectMap, "diskSizeGB", d.DiskSizeGB)
+ populate(objectMap, "image", d.Image)
+ populate(objectMap, "lun", d.Lun)
+ populate(objectMap, "managedDisk", d.ManagedDisk)
+ populate(objectMap, "name", d.Name)
+ populate(objectMap, "sourceResource", d.SourceResource)
+ populate(objectMap, "toBeDetached", d.ToBeDetached)
+ populate(objectMap, "vhd", d.Vhd)
+ populate(objectMap, "writeAcceleratorEnabled", d.WriteAcceleratorEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DataDisk.
+func (d *DataDisk) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "caching":
+ err = unpopulate(val, "Caching", &d.Caching)
+ delete(rawMsg, key)
+ case "createOption":
+ err = unpopulate(val, "CreateOption", &d.CreateOption)
+ delete(rawMsg, key)
+ case "deleteOption":
+ err = unpopulate(val, "DeleteOption", &d.DeleteOption)
+ delete(rawMsg, key)
+ case "detachOption":
+ err = unpopulate(val, "DetachOption", &d.DetachOption)
+ delete(rawMsg, key)
+ case "diskIOPSReadWrite":
+ err = unpopulate(val, "DiskIOPSReadWrite", &d.DiskIOPSReadWrite)
+ delete(rawMsg, key)
+ case "diskMBpsReadWrite":
+ err = unpopulate(val, "DiskMBpsReadWrite", &d.DiskMBpsReadWrite)
+ delete(rawMsg, key)
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &d.DiskSizeGB)
+ delete(rawMsg, key)
+ case "image":
+ err = unpopulate(val, "Image", &d.Image)
+ delete(rawMsg, key)
+ case "lun":
+ err = unpopulate(val, "Lun", &d.Lun)
+ delete(rawMsg, key)
+ case "managedDisk":
+ err = unpopulate(val, "ManagedDisk", &d.ManagedDisk)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &d.Name)
+ delete(rawMsg, key)
+ case "sourceResource":
+ err = unpopulate(val, "SourceResource", &d.SourceResource)
+ delete(rawMsg, key)
+ case "toBeDetached":
+ err = unpopulate(val, "ToBeDetached", &d.ToBeDetached)
+ delete(rawMsg, key)
+ case "vhd":
+ err = unpopulate(val, "Vhd", &d.Vhd)
+ delete(rawMsg, key)
+ case "writeAcceleratorEnabled":
+ err = unpopulate(val, "WriteAcceleratorEnabled", &d.WriteAcceleratorEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DataDiskImage.
+func (d DataDiskImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "lun", d.Lun)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DataDiskImage.
+func (d *DataDiskImage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "lun":
+ err = unpopulate(val, "Lun", &d.Lun)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DataDiskImageEncryption.
+func (d DataDiskImageEncryption) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskEncryptionSetId", d.DiskEncryptionSetID)
+ populate(objectMap, "lun", d.Lun)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DataDiskImageEncryption.
+func (d *DataDiskImageEncryption) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskEncryptionSetId":
+ err = unpopulate(val, "DiskEncryptionSetID", &d.DiskEncryptionSetID)
+ delete(rawMsg, key)
+ case "lun":
+ err = unpopulate(val, "Lun", &d.Lun)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DataDisksToAttach.
+func (d DataDisksToAttach) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "caching", d.Caching)
+ populate(objectMap, "deleteOption", d.DeleteOption)
+ populate(objectMap, "diskEncryptionSet", d.DiskEncryptionSet)
+ populate(objectMap, "diskId", d.DiskID)
+ populate(objectMap, "lun", d.Lun)
+ populate(objectMap, "writeAcceleratorEnabled", d.WriteAcceleratorEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DataDisksToAttach.
+func (d *DataDisksToAttach) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "caching":
+ err = unpopulate(val, "Caching", &d.Caching)
+ delete(rawMsg, key)
+ case "deleteOption":
+ err = unpopulate(val, "DeleteOption", &d.DeleteOption)
+ delete(rawMsg, key)
+ case "diskEncryptionSet":
+ err = unpopulate(val, "DiskEncryptionSet", &d.DiskEncryptionSet)
+ delete(rawMsg, key)
+ case "diskId":
+ err = unpopulate(val, "DiskID", &d.DiskID)
+ delete(rawMsg, key)
+ case "lun":
+ err = unpopulate(val, "Lun", &d.Lun)
+ delete(rawMsg, key)
+ case "writeAcceleratorEnabled":
+ err = unpopulate(val, "WriteAcceleratorEnabled", &d.WriteAcceleratorEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DataDisksToDetach.
+func (d DataDisksToDetach) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "detachOption", d.DetachOption)
+ populate(objectMap, "diskId", d.DiskID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DataDisksToDetach.
+func (d *DataDisksToDetach) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "detachOption":
+ err = unpopulate(val, "DetachOption", &d.DetachOption)
+ delete(rawMsg, key)
+ case "diskId":
+ err = unpopulate(val, "DiskID", &d.DiskID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHost.
+func (d DedicatedHost) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", d.ID)
+ populate(objectMap, "location", d.Location)
+ populate(objectMap, "name", d.Name)
+ populate(objectMap, "properties", d.Properties)
+ populate(objectMap, "sku", d.SKU)
+ populate(objectMap, "tags", d.Tags)
+ populate(objectMap, "type", d.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHost.
+func (d *DedicatedHost) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &d.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &d.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &d.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &d.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &d.SKU)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &d.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &d.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHostAllocatableVM.
+func (d DedicatedHostAllocatableVM) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "count", d.Count)
+ populate(objectMap, "vmSize", d.VMSize)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostAllocatableVM.
+func (d *DedicatedHostAllocatableVM) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "count":
+ err = unpopulate(val, "Count", &d.Count)
+ delete(rawMsg, key)
+ case "vmSize":
+ err = unpopulate(val, "VMSize", &d.VMSize)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHostAvailableCapacity.
+func (d DedicatedHostAvailableCapacity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "allocatableVMs", d.AllocatableVMs)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostAvailableCapacity.
+func (d *DedicatedHostAvailableCapacity) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "allocatableVMs":
+ err = unpopulate(val, "AllocatableVMs", &d.AllocatableVMs)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroup.
+func (d DedicatedHostGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", d.ID)
+ populate(objectMap, "location", d.Location)
+ populate(objectMap, "name", d.Name)
+ populate(objectMap, "properties", d.Properties)
+ populate(objectMap, "tags", d.Tags)
+ populate(objectMap, "type", d.Type)
+ populate(objectMap, "zones", d.Zones)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostGroup.
+func (d *DedicatedHostGroup) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &d.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &d.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &d.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &d.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &d.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &d.Type)
+ delete(rawMsg, key)
+ case "zones":
+ err = unpopulate(val, "Zones", &d.Zones)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroupInstanceView.
+func (d DedicatedHostGroupInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "hosts", d.Hosts)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostGroupInstanceView.
+func (d *DedicatedHostGroupInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "hosts":
+ err = unpopulate(val, "Hosts", &d.Hosts)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroupListResult.
+func (d DedicatedHostGroupListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", d.NextLink)
+ populate(objectMap, "value", d.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostGroupListResult.
+func (d *DedicatedHostGroupListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &d.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &d.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroupProperties.
+func (d DedicatedHostGroupProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "additionalCapabilities", d.AdditionalCapabilities)
+ populate(objectMap, "hosts", d.Hosts)
+ populate(objectMap, "instanceView", d.InstanceView)
+ populate(objectMap, "platformFaultDomainCount", d.PlatformFaultDomainCount)
+ populate(objectMap, "supportAutomaticPlacement", d.SupportAutomaticPlacement)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostGroupProperties.
+func (d *DedicatedHostGroupProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "additionalCapabilities":
+ err = unpopulate(val, "AdditionalCapabilities", &d.AdditionalCapabilities)
+ delete(rawMsg, key)
+ case "hosts":
+ err = unpopulate(val, "Hosts", &d.Hosts)
+ delete(rawMsg, key)
+ case "instanceView":
+ err = unpopulate(val, "InstanceView", &d.InstanceView)
+ delete(rawMsg, key)
+ case "platformFaultDomainCount":
+ err = unpopulate(val, "PlatformFaultDomainCount", &d.PlatformFaultDomainCount)
+ delete(rawMsg, key)
+ case "supportAutomaticPlacement":
+ err = unpopulate(val, "SupportAutomaticPlacement", &d.SupportAutomaticPlacement)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroupPropertiesAdditionalCapabilities.
+func (d DedicatedHostGroupPropertiesAdditionalCapabilities) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "ultraSSDEnabled", d.UltraSSDEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostGroupPropertiesAdditionalCapabilities.
+func (d *DedicatedHostGroupPropertiesAdditionalCapabilities) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "ultraSSDEnabled":
+ err = unpopulate(val, "UltraSSDEnabled", &d.UltraSSDEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHostGroupUpdate.
+func (d DedicatedHostGroupUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "properties", d.Properties)
+ populate(objectMap, "tags", d.Tags)
+ populate(objectMap, "zones", d.Zones)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostGroupUpdate.
+func (d *DedicatedHostGroupUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "properties":
+ err = unpopulate(val, "Properties", &d.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &d.Tags)
+ delete(rawMsg, key)
+ case "zones":
+ err = unpopulate(val, "Zones", &d.Zones)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHostInstanceView.
+func (d DedicatedHostInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "assetId", d.AssetID)
+ populate(objectMap, "availableCapacity", d.AvailableCapacity)
+ populate(objectMap, "statuses", d.Statuses)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostInstanceView.
+func (d *DedicatedHostInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "assetId":
+ err = unpopulate(val, "AssetID", &d.AssetID)
+ delete(rawMsg, key)
+ case "availableCapacity":
+ err = unpopulate(val, "AvailableCapacity", &d.AvailableCapacity)
+ delete(rawMsg, key)
+ case "statuses":
+ err = unpopulate(val, "Statuses", &d.Statuses)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHostInstanceViewWithName.
+func (d DedicatedHostInstanceViewWithName) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "assetId", d.AssetID)
+ populate(objectMap, "availableCapacity", d.AvailableCapacity)
+ populate(objectMap, "name", d.Name)
+ populate(objectMap, "statuses", d.Statuses)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostInstanceViewWithName.
+func (d *DedicatedHostInstanceViewWithName) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "assetId":
+ err = unpopulate(val, "AssetID", &d.AssetID)
+ delete(rawMsg, key)
+ case "availableCapacity":
+ err = unpopulate(val, "AvailableCapacity", &d.AvailableCapacity)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &d.Name)
+ delete(rawMsg, key)
+ case "statuses":
+ err = unpopulate(val, "Statuses", &d.Statuses)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHostListResult.
+func (d DedicatedHostListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", d.NextLink)
+ populate(objectMap, "value", d.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostListResult.
+func (d *DedicatedHostListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &d.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &d.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHostProperties.
+func (d DedicatedHostProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "autoReplaceOnFailure", d.AutoReplaceOnFailure)
+ populate(objectMap, "hostId", d.HostID)
+ populate(objectMap, "instanceView", d.InstanceView)
+ populate(objectMap, "licenseType", d.LicenseType)
+ populate(objectMap, "platformFaultDomain", d.PlatformFaultDomain)
+ populate(objectMap, "provisioningState", d.ProvisioningState)
+ populateDateTimeRFC3339(objectMap, "provisioningTime", d.ProvisioningTime)
+ populateDateTimeRFC3339(objectMap, "timeCreated", d.TimeCreated)
+ populate(objectMap, "virtualMachines", d.VirtualMachines)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostProperties.
+func (d *DedicatedHostProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "autoReplaceOnFailure":
+ err = unpopulate(val, "AutoReplaceOnFailure", &d.AutoReplaceOnFailure)
+ delete(rawMsg, key)
+ case "hostId":
+ err = unpopulate(val, "HostID", &d.HostID)
+ delete(rawMsg, key)
+ case "instanceView":
+ err = unpopulate(val, "InstanceView", &d.InstanceView)
+ delete(rawMsg, key)
+ case "licenseType":
+ err = unpopulate(val, "LicenseType", &d.LicenseType)
+ delete(rawMsg, key)
+ case "platformFaultDomain":
+ err = unpopulate(val, "PlatformFaultDomain", &d.PlatformFaultDomain)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &d.ProvisioningState)
+ delete(rawMsg, key)
+ case "provisioningTime":
+ err = unpopulateDateTimeRFC3339(val, "ProvisioningTime", &d.ProvisioningTime)
+ delete(rawMsg, key)
+ case "timeCreated":
+ err = unpopulateDateTimeRFC3339(val, "TimeCreated", &d.TimeCreated)
+ delete(rawMsg, key)
+ case "virtualMachines":
+ err = unpopulate(val, "VirtualMachines", &d.VirtualMachines)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHostSizeListResult.
+func (d DedicatedHostSizeListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "value", d.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostSizeListResult.
+func (d *DedicatedHostSizeListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "value":
+ err = unpopulate(val, "Value", &d.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DedicatedHostUpdate.
+func (d DedicatedHostUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "properties", d.Properties)
+ populate(objectMap, "sku", d.SKU)
+ populate(objectMap, "tags", d.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHostUpdate.
+func (d *DedicatedHostUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "properties":
+ err = unpopulate(val, "Properties", &d.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &d.SKU)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &d.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiagnosticsProfile.
+func (d DiagnosticsProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "bootDiagnostics", d.BootDiagnostics)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnosticsProfile.
+func (d *DiagnosticsProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "bootDiagnostics":
+ err = unpopulate(val, "BootDiagnostics", &d.BootDiagnostics)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiffDiskSettings.
+func (d DiffDiskSettings) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "option", d.Option)
+ populate(objectMap, "placement", d.Placement)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiffDiskSettings.
+func (d *DiffDiskSettings) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "option":
+ err = unpopulate(val, "Option", &d.Option)
+ delete(rawMsg, key)
+ case "placement":
+ err = unpopulate(val, "Placement", &d.Placement)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type Disallowed.
+func (d Disallowed) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskTypes", d.DiskTypes)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type Disallowed.
+func (d *Disallowed) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskTypes":
+ err = unpopulate(val, "DiskTypes", &d.DiskTypes)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DisallowedConfiguration.
+func (d DisallowedConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "vmDiskType", d.VMDiskType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DisallowedConfiguration.
+func (d *DisallowedConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "vmDiskType":
+ err = unpopulate(val, "VMDiskType", &d.VMDiskType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type Disk.
+func (d Disk) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "extendedLocation", d.ExtendedLocation)
+ populate(objectMap, "id", d.ID)
+ populate(objectMap, "location", d.Location)
+ populate(objectMap, "managedBy", d.ManagedBy)
+ populate(objectMap, "managedByExtended", d.ManagedByExtended)
+ populate(objectMap, "name", d.Name)
+ populate(objectMap, "properties", d.Properties)
+ populate(objectMap, "sku", d.SKU)
+ populate(objectMap, "tags", d.Tags)
+ populate(objectMap, "type", d.Type)
+ populate(objectMap, "zones", d.Zones)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type Disk.
+func (d *Disk) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "extendedLocation":
+ err = unpopulate(val, "ExtendedLocation", &d.ExtendedLocation)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &d.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &d.Location)
+ delete(rawMsg, key)
+ case "managedBy":
+ err = unpopulate(val, "ManagedBy", &d.ManagedBy)
+ delete(rawMsg, key)
+ case "managedByExtended":
+ err = unpopulate(val, "ManagedByExtended", &d.ManagedByExtended)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &d.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &d.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &d.SKU)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &d.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &d.Type)
+ delete(rawMsg, key)
+ case "zones":
+ err = unpopulate(val, "Zones", &d.Zones)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskAccess.
+func (d DiskAccess) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "extendedLocation", d.ExtendedLocation)
+ populate(objectMap, "id", d.ID)
+ populate(objectMap, "location", d.Location)
+ populate(objectMap, "name", d.Name)
+ populate(objectMap, "properties", d.Properties)
+ populate(objectMap, "tags", d.Tags)
+ populate(objectMap, "type", d.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskAccess.
+func (d *DiskAccess) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "extendedLocation":
+ err = unpopulate(val, "ExtendedLocation", &d.ExtendedLocation)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &d.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &d.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &d.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &d.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &d.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &d.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskAccessList.
+func (d DiskAccessList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", d.NextLink)
+ populate(objectMap, "value", d.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskAccessList.
+func (d *DiskAccessList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &d.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &d.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskAccessProperties.
+func (d DiskAccessProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "privateEndpointConnections", d.PrivateEndpointConnections)
+ populate(objectMap, "provisioningState", d.ProvisioningState)
+ populateDateTimeRFC3339(objectMap, "timeCreated", d.TimeCreated)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskAccessProperties.
+func (d *DiskAccessProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "privateEndpointConnections":
+ err = unpopulate(val, "PrivateEndpointConnections", &d.PrivateEndpointConnections)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &d.ProvisioningState)
+ delete(rawMsg, key)
+ case "timeCreated":
+ err = unpopulateDateTimeRFC3339(val, "TimeCreated", &d.TimeCreated)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskAccessUpdate.
+func (d DiskAccessUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "tags", d.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskAccessUpdate.
+func (d *DiskAccessUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "tags":
+ err = unpopulate(val, "Tags", &d.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskEncryptionSet.
+func (d DiskEncryptionSet) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", d.ID)
+ populate(objectMap, "identity", d.Identity)
+ populate(objectMap, "location", d.Location)
+ populate(objectMap, "name", d.Name)
+ populate(objectMap, "properties", d.Properties)
+ populate(objectMap, "tags", d.Tags)
+ populate(objectMap, "type", d.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskEncryptionSet.
+func (d *DiskEncryptionSet) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &d.ID)
+ delete(rawMsg, key)
+ case "identity":
+ err = unpopulate(val, "Identity", &d.Identity)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &d.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &d.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &d.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &d.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &d.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskEncryptionSetList.
+func (d DiskEncryptionSetList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", d.NextLink)
+ populate(objectMap, "value", d.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskEncryptionSetList.
+func (d *DiskEncryptionSetList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &d.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &d.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskEncryptionSetParameters.
+func (d DiskEncryptionSetParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", d.ID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskEncryptionSetParameters.
+func (d *DiskEncryptionSetParameters) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &d.ID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskEncryptionSetUpdate.
+func (d DiskEncryptionSetUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "identity", d.Identity)
+ populate(objectMap, "properties", d.Properties)
+ populate(objectMap, "tags", d.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskEncryptionSetUpdate.
+func (d *DiskEncryptionSetUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "identity":
+ err = unpopulate(val, "Identity", &d.Identity)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &d.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &d.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskEncryptionSetUpdateProperties.
+func (d DiskEncryptionSetUpdateProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "activeKey", d.ActiveKey)
+ populate(objectMap, "encryptionType", d.EncryptionType)
+ populate(objectMap, "federatedClientId", d.FederatedClientID)
+ populate(objectMap, "rotationToLatestKeyVersionEnabled", d.RotationToLatestKeyVersionEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskEncryptionSetUpdateProperties.
+func (d *DiskEncryptionSetUpdateProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "activeKey":
+ err = unpopulate(val, "ActiveKey", &d.ActiveKey)
+ delete(rawMsg, key)
+ case "encryptionType":
+ err = unpopulate(val, "EncryptionType", &d.EncryptionType)
+ delete(rawMsg, key)
+ case "federatedClientId":
+ err = unpopulate(val, "FederatedClientID", &d.FederatedClientID)
+ delete(rawMsg, key)
+ case "rotationToLatestKeyVersionEnabled":
+ err = unpopulate(val, "RotationToLatestKeyVersionEnabled", &d.RotationToLatestKeyVersionEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskEncryptionSettings.
+func (d DiskEncryptionSettings) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskEncryptionKey", d.DiskEncryptionKey)
+ populate(objectMap, "enabled", d.Enabled)
+ populate(objectMap, "keyEncryptionKey", d.KeyEncryptionKey)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskEncryptionSettings.
+func (d *DiskEncryptionSettings) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskEncryptionKey":
+ err = unpopulate(val, "DiskEncryptionKey", &d.DiskEncryptionKey)
+ delete(rawMsg, key)
+ case "enabled":
+ err = unpopulate(val, "Enabled", &d.Enabled)
+ delete(rawMsg, key)
+ case "keyEncryptionKey":
+ err = unpopulate(val, "KeyEncryptionKey", &d.KeyEncryptionKey)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskImageEncryption.
+func (d DiskImageEncryption) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskEncryptionSetId", d.DiskEncryptionSetID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskImageEncryption.
+func (d *DiskImageEncryption) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskEncryptionSetId":
+ err = unpopulate(val, "DiskEncryptionSetID", &d.DiskEncryptionSetID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskInstanceView.
+func (d DiskInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "encryptionSettings", d.EncryptionSettings)
+ populate(objectMap, "name", d.Name)
+ populate(objectMap, "statuses", d.Statuses)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskInstanceView.
+func (d *DiskInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "encryptionSettings":
+ err = unpopulate(val, "EncryptionSettings", &d.EncryptionSettings)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &d.Name)
+ delete(rawMsg, key)
+ case "statuses":
+ err = unpopulate(val, "Statuses", &d.Statuses)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskList.
+func (d DiskList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", d.NextLink)
+ populate(objectMap, "value", d.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskList.
+func (d *DiskList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &d.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &d.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskProperties.
+func (d DiskProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "burstingEnabled", d.BurstingEnabled)
+ populateDateTimeRFC3339(objectMap, "burstingEnabledTime", d.BurstingEnabledTime)
+ populate(objectMap, "completionPercent", d.CompletionPercent)
+ populate(objectMap, "creationData", d.CreationData)
+ populate(objectMap, "dataAccessAuthMode", d.DataAccessAuthMode)
+ populate(objectMap, "diskAccessId", d.DiskAccessID)
+ populate(objectMap, "diskIOPSReadOnly", d.DiskIOPSReadOnly)
+ populate(objectMap, "diskIOPSReadWrite", d.DiskIOPSReadWrite)
+ populate(objectMap, "diskMBpsReadOnly", d.DiskMBpsReadOnly)
+ populate(objectMap, "diskMBpsReadWrite", d.DiskMBpsReadWrite)
+ populate(objectMap, "diskSizeBytes", d.DiskSizeBytes)
+ populate(objectMap, "diskSizeGB", d.DiskSizeGB)
+ populate(objectMap, "diskState", d.DiskState)
+ populate(objectMap, "encryption", d.Encryption)
+ populate(objectMap, "encryptionSettingsCollection", d.EncryptionSettingsCollection)
+ populate(objectMap, "hyperVGeneration", d.HyperVGeneration)
+ populateDateTimeRFC3339(objectMap, "LastOwnershipUpdateTime", d.LastOwnershipUpdateTime)
+ populate(objectMap, "maxShares", d.MaxShares)
+ populate(objectMap, "networkAccessPolicy", d.NetworkAccessPolicy)
+ populate(objectMap, "osType", d.OSType)
+ populate(objectMap, "optimizedForFrequentAttach", d.OptimizedForFrequentAttach)
+ populate(objectMap, "propertyUpdatesInProgress", d.PropertyUpdatesInProgress)
+ populate(objectMap, "provisioningState", d.ProvisioningState)
+ populate(objectMap, "publicNetworkAccess", d.PublicNetworkAccess)
+ populate(objectMap, "purchasePlan", d.PurchasePlan)
+ populate(objectMap, "securityProfile", d.SecurityProfile)
+ populate(objectMap, "shareInfo", d.ShareInfo)
+ populate(objectMap, "supportedCapabilities", d.SupportedCapabilities)
+ populate(objectMap, "supportsHibernation", d.SupportsHibernation)
+ populate(objectMap, "tier", d.Tier)
+ populateDateTimeRFC3339(objectMap, "timeCreated", d.TimeCreated)
+ populate(objectMap, "uniqueId", d.UniqueID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskProperties.
+func (d *DiskProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "burstingEnabled":
+ err = unpopulate(val, "BurstingEnabled", &d.BurstingEnabled)
+ delete(rawMsg, key)
+ case "burstingEnabledTime":
+ err = unpopulateDateTimeRFC3339(val, "BurstingEnabledTime", &d.BurstingEnabledTime)
+ delete(rawMsg, key)
+ case "completionPercent":
+ err = unpopulate(val, "CompletionPercent", &d.CompletionPercent)
+ delete(rawMsg, key)
+ case "creationData":
+ err = unpopulate(val, "CreationData", &d.CreationData)
+ delete(rawMsg, key)
+ case "dataAccessAuthMode":
+ err = unpopulate(val, "DataAccessAuthMode", &d.DataAccessAuthMode)
+ delete(rawMsg, key)
+ case "diskAccessId":
+ err = unpopulate(val, "DiskAccessID", &d.DiskAccessID)
+ delete(rawMsg, key)
+ case "diskIOPSReadOnly":
+ err = unpopulate(val, "DiskIOPSReadOnly", &d.DiskIOPSReadOnly)
+ delete(rawMsg, key)
+ case "diskIOPSReadWrite":
+ err = unpopulate(val, "DiskIOPSReadWrite", &d.DiskIOPSReadWrite)
+ delete(rawMsg, key)
+ case "diskMBpsReadOnly":
+ err = unpopulate(val, "DiskMBpsReadOnly", &d.DiskMBpsReadOnly)
+ delete(rawMsg, key)
+ case "diskMBpsReadWrite":
+ err = unpopulate(val, "DiskMBpsReadWrite", &d.DiskMBpsReadWrite)
+ delete(rawMsg, key)
+ case "diskSizeBytes":
+ err = unpopulate(val, "DiskSizeBytes", &d.DiskSizeBytes)
+ delete(rawMsg, key)
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &d.DiskSizeGB)
+ delete(rawMsg, key)
+ case "diskState":
+ err = unpopulate(val, "DiskState", &d.DiskState)
+ delete(rawMsg, key)
+ case "encryption":
+ err = unpopulate(val, "Encryption", &d.Encryption)
+ delete(rawMsg, key)
+ case "encryptionSettingsCollection":
+ err = unpopulate(val, "EncryptionSettingsCollection", &d.EncryptionSettingsCollection)
+ delete(rawMsg, key)
+ case "hyperVGeneration":
+ err = unpopulate(val, "HyperVGeneration", &d.HyperVGeneration)
+ delete(rawMsg, key)
+ case "LastOwnershipUpdateTime":
+ err = unpopulateDateTimeRFC3339(val, "LastOwnershipUpdateTime", &d.LastOwnershipUpdateTime)
+ delete(rawMsg, key)
+ case "maxShares":
+ err = unpopulate(val, "MaxShares", &d.MaxShares)
+ delete(rawMsg, key)
+ case "networkAccessPolicy":
+ err = unpopulate(val, "NetworkAccessPolicy", &d.NetworkAccessPolicy)
+ delete(rawMsg, key)
+ case "osType":
+ err = unpopulate(val, "OSType", &d.OSType)
+ delete(rawMsg, key)
+ case "optimizedForFrequentAttach":
+ err = unpopulate(val, "OptimizedForFrequentAttach", &d.OptimizedForFrequentAttach)
+ delete(rawMsg, key)
+ case "propertyUpdatesInProgress":
+ err = unpopulate(val, "PropertyUpdatesInProgress", &d.PropertyUpdatesInProgress)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &d.ProvisioningState)
+ delete(rawMsg, key)
+ case "publicNetworkAccess":
+ err = unpopulate(val, "PublicNetworkAccess", &d.PublicNetworkAccess)
+ delete(rawMsg, key)
+ case "purchasePlan":
+ err = unpopulate(val, "PurchasePlan", &d.PurchasePlan)
+ delete(rawMsg, key)
+ case "securityProfile":
+ err = unpopulate(val, "SecurityProfile", &d.SecurityProfile)
+ delete(rawMsg, key)
+ case "shareInfo":
+ err = unpopulate(val, "ShareInfo", &d.ShareInfo)
+ delete(rawMsg, key)
+ case "supportedCapabilities":
+ err = unpopulate(val, "SupportedCapabilities", &d.SupportedCapabilities)
+ delete(rawMsg, key)
+ case "supportsHibernation":
+ err = unpopulate(val, "SupportsHibernation", &d.SupportsHibernation)
+ delete(rawMsg, key)
+ case "tier":
+ err = unpopulate(val, "Tier", &d.Tier)
+ delete(rawMsg, key)
+ case "timeCreated":
+ err = unpopulateDateTimeRFC3339(val, "TimeCreated", &d.TimeCreated)
+ delete(rawMsg, key)
+ case "uniqueId":
+ err = unpopulate(val, "UniqueID", &d.UniqueID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskPurchasePlan.
+func (d DiskPurchasePlan) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", d.Name)
+ populate(objectMap, "product", d.Product)
+ populate(objectMap, "promotionCode", d.PromotionCode)
+ populate(objectMap, "publisher", d.Publisher)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskPurchasePlan.
+func (d *DiskPurchasePlan) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &d.Name)
+ delete(rawMsg, key)
+ case "product":
+ err = unpopulate(val, "Product", &d.Product)
+ delete(rawMsg, key)
+ case "promotionCode":
+ err = unpopulate(val, "PromotionCode", &d.PromotionCode)
+ delete(rawMsg, key)
+ case "publisher":
+ err = unpopulate(val, "Publisher", &d.Publisher)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskRestorePoint.
+func (d DiskRestorePoint) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", d.ID)
+ populate(objectMap, "name", d.Name)
+ populate(objectMap, "properties", d.Properties)
+ populate(objectMap, "type", d.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskRestorePoint.
+func (d *DiskRestorePoint) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &d.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &d.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &d.Properties)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &d.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskRestorePointAttributes.
+func (d DiskRestorePointAttributes) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "encryption", d.Encryption)
+ populate(objectMap, "id", d.ID)
+ populate(objectMap, "sourceDiskRestorePoint", d.SourceDiskRestorePoint)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskRestorePointAttributes.
+func (d *DiskRestorePointAttributes) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "encryption":
+ err = unpopulate(val, "Encryption", &d.Encryption)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &d.ID)
+ delete(rawMsg, key)
+ case "sourceDiskRestorePoint":
+ err = unpopulate(val, "SourceDiskRestorePoint", &d.SourceDiskRestorePoint)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskRestorePointInstanceView.
+func (d DiskRestorePointInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", d.ID)
+ populate(objectMap, "replicationStatus", d.ReplicationStatus)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskRestorePointInstanceView.
+func (d *DiskRestorePointInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &d.ID)
+ delete(rawMsg, key)
+ case "replicationStatus":
+ err = unpopulate(val, "ReplicationStatus", &d.ReplicationStatus)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskRestorePointList.
+func (d DiskRestorePointList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", d.NextLink)
+ populate(objectMap, "value", d.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskRestorePointList.
+func (d *DiskRestorePointList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &d.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &d.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskRestorePointProperties.
+func (d DiskRestorePointProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "completionPercent", d.CompletionPercent)
+ populate(objectMap, "diskAccessId", d.DiskAccessID)
+ populate(objectMap, "encryption", d.Encryption)
+ populate(objectMap, "familyId", d.FamilyID)
+ populate(objectMap, "hyperVGeneration", d.HyperVGeneration)
+ populate(objectMap, "networkAccessPolicy", d.NetworkAccessPolicy)
+ populate(objectMap, "osType", d.OSType)
+ populate(objectMap, "publicNetworkAccess", d.PublicNetworkAccess)
+ populate(objectMap, "purchasePlan", d.PurchasePlan)
+ populate(objectMap, "replicationState", d.ReplicationState)
+ populate(objectMap, "securityProfile", d.SecurityProfile)
+ populate(objectMap, "sourceResourceId", d.SourceResourceID)
+ populate(objectMap, "sourceResourceLocation", d.SourceResourceLocation)
+ populate(objectMap, "sourceUniqueId", d.SourceUniqueID)
+ populate(objectMap, "supportedCapabilities", d.SupportedCapabilities)
+ populate(objectMap, "supportsHibernation", d.SupportsHibernation)
+ populateDateTimeRFC3339(objectMap, "timeCreated", d.TimeCreated)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskRestorePointProperties.
+func (d *DiskRestorePointProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "completionPercent":
+ err = unpopulate(val, "CompletionPercent", &d.CompletionPercent)
+ delete(rawMsg, key)
+ case "diskAccessId":
+ err = unpopulate(val, "DiskAccessID", &d.DiskAccessID)
+ delete(rawMsg, key)
+ case "encryption":
+ err = unpopulate(val, "Encryption", &d.Encryption)
+ delete(rawMsg, key)
+ case "familyId":
+ err = unpopulate(val, "FamilyID", &d.FamilyID)
+ delete(rawMsg, key)
+ case "hyperVGeneration":
+ err = unpopulate(val, "HyperVGeneration", &d.HyperVGeneration)
+ delete(rawMsg, key)
+ case "networkAccessPolicy":
+ err = unpopulate(val, "NetworkAccessPolicy", &d.NetworkAccessPolicy)
+ delete(rawMsg, key)
+ case "osType":
+ err = unpopulate(val, "OSType", &d.OSType)
+ delete(rawMsg, key)
+ case "publicNetworkAccess":
+ err = unpopulate(val, "PublicNetworkAccess", &d.PublicNetworkAccess)
+ delete(rawMsg, key)
+ case "purchasePlan":
+ err = unpopulate(val, "PurchasePlan", &d.PurchasePlan)
+ delete(rawMsg, key)
+ case "replicationState":
+ err = unpopulate(val, "ReplicationState", &d.ReplicationState)
+ delete(rawMsg, key)
+ case "securityProfile":
+ err = unpopulate(val, "SecurityProfile", &d.SecurityProfile)
+ delete(rawMsg, key)
+ case "sourceResourceId":
+ err = unpopulate(val, "SourceResourceID", &d.SourceResourceID)
+ delete(rawMsg, key)
+ case "sourceResourceLocation":
+ err = unpopulate(val, "SourceResourceLocation", &d.SourceResourceLocation)
+ delete(rawMsg, key)
+ case "sourceUniqueId":
+ err = unpopulate(val, "SourceUniqueID", &d.SourceUniqueID)
+ delete(rawMsg, key)
+ case "supportedCapabilities":
+ err = unpopulate(val, "SupportedCapabilities", &d.SupportedCapabilities)
+ delete(rawMsg, key)
+ case "supportsHibernation":
+ err = unpopulate(val, "SupportsHibernation", &d.SupportsHibernation)
+ delete(rawMsg, key)
+ case "timeCreated":
+ err = unpopulateDateTimeRFC3339(val, "TimeCreated", &d.TimeCreated)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskRestorePointReplicationStatus.
+func (d DiskRestorePointReplicationStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "completionPercent", d.CompletionPercent)
+ populate(objectMap, "status", d.Status)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskRestorePointReplicationStatus.
+func (d *DiskRestorePointReplicationStatus) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "completionPercent":
+ err = unpopulate(val, "CompletionPercent", &d.CompletionPercent)
+ delete(rawMsg, key)
+ case "status":
+ err = unpopulate(val, "Status", &d.Status)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskSKU.
+func (d DiskSKU) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", d.Name)
+ populate(objectMap, "tier", d.Tier)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskSKU.
+func (d *DiskSKU) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &d.Name)
+ delete(rawMsg, key)
+ case "tier":
+ err = unpopulate(val, "Tier", &d.Tier)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskSecurityProfile.
+func (d DiskSecurityProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "secureVMDiskEncryptionSetId", d.SecureVMDiskEncryptionSetID)
+ populate(objectMap, "securityType", d.SecurityType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskSecurityProfile.
+func (d *DiskSecurityProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "secureVMDiskEncryptionSetId":
+ err = unpopulate(val, "SecureVMDiskEncryptionSetID", &d.SecureVMDiskEncryptionSetID)
+ delete(rawMsg, key)
+ case "securityType":
+ err = unpopulate(val, "SecurityType", &d.SecurityType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskUpdate.
+func (d DiskUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "properties", d.Properties)
+ populate(objectMap, "sku", d.SKU)
+ populate(objectMap, "tags", d.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskUpdate.
+func (d *DiskUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "properties":
+ err = unpopulate(val, "Properties", &d.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &d.SKU)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &d.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type DiskUpdateProperties.
+func (d DiskUpdateProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "burstingEnabled", d.BurstingEnabled)
+ populate(objectMap, "dataAccessAuthMode", d.DataAccessAuthMode)
+ populate(objectMap, "diskAccessId", d.DiskAccessID)
+ populate(objectMap, "diskIOPSReadOnly", d.DiskIOPSReadOnly)
+ populate(objectMap, "diskIOPSReadWrite", d.DiskIOPSReadWrite)
+ populate(objectMap, "diskMBpsReadOnly", d.DiskMBpsReadOnly)
+ populate(objectMap, "diskMBpsReadWrite", d.DiskMBpsReadWrite)
+ populate(objectMap, "diskSizeGB", d.DiskSizeGB)
+ populate(objectMap, "encryption", d.Encryption)
+ populate(objectMap, "encryptionSettingsCollection", d.EncryptionSettingsCollection)
+ populate(objectMap, "maxShares", d.MaxShares)
+ populate(objectMap, "networkAccessPolicy", d.NetworkAccessPolicy)
+ populate(objectMap, "osType", d.OSType)
+ populate(objectMap, "optimizedForFrequentAttach", d.OptimizedForFrequentAttach)
+ populate(objectMap, "propertyUpdatesInProgress", d.PropertyUpdatesInProgress)
+ populate(objectMap, "publicNetworkAccess", d.PublicNetworkAccess)
+ populate(objectMap, "purchasePlan", d.PurchasePlan)
+ populate(objectMap, "supportedCapabilities", d.SupportedCapabilities)
+ populate(objectMap, "supportsHibernation", d.SupportsHibernation)
+ populate(objectMap, "tier", d.Tier)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type DiskUpdateProperties.
+func (d *DiskUpdateProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "burstingEnabled":
+ err = unpopulate(val, "BurstingEnabled", &d.BurstingEnabled)
+ delete(rawMsg, key)
+ case "dataAccessAuthMode":
+ err = unpopulate(val, "DataAccessAuthMode", &d.DataAccessAuthMode)
+ delete(rawMsg, key)
+ case "diskAccessId":
+ err = unpopulate(val, "DiskAccessID", &d.DiskAccessID)
+ delete(rawMsg, key)
+ case "diskIOPSReadOnly":
+ err = unpopulate(val, "DiskIOPSReadOnly", &d.DiskIOPSReadOnly)
+ delete(rawMsg, key)
+ case "diskIOPSReadWrite":
+ err = unpopulate(val, "DiskIOPSReadWrite", &d.DiskIOPSReadWrite)
+ delete(rawMsg, key)
+ case "diskMBpsReadOnly":
+ err = unpopulate(val, "DiskMBpsReadOnly", &d.DiskMBpsReadOnly)
+ delete(rawMsg, key)
+ case "diskMBpsReadWrite":
+ err = unpopulate(val, "DiskMBpsReadWrite", &d.DiskMBpsReadWrite)
+ delete(rawMsg, key)
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &d.DiskSizeGB)
+ delete(rawMsg, key)
+ case "encryption":
+ err = unpopulate(val, "Encryption", &d.Encryption)
+ delete(rawMsg, key)
+ case "encryptionSettingsCollection":
+ err = unpopulate(val, "EncryptionSettingsCollection", &d.EncryptionSettingsCollection)
+ delete(rawMsg, key)
+ case "maxShares":
+ err = unpopulate(val, "MaxShares", &d.MaxShares)
+ delete(rawMsg, key)
+ case "networkAccessPolicy":
+ err = unpopulate(val, "NetworkAccessPolicy", &d.NetworkAccessPolicy)
+ delete(rawMsg, key)
+ case "osType":
+ err = unpopulate(val, "OSType", &d.OSType)
+ delete(rawMsg, key)
+ case "optimizedForFrequentAttach":
+ err = unpopulate(val, "OptimizedForFrequentAttach", &d.OptimizedForFrequentAttach)
+ delete(rawMsg, key)
+ case "propertyUpdatesInProgress":
+ err = unpopulate(val, "PropertyUpdatesInProgress", &d.PropertyUpdatesInProgress)
+ delete(rawMsg, key)
+ case "publicNetworkAccess":
+ err = unpopulate(val, "PublicNetworkAccess", &d.PublicNetworkAccess)
+ delete(rawMsg, key)
+ case "purchasePlan":
+ err = unpopulate(val, "PurchasePlan", &d.PurchasePlan)
+ delete(rawMsg, key)
+ case "supportedCapabilities":
+ err = unpopulate(val, "SupportedCapabilities", &d.SupportedCapabilities)
+ delete(rawMsg, key)
+ case "supportsHibernation":
+ err = unpopulate(val, "SupportsHibernation", &d.SupportsHibernation)
+ delete(rawMsg, key)
+ case "tier":
+ err = unpopulate(val, "Tier", &d.Tier)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", d, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type Encryption.
+func (e Encryption) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskEncryptionSetId", e.DiskEncryptionSetID)
+ populate(objectMap, "type", e.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type Encryption.
+func (e *Encryption) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskEncryptionSetId":
+ err = unpopulate(val, "DiskEncryptionSetID", &e.DiskEncryptionSetID)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &e.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type EncryptionIdentity.
+func (e EncryptionIdentity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "userAssignedIdentityResourceId", e.UserAssignedIdentityResourceID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionIdentity.
+func (e *EncryptionIdentity) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "userAssignedIdentityResourceId":
+ err = unpopulate(val, "UserAssignedIdentityResourceID", &e.UserAssignedIdentityResourceID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type EncryptionImages.
+func (e EncryptionImages) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dataDiskImages", e.DataDiskImages)
+ populate(objectMap, "osDiskImage", e.OSDiskImage)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionImages.
+func (e *EncryptionImages) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dataDiskImages":
+ err = unpopulate(val, "DataDiskImages", &e.DataDiskImages)
+ delete(rawMsg, key)
+ case "osDiskImage":
+ err = unpopulate(val, "OSDiskImage", &e.OSDiskImage)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type EncryptionSetIdentity.
+func (e EncryptionSetIdentity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "principalId", e.PrincipalID)
+ populate(objectMap, "tenantId", e.TenantID)
+ populate(objectMap, "type", e.Type)
+ populate(objectMap, "userAssignedIdentities", e.UserAssignedIdentities)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionSetIdentity.
+func (e *EncryptionSetIdentity) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "principalId":
+ err = unpopulate(val, "PrincipalID", &e.PrincipalID)
+ delete(rawMsg, key)
+ case "tenantId":
+ err = unpopulate(val, "TenantID", &e.TenantID)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &e.Type)
+ delete(rawMsg, key)
+ case "userAssignedIdentities":
+ err = unpopulate(val, "UserAssignedIdentities", &e.UserAssignedIdentities)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type EncryptionSetProperties.
+func (e EncryptionSetProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "activeKey", e.ActiveKey)
+ populate(objectMap, "autoKeyRotationError", e.AutoKeyRotationError)
+ populate(objectMap, "encryptionType", e.EncryptionType)
+ populate(objectMap, "federatedClientId", e.FederatedClientID)
+ populateDateTimeRFC3339(objectMap, "lastKeyRotationTimestamp", e.LastKeyRotationTimestamp)
+ populate(objectMap, "previousKeys", e.PreviousKeys)
+ populate(objectMap, "provisioningState", e.ProvisioningState)
+ populate(objectMap, "rotationToLatestKeyVersionEnabled", e.RotationToLatestKeyVersionEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionSetProperties.
+func (e *EncryptionSetProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "activeKey":
+ err = unpopulate(val, "ActiveKey", &e.ActiveKey)
+ delete(rawMsg, key)
+ case "autoKeyRotationError":
+ err = unpopulate(val, "AutoKeyRotationError", &e.AutoKeyRotationError)
+ delete(rawMsg, key)
+ case "encryptionType":
+ err = unpopulate(val, "EncryptionType", &e.EncryptionType)
+ delete(rawMsg, key)
+ case "federatedClientId":
+ err = unpopulate(val, "FederatedClientID", &e.FederatedClientID)
+ delete(rawMsg, key)
+ case "lastKeyRotationTimestamp":
+ err = unpopulateDateTimeRFC3339(val, "LastKeyRotationTimestamp", &e.LastKeyRotationTimestamp)
+ delete(rawMsg, key)
+ case "previousKeys":
+ err = unpopulate(val, "PreviousKeys", &e.PreviousKeys)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &e.ProvisioningState)
+ delete(rawMsg, key)
+ case "rotationToLatestKeyVersionEnabled":
+ err = unpopulate(val, "RotationToLatestKeyVersionEnabled", &e.RotationToLatestKeyVersionEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type EncryptionSettingsCollection.
+func (e EncryptionSettingsCollection) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "enabled", e.Enabled)
+ populate(objectMap, "encryptionSettings", e.EncryptionSettings)
+ populate(objectMap, "encryptionSettingsVersion", e.EncryptionSettingsVersion)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionSettingsCollection.
+func (e *EncryptionSettingsCollection) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "enabled":
+ err = unpopulate(val, "Enabled", &e.Enabled)
+ delete(rawMsg, key)
+ case "encryptionSettings":
+ err = unpopulate(val, "EncryptionSettings", &e.EncryptionSettings)
+ delete(rawMsg, key)
+ case "encryptionSettingsVersion":
+ err = unpopulate(val, "EncryptionSettingsVersion", &e.EncryptionSettingsVersion)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type EncryptionSettingsElement.
+func (e EncryptionSettingsElement) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskEncryptionKey", e.DiskEncryptionKey)
+ populate(objectMap, "keyEncryptionKey", e.KeyEncryptionKey)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionSettingsElement.
+func (e *EncryptionSettingsElement) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskEncryptionKey":
+ err = unpopulate(val, "DiskEncryptionKey", &e.DiskEncryptionKey)
+ delete(rawMsg, key)
+ case "keyEncryptionKey":
+ err = unpopulate(val, "KeyEncryptionKey", &e.KeyEncryptionKey)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type EventGridAndResourceGraph.
+func (e EventGridAndResourceGraph) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "enable", e.Enable)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type EventGridAndResourceGraph.
+func (e *EventGridAndResourceGraph) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "enable":
+ err = unpopulate(val, "Enable", &e.Enable)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ExtendedLocation.
+func (e ExtendedLocation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", e.Name)
+ populate(objectMap, "type", e.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation.
+func (e *ExtendedLocation) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &e.Name)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &e.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type Extension.
+func (e Extension) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", e.Name)
+ populate(objectMap, "properties", e.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type Extension.
+func (e *Extension) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &e.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &e.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", e, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type Gallery.
+func (g Gallery) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", g.ID)
+ populate(objectMap, "location", g.Location)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "properties", g.Properties)
+ populate(objectMap, "tags", g.Tags)
+ populate(objectMap, "type", g.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type Gallery.
+func (g *Gallery) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &g.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &g.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &g.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &g.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &g.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryApplication.
+func (g GalleryApplication) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", g.ID)
+ populate(objectMap, "location", g.Location)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "properties", g.Properties)
+ populate(objectMap, "tags", g.Tags)
+ populate(objectMap, "type", g.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplication.
+func (g *GalleryApplication) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &g.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &g.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &g.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &g.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &g.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationCustomAction.
+func (g GalleryApplicationCustomAction) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "description", g.Description)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "parameters", g.Parameters)
+ populate(objectMap, "script", g.Script)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationCustomAction.
+func (g *GalleryApplicationCustomAction) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "description":
+ err = unpopulate(val, "Description", &g.Description)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "parameters":
+ err = unpopulate(val, "Parameters", &g.Parameters)
+ delete(rawMsg, key)
+ case "script":
+ err = unpopulate(val, "Script", &g.Script)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationCustomActionParameter.
+func (g GalleryApplicationCustomActionParameter) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "defaultValue", g.DefaultValue)
+ populate(objectMap, "description", g.Description)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "required", g.Required)
+ populate(objectMap, "type", g.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationCustomActionParameter.
+func (g *GalleryApplicationCustomActionParameter) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "defaultValue":
+ err = unpopulate(val, "DefaultValue", &g.DefaultValue)
+ delete(rawMsg, key)
+ case "description":
+ err = unpopulate(val, "Description", &g.Description)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "required":
+ err = unpopulate(val, "Required", &g.Required)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &g.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationList.
+func (g GalleryApplicationList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", g.NextLink)
+ populate(objectMap, "value", g.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationList.
+func (g *GalleryApplicationList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &g.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &g.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationProperties.
+func (g GalleryApplicationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "customActions", g.CustomActions)
+ populate(objectMap, "description", g.Description)
+ populateDateTimeRFC3339(objectMap, "endOfLifeDate", g.EndOfLifeDate)
+ populate(objectMap, "eula", g.Eula)
+ populate(objectMap, "privacyStatementUri", g.PrivacyStatementURI)
+ populate(objectMap, "releaseNoteUri", g.ReleaseNoteURI)
+ populate(objectMap, "supportedOSType", g.SupportedOSType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationProperties.
+func (g *GalleryApplicationProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "customActions":
+ err = unpopulate(val, "CustomActions", &g.CustomActions)
+ delete(rawMsg, key)
+ case "description":
+ err = unpopulate(val, "Description", &g.Description)
+ delete(rawMsg, key)
+ case "endOfLifeDate":
+ err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &g.EndOfLifeDate)
+ delete(rawMsg, key)
+ case "eula":
+ err = unpopulate(val, "Eula", &g.Eula)
+ delete(rawMsg, key)
+ case "privacyStatementUri":
+ err = unpopulate(val, "PrivacyStatementURI", &g.PrivacyStatementURI)
+ delete(rawMsg, key)
+ case "releaseNoteUri":
+ err = unpopulate(val, "ReleaseNoteURI", &g.ReleaseNoteURI)
+ delete(rawMsg, key)
+ case "supportedOSType":
+ err = unpopulate(val, "SupportedOSType", &g.SupportedOSType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationUpdate.
+func (g GalleryApplicationUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", g.ID)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "properties", g.Properties)
+ populate(objectMap, "tags", g.Tags)
+ populate(objectMap, "type", g.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationUpdate.
+func (g *GalleryApplicationUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &g.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &g.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &g.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &g.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationVersion.
+func (g GalleryApplicationVersion) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", g.ID)
+ populate(objectMap, "location", g.Location)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "properties", g.Properties)
+ populate(objectMap, "tags", g.Tags)
+ populate(objectMap, "type", g.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationVersion.
+func (g *GalleryApplicationVersion) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &g.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &g.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &g.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &g.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &g.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationVersionList.
+func (g GalleryApplicationVersionList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", g.NextLink)
+ populate(objectMap, "value", g.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationVersionList.
+func (g *GalleryApplicationVersionList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &g.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &g.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationVersionProperties.
+func (g GalleryApplicationVersionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "provisioningState", g.ProvisioningState)
+ populate(objectMap, "publishingProfile", g.PublishingProfile)
+ populate(objectMap, "replicationStatus", g.ReplicationStatus)
+ populate(objectMap, "safetyProfile", g.SafetyProfile)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationVersionProperties.
+func (g *GalleryApplicationVersionProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &g.ProvisioningState)
+ delete(rawMsg, key)
+ case "publishingProfile":
+ err = unpopulate(val, "PublishingProfile", &g.PublishingProfile)
+ delete(rawMsg, key)
+ case "replicationStatus":
+ err = unpopulate(val, "ReplicationStatus", &g.ReplicationStatus)
+ delete(rawMsg, key)
+ case "safetyProfile":
+ err = unpopulate(val, "SafetyProfile", &g.SafetyProfile)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationVersionPublishingProfile.
+func (g GalleryApplicationVersionPublishingProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "advancedSettings", g.AdvancedSettings)
+ populate(objectMap, "customActions", g.CustomActions)
+ populate(objectMap, "enableHealthCheck", g.EnableHealthCheck)
+ populateDateTimeRFC3339(objectMap, "endOfLifeDate", g.EndOfLifeDate)
+ populate(objectMap, "excludeFromLatest", g.ExcludeFromLatest)
+ populate(objectMap, "manageActions", g.ManageActions)
+ populateDateTimeRFC3339(objectMap, "publishedDate", g.PublishedDate)
+ populate(objectMap, "replicaCount", g.ReplicaCount)
+ populate(objectMap, "replicationMode", g.ReplicationMode)
+ populate(objectMap, "settings", g.Settings)
+ populate(objectMap, "source", g.Source)
+ populate(objectMap, "storageAccountType", g.StorageAccountType)
+ populate(objectMap, "targetExtendedLocations", g.TargetExtendedLocations)
+ populate(objectMap, "targetRegions", g.TargetRegions)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationVersionPublishingProfile.
+func (g *GalleryApplicationVersionPublishingProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "advancedSettings":
+ err = unpopulate(val, "AdvancedSettings", &g.AdvancedSettings)
+ delete(rawMsg, key)
+ case "customActions":
+ err = unpopulate(val, "CustomActions", &g.CustomActions)
+ delete(rawMsg, key)
+ case "enableHealthCheck":
+ err = unpopulate(val, "EnableHealthCheck", &g.EnableHealthCheck)
+ delete(rawMsg, key)
+ case "endOfLifeDate":
+ err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &g.EndOfLifeDate)
+ delete(rawMsg, key)
+ case "excludeFromLatest":
+ err = unpopulate(val, "ExcludeFromLatest", &g.ExcludeFromLatest)
+ delete(rawMsg, key)
+ case "manageActions":
+ err = unpopulate(val, "ManageActions", &g.ManageActions)
+ delete(rawMsg, key)
+ case "publishedDate":
+ err = unpopulateDateTimeRFC3339(val, "PublishedDate", &g.PublishedDate)
+ delete(rawMsg, key)
+ case "replicaCount":
+ err = unpopulate(val, "ReplicaCount", &g.ReplicaCount)
+ delete(rawMsg, key)
+ case "replicationMode":
+ err = unpopulate(val, "ReplicationMode", &g.ReplicationMode)
+ delete(rawMsg, key)
+ case "settings":
+ err = unpopulate(val, "Settings", &g.Settings)
+ delete(rawMsg, key)
+ case "source":
+ err = unpopulate(val, "Source", &g.Source)
+ delete(rawMsg, key)
+ case "storageAccountType":
+ err = unpopulate(val, "StorageAccountType", &g.StorageAccountType)
+ delete(rawMsg, key)
+ case "targetExtendedLocations":
+ err = unpopulate(val, "TargetExtendedLocations", &g.TargetExtendedLocations)
+ delete(rawMsg, key)
+ case "targetRegions":
+ err = unpopulate(val, "TargetRegions", &g.TargetRegions)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationVersionSafetyProfile.
+func (g GalleryApplicationVersionSafetyProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "allowDeletionOfReplicatedLocations", g.AllowDeletionOfReplicatedLocations)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationVersionSafetyProfile.
+func (g *GalleryApplicationVersionSafetyProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "allowDeletionOfReplicatedLocations":
+ err = unpopulate(val, "AllowDeletionOfReplicatedLocations", &g.AllowDeletionOfReplicatedLocations)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryApplicationVersionUpdate.
+func (g GalleryApplicationVersionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", g.ID)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "properties", g.Properties)
+ populate(objectMap, "tags", g.Tags)
+ populate(objectMap, "type", g.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryApplicationVersionUpdate.
+func (g *GalleryApplicationVersionUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &g.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &g.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &g.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &g.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryArtifactPublishingProfileBase.
+func (g GalleryArtifactPublishingProfileBase) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populateDateTimeRFC3339(objectMap, "endOfLifeDate", g.EndOfLifeDate)
+ populate(objectMap, "excludeFromLatest", g.ExcludeFromLatest)
+ populateDateTimeRFC3339(objectMap, "publishedDate", g.PublishedDate)
+ populate(objectMap, "replicaCount", g.ReplicaCount)
+ populate(objectMap, "replicationMode", g.ReplicationMode)
+ populate(objectMap, "storageAccountType", g.StorageAccountType)
+ populate(objectMap, "targetExtendedLocations", g.TargetExtendedLocations)
+ populate(objectMap, "targetRegions", g.TargetRegions)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryArtifactPublishingProfileBase.
+func (g *GalleryArtifactPublishingProfileBase) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "endOfLifeDate":
+ err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &g.EndOfLifeDate)
+ delete(rawMsg, key)
+ case "excludeFromLatest":
+ err = unpopulate(val, "ExcludeFromLatest", &g.ExcludeFromLatest)
+ delete(rawMsg, key)
+ case "publishedDate":
+ err = unpopulateDateTimeRFC3339(val, "PublishedDate", &g.PublishedDate)
+ delete(rawMsg, key)
+ case "replicaCount":
+ err = unpopulate(val, "ReplicaCount", &g.ReplicaCount)
+ delete(rawMsg, key)
+ case "replicationMode":
+ err = unpopulate(val, "ReplicationMode", &g.ReplicationMode)
+ delete(rawMsg, key)
+ case "storageAccountType":
+ err = unpopulate(val, "StorageAccountType", &g.StorageAccountType)
+ delete(rawMsg, key)
+ case "targetExtendedLocations":
+ err = unpopulate(val, "TargetExtendedLocations", &g.TargetExtendedLocations)
+ delete(rawMsg, key)
+ case "targetRegions":
+ err = unpopulate(val, "TargetRegions", &g.TargetRegions)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryArtifactSafetyProfileBase.
+func (g GalleryArtifactSafetyProfileBase) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "allowDeletionOfReplicatedLocations", g.AllowDeletionOfReplicatedLocations)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryArtifactSafetyProfileBase.
+func (g *GalleryArtifactSafetyProfileBase) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "allowDeletionOfReplicatedLocations":
+ err = unpopulate(val, "AllowDeletionOfReplicatedLocations", &g.AllowDeletionOfReplicatedLocations)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryArtifactSource.
+func (g GalleryArtifactSource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "managedImage", g.ManagedImage)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryArtifactSource.
+func (g *GalleryArtifactSource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "managedImage":
+ err = unpopulate(val, "ManagedImage", &g.ManagedImage)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryArtifactVersionFullSource.
+func (g GalleryArtifactVersionFullSource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "communityGalleryImageId", g.CommunityGalleryImageID)
+ populate(objectMap, "id", g.ID)
+ populate(objectMap, "virtualMachineId", g.VirtualMachineID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryArtifactVersionFullSource.
+func (g *GalleryArtifactVersionFullSource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "communityGalleryImageId":
+ err = unpopulate(val, "CommunityGalleryImageID", &g.CommunityGalleryImageID)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &g.ID)
+ delete(rawMsg, key)
+ case "virtualMachineId":
+ err = unpopulate(val, "VirtualMachineID", &g.VirtualMachineID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryArtifactVersionSource.
+func (g GalleryArtifactVersionSource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", g.ID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryArtifactVersionSource.
+func (g *GalleryArtifactVersionSource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &g.ID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryDataDiskImage.
+func (g GalleryDataDiskImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "hostCaching", g.HostCaching)
+ populate(objectMap, "lun", g.Lun)
+ populate(objectMap, "sizeInGB", g.SizeInGB)
+ populate(objectMap, "source", g.Source)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryDataDiskImage.
+func (g *GalleryDataDiskImage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "hostCaching":
+ err = unpopulate(val, "HostCaching", &g.HostCaching)
+ delete(rawMsg, key)
+ case "lun":
+ err = unpopulate(val, "Lun", &g.Lun)
+ delete(rawMsg, key)
+ case "sizeInGB":
+ err = unpopulate(val, "SizeInGB", &g.SizeInGB)
+ delete(rawMsg, key)
+ case "source":
+ err = unpopulate(val, "Source", &g.Source)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryDiskImage.
+func (g GalleryDiskImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "hostCaching", g.HostCaching)
+ populate(objectMap, "sizeInGB", g.SizeInGB)
+ populate(objectMap, "source", g.Source)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryDiskImage.
+func (g *GalleryDiskImage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "hostCaching":
+ err = unpopulate(val, "HostCaching", &g.HostCaching)
+ delete(rawMsg, key)
+ case "sizeInGB":
+ err = unpopulate(val, "SizeInGB", &g.SizeInGB)
+ delete(rawMsg, key)
+ case "source":
+ err = unpopulate(val, "Source", &g.Source)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryDiskImageSource.
+func (g GalleryDiskImageSource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", g.ID)
+ populate(objectMap, "storageAccountId", g.StorageAccountID)
+ populate(objectMap, "uri", g.URI)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryDiskImageSource.
+func (g *GalleryDiskImageSource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &g.ID)
+ delete(rawMsg, key)
+ case "storageAccountId":
+ err = unpopulate(val, "StorageAccountID", &g.StorageAccountID)
+ delete(rawMsg, key)
+ case "uri":
+ err = unpopulate(val, "URI", &g.URI)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryExtendedLocation.
+func (g GalleryExtendedLocation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "type", g.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryExtendedLocation.
+func (g *GalleryExtendedLocation) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &g.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryIdentifier.
+func (g GalleryIdentifier) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "uniqueName", g.UniqueName)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryIdentifier.
+func (g *GalleryIdentifier) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "uniqueName":
+ err = unpopulate(val, "UniqueName", &g.UniqueName)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryImage.
+func (g GalleryImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", g.ID)
+ populate(objectMap, "location", g.Location)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "properties", g.Properties)
+ populate(objectMap, "tags", g.Tags)
+ populate(objectMap, "type", g.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImage.
+func (g *GalleryImage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &g.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &g.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &g.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &g.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &g.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryImageFeature.
+func (g GalleryImageFeature) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "value", g.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageFeature.
+func (g *GalleryImageFeature) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &g.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryImageIdentifier.
+func (g GalleryImageIdentifier) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "offer", g.Offer)
+ populate(objectMap, "publisher", g.Publisher)
+ populate(objectMap, "sku", g.SKU)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageIdentifier.
+func (g *GalleryImageIdentifier) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "offer":
+ err = unpopulate(val, "Offer", &g.Offer)
+ delete(rawMsg, key)
+ case "publisher":
+ err = unpopulate(val, "Publisher", &g.Publisher)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &g.SKU)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryImageList.
+func (g GalleryImageList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", g.NextLink)
+ populate(objectMap, "value", g.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageList.
+func (g *GalleryImageList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &g.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &g.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryImageProperties.
+func (g GalleryImageProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "architecture", g.Architecture)
+ populate(objectMap, "description", g.Description)
+ populate(objectMap, "disallowed", g.Disallowed)
+ populateDateTimeRFC3339(objectMap, "endOfLifeDate", g.EndOfLifeDate)
+ populate(objectMap, "eula", g.Eula)
+ populate(objectMap, "features", g.Features)
+ populate(objectMap, "hyperVGeneration", g.HyperVGeneration)
+ populate(objectMap, "identifier", g.Identifier)
+ populate(objectMap, "osState", g.OSState)
+ populate(objectMap, "osType", g.OSType)
+ populate(objectMap, "privacyStatementUri", g.PrivacyStatementURI)
+ populate(objectMap, "provisioningState", g.ProvisioningState)
+ populate(objectMap, "purchasePlan", g.PurchasePlan)
+ populate(objectMap, "recommended", g.Recommended)
+ populate(objectMap, "releaseNoteUri", g.ReleaseNoteURI)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageProperties.
+func (g *GalleryImageProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "architecture":
+ err = unpopulate(val, "Architecture", &g.Architecture)
+ delete(rawMsg, key)
+ case "description":
+ err = unpopulate(val, "Description", &g.Description)
+ delete(rawMsg, key)
+ case "disallowed":
+ err = unpopulate(val, "Disallowed", &g.Disallowed)
+ delete(rawMsg, key)
+ case "endOfLifeDate":
+ err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &g.EndOfLifeDate)
+ delete(rawMsg, key)
+ case "eula":
+ err = unpopulate(val, "Eula", &g.Eula)
+ delete(rawMsg, key)
+ case "features":
+ err = unpopulate(val, "Features", &g.Features)
+ delete(rawMsg, key)
+ case "hyperVGeneration":
+ err = unpopulate(val, "HyperVGeneration", &g.HyperVGeneration)
+ delete(rawMsg, key)
+ case "identifier":
+ err = unpopulate(val, "Identifier", &g.Identifier)
+ delete(rawMsg, key)
+ case "osState":
+ err = unpopulate(val, "OSState", &g.OSState)
+ delete(rawMsg, key)
+ case "osType":
+ err = unpopulate(val, "OSType", &g.OSType)
+ delete(rawMsg, key)
+ case "privacyStatementUri":
+ err = unpopulate(val, "PrivacyStatementURI", &g.PrivacyStatementURI)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &g.ProvisioningState)
+ delete(rawMsg, key)
+ case "purchasePlan":
+ err = unpopulate(val, "PurchasePlan", &g.PurchasePlan)
+ delete(rawMsg, key)
+ case "recommended":
+ err = unpopulate(val, "Recommended", &g.Recommended)
+ delete(rawMsg, key)
+ case "releaseNoteUri":
+ err = unpopulate(val, "ReleaseNoteURI", &g.ReleaseNoteURI)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryImageUpdate.
+func (g GalleryImageUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", g.ID)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "properties", g.Properties)
+ populate(objectMap, "tags", g.Tags)
+ populate(objectMap, "type", g.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageUpdate.
+func (g *GalleryImageUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &g.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &g.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &g.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &g.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryImageVersion.
+func (g GalleryImageVersion) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", g.ID)
+ populate(objectMap, "location", g.Location)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "properties", g.Properties)
+ populate(objectMap, "tags", g.Tags)
+ populate(objectMap, "type", g.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageVersion.
+func (g *GalleryImageVersion) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &g.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &g.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &g.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &g.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &g.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionList.
+func (g GalleryImageVersionList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", g.NextLink)
+ populate(objectMap, "value", g.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageVersionList.
+func (g *GalleryImageVersionList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &g.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &g.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionProperties.
+func (g GalleryImageVersionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "provisioningState", g.ProvisioningState)
+ populate(objectMap, "publishingProfile", g.PublishingProfile)
+ populate(objectMap, "replicationStatus", g.ReplicationStatus)
+ populate(objectMap, "safetyProfile", g.SafetyProfile)
+ populate(objectMap, "securityProfile", g.SecurityProfile)
+ populate(objectMap, "storageProfile", g.StorageProfile)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageVersionProperties.
+func (g *GalleryImageVersionProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &g.ProvisioningState)
+ delete(rawMsg, key)
+ case "publishingProfile":
+ err = unpopulate(val, "PublishingProfile", &g.PublishingProfile)
+ delete(rawMsg, key)
+ case "replicationStatus":
+ err = unpopulate(val, "ReplicationStatus", &g.ReplicationStatus)
+ delete(rawMsg, key)
+ case "safetyProfile":
+ err = unpopulate(val, "SafetyProfile", &g.SafetyProfile)
+ delete(rawMsg, key)
+ case "securityProfile":
+ err = unpopulate(val, "SecurityProfile", &g.SecurityProfile)
+ delete(rawMsg, key)
+ case "storageProfile":
+ err = unpopulate(val, "StorageProfile", &g.StorageProfile)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionPublishingProfile.
+func (g GalleryImageVersionPublishingProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populateDateTimeRFC3339(objectMap, "endOfLifeDate", g.EndOfLifeDate)
+ populate(objectMap, "excludeFromLatest", g.ExcludeFromLatest)
+ populateDateTimeRFC3339(objectMap, "publishedDate", g.PublishedDate)
+ populate(objectMap, "replicaCount", g.ReplicaCount)
+ populate(objectMap, "replicationMode", g.ReplicationMode)
+ populate(objectMap, "storageAccountType", g.StorageAccountType)
+ populate(objectMap, "targetExtendedLocations", g.TargetExtendedLocations)
+ populate(objectMap, "targetRegions", g.TargetRegions)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageVersionPublishingProfile.
+func (g *GalleryImageVersionPublishingProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "endOfLifeDate":
+ err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &g.EndOfLifeDate)
+ delete(rawMsg, key)
+ case "excludeFromLatest":
+ err = unpopulate(val, "ExcludeFromLatest", &g.ExcludeFromLatest)
+ delete(rawMsg, key)
+ case "publishedDate":
+ err = unpopulateDateTimeRFC3339(val, "PublishedDate", &g.PublishedDate)
+ delete(rawMsg, key)
+ case "replicaCount":
+ err = unpopulate(val, "ReplicaCount", &g.ReplicaCount)
+ delete(rawMsg, key)
+ case "replicationMode":
+ err = unpopulate(val, "ReplicationMode", &g.ReplicationMode)
+ delete(rawMsg, key)
+ case "storageAccountType":
+ err = unpopulate(val, "StorageAccountType", &g.StorageAccountType)
+ delete(rawMsg, key)
+ case "targetExtendedLocations":
+ err = unpopulate(val, "TargetExtendedLocations", &g.TargetExtendedLocations)
+ delete(rawMsg, key)
+ case "targetRegions":
+ err = unpopulate(val, "TargetRegions", &g.TargetRegions)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionSafetyProfile.
+func (g GalleryImageVersionSafetyProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "allowDeletionOfReplicatedLocations", g.AllowDeletionOfReplicatedLocations)
+ populate(objectMap, "policyViolations", g.PolicyViolations)
+ populate(objectMap, "reportedForPolicyViolation", g.ReportedForPolicyViolation)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageVersionSafetyProfile.
+func (g *GalleryImageVersionSafetyProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "allowDeletionOfReplicatedLocations":
+ err = unpopulate(val, "AllowDeletionOfReplicatedLocations", &g.AllowDeletionOfReplicatedLocations)
+ delete(rawMsg, key)
+ case "policyViolations":
+ err = unpopulate(val, "PolicyViolations", &g.PolicyViolations)
+ delete(rawMsg, key)
+ case "reportedForPolicyViolation":
+ err = unpopulate(val, "ReportedForPolicyViolation", &g.ReportedForPolicyViolation)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionStorageProfile.
+func (g GalleryImageVersionStorageProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dataDiskImages", g.DataDiskImages)
+ populate(objectMap, "osDiskImage", g.OSDiskImage)
+ populate(objectMap, "source", g.Source)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageVersionStorageProfile.
+func (g *GalleryImageVersionStorageProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dataDiskImages":
+ err = unpopulate(val, "DataDiskImages", &g.DataDiskImages)
+ delete(rawMsg, key)
+ case "osDiskImage":
+ err = unpopulate(val, "OSDiskImage", &g.OSDiskImage)
+ delete(rawMsg, key)
+ case "source":
+ err = unpopulate(val, "Source", &g.Source)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionUefiSettings.
+func (g GalleryImageVersionUefiSettings) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "additionalSignatures", g.AdditionalSignatures)
+ populate(objectMap, "signatureTemplateNames", g.SignatureTemplateNames)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageVersionUefiSettings.
+func (g *GalleryImageVersionUefiSettings) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "additionalSignatures":
+ err = unpopulate(val, "AdditionalSignatures", &g.AdditionalSignatures)
+ delete(rawMsg, key)
+ case "signatureTemplateNames":
+ err = unpopulate(val, "SignatureTemplateNames", &g.SignatureTemplateNames)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryImageVersionUpdate.
+func (g GalleryImageVersionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", g.ID)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "properties", g.Properties)
+ populate(objectMap, "tags", g.Tags)
+ populate(objectMap, "type", g.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryImageVersionUpdate.
+func (g *GalleryImageVersionUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &g.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &g.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &g.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &g.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryList.
+func (g GalleryList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", g.NextLink)
+ populate(objectMap, "value", g.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryList.
+func (g *GalleryList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &g.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &g.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryOSDiskImage.
+func (g GalleryOSDiskImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "hostCaching", g.HostCaching)
+ populate(objectMap, "sizeInGB", g.SizeInGB)
+ populate(objectMap, "source", g.Source)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryOSDiskImage.
+func (g *GalleryOSDiskImage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "hostCaching":
+ err = unpopulate(val, "HostCaching", &g.HostCaching)
+ delete(rawMsg, key)
+ case "sizeInGB":
+ err = unpopulate(val, "SizeInGB", &g.SizeInGB)
+ delete(rawMsg, key)
+ case "source":
+ err = unpopulate(val, "Source", &g.Source)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryProperties.
+func (g GalleryProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "description", g.Description)
+ populate(objectMap, "identifier", g.Identifier)
+ populate(objectMap, "provisioningState", g.ProvisioningState)
+ populate(objectMap, "sharingProfile", g.SharingProfile)
+ populate(objectMap, "sharingStatus", g.SharingStatus)
+ populate(objectMap, "softDeletePolicy", g.SoftDeletePolicy)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryProperties.
+func (g *GalleryProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "description":
+ err = unpopulate(val, "Description", &g.Description)
+ delete(rawMsg, key)
+ case "identifier":
+ err = unpopulate(val, "Identifier", &g.Identifier)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &g.ProvisioningState)
+ delete(rawMsg, key)
+ case "sharingProfile":
+ err = unpopulate(val, "SharingProfile", &g.SharingProfile)
+ delete(rawMsg, key)
+ case "sharingStatus":
+ err = unpopulate(val, "SharingStatus", &g.SharingStatus)
+ delete(rawMsg, key)
+ case "softDeletePolicy":
+ err = unpopulate(val, "SoftDeletePolicy", &g.SoftDeletePolicy)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryTargetExtendedLocation.
+func (g GalleryTargetExtendedLocation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "encryption", g.Encryption)
+ populate(objectMap, "extendedLocation", g.ExtendedLocation)
+ populate(objectMap, "extendedLocationReplicaCount", g.ExtendedLocationReplicaCount)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "storageAccountType", g.StorageAccountType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryTargetExtendedLocation.
+func (g *GalleryTargetExtendedLocation) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "encryption":
+ err = unpopulate(val, "Encryption", &g.Encryption)
+ delete(rawMsg, key)
+ case "extendedLocation":
+ err = unpopulate(val, "ExtendedLocation", &g.ExtendedLocation)
+ delete(rawMsg, key)
+ case "extendedLocationReplicaCount":
+ err = unpopulate(val, "ExtendedLocationReplicaCount", &g.ExtendedLocationReplicaCount)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "storageAccountType":
+ err = unpopulate(val, "StorageAccountType", &g.StorageAccountType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GalleryUpdate.
+func (g GalleryUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", g.ID)
+ populate(objectMap, "name", g.Name)
+ populate(objectMap, "properties", g.Properties)
+ populate(objectMap, "tags", g.Tags)
+ populate(objectMap, "type", g.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GalleryUpdate.
+func (g *GalleryUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &g.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &g.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &g.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &g.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &g.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type GrantAccessData.
+func (g GrantAccessData) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "access", g.Access)
+ populate(objectMap, "durationInSeconds", g.DurationInSeconds)
+ populate(objectMap, "fileFormat", g.FileFormat)
+ populate(objectMap, "getSecureVMGuestStateSAS", g.GetSecureVMGuestStateSAS)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type GrantAccessData.
+func (g *GrantAccessData) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "access":
+ err = unpopulate(val, "Access", &g.Access)
+ delete(rawMsg, key)
+ case "durationInSeconds":
+ err = unpopulate(val, "DurationInSeconds", &g.DurationInSeconds)
+ delete(rawMsg, key)
+ case "fileFormat":
+ err = unpopulate(val, "FileFormat", &g.FileFormat)
+ delete(rawMsg, key)
+ case "getSecureVMGuestStateSAS":
+ err = unpopulate(val, "GetSecureVMGuestStateSAS", &g.GetSecureVMGuestStateSAS)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", g, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type HardwareProfile.
+func (h HardwareProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "vmSize", h.VMSize)
+ populate(objectMap, "vmSizeProperties", h.VMSizeProperties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type HardwareProfile.
+func (h *HardwareProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", h, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "vmSize":
+ err = unpopulate(val, "VMSize", &h.VMSize)
+ delete(rawMsg, key)
+ case "vmSizeProperties":
+ err = unpopulate(val, "VMSizeProperties", &h.VMSizeProperties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", h, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type Image.
+func (i Image) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "extendedLocation", i.ExtendedLocation)
+ populate(objectMap, "id", i.ID)
+ populate(objectMap, "location", i.Location)
+ populate(objectMap, "name", i.Name)
+ populate(objectMap, "properties", i.Properties)
+ populate(objectMap, "tags", i.Tags)
+ populate(objectMap, "type", i.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type Image.
+func (i *Image) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "extendedLocation":
+ err = unpopulate(val, "ExtendedLocation", &i.ExtendedLocation)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &i.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &i.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &i.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &i.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &i.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &i.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ImageDataDisk.
+func (i ImageDataDisk) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "blobUri", i.BlobURI)
+ populate(objectMap, "caching", i.Caching)
+ populate(objectMap, "diskEncryptionSet", i.DiskEncryptionSet)
+ populate(objectMap, "diskSizeGB", i.DiskSizeGB)
+ populate(objectMap, "lun", i.Lun)
+ populate(objectMap, "managedDisk", i.ManagedDisk)
+ populate(objectMap, "snapshot", i.Snapshot)
+ populate(objectMap, "storageAccountType", i.StorageAccountType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ImageDataDisk.
+func (i *ImageDataDisk) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "blobUri":
+ err = unpopulate(val, "BlobURI", &i.BlobURI)
+ delete(rawMsg, key)
+ case "caching":
+ err = unpopulate(val, "Caching", &i.Caching)
+ delete(rawMsg, key)
+ case "diskEncryptionSet":
+ err = unpopulate(val, "DiskEncryptionSet", &i.DiskEncryptionSet)
+ delete(rawMsg, key)
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &i.DiskSizeGB)
+ delete(rawMsg, key)
+ case "lun":
+ err = unpopulate(val, "Lun", &i.Lun)
+ delete(rawMsg, key)
+ case "managedDisk":
+ err = unpopulate(val, "ManagedDisk", &i.ManagedDisk)
+ delete(rawMsg, key)
+ case "snapshot":
+ err = unpopulate(val, "Snapshot", &i.Snapshot)
+ delete(rawMsg, key)
+ case "storageAccountType":
+ err = unpopulate(val, "StorageAccountType", &i.StorageAccountType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ImageDeprecationStatus.
+func (i ImageDeprecationStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "alternativeOption", i.AlternativeOption)
+ populate(objectMap, "imageState", i.ImageState)
+ populateDateTimeRFC3339(objectMap, "scheduledDeprecationTime", i.ScheduledDeprecationTime)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ImageDeprecationStatus.
+func (i *ImageDeprecationStatus) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "alternativeOption":
+ err = unpopulate(val, "AlternativeOption", &i.AlternativeOption)
+ delete(rawMsg, key)
+ case "imageState":
+ err = unpopulate(val, "ImageState", &i.ImageState)
+ delete(rawMsg, key)
+ case "scheduledDeprecationTime":
+ err = unpopulateDateTimeRFC3339(val, "ScheduledDeprecationTime", &i.ScheduledDeprecationTime)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ImageDisk.
+func (i ImageDisk) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "blobUri", i.BlobURI)
+ populate(objectMap, "caching", i.Caching)
+ populate(objectMap, "diskEncryptionSet", i.DiskEncryptionSet)
+ populate(objectMap, "diskSizeGB", i.DiskSizeGB)
+ populate(objectMap, "managedDisk", i.ManagedDisk)
+ populate(objectMap, "snapshot", i.Snapshot)
+ populate(objectMap, "storageAccountType", i.StorageAccountType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ImageDisk.
+func (i *ImageDisk) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "blobUri":
+ err = unpopulate(val, "BlobURI", &i.BlobURI)
+ delete(rawMsg, key)
+ case "caching":
+ err = unpopulate(val, "Caching", &i.Caching)
+ delete(rawMsg, key)
+ case "diskEncryptionSet":
+ err = unpopulate(val, "DiskEncryptionSet", &i.DiskEncryptionSet)
+ delete(rawMsg, key)
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &i.DiskSizeGB)
+ delete(rawMsg, key)
+ case "managedDisk":
+ err = unpopulate(val, "ManagedDisk", &i.ManagedDisk)
+ delete(rawMsg, key)
+ case "snapshot":
+ err = unpopulate(val, "Snapshot", &i.Snapshot)
+ delete(rawMsg, key)
+ case "storageAccountType":
+ err = unpopulate(val, "StorageAccountType", &i.StorageAccountType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ImageDiskReference.
+func (i ImageDiskReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "communityGalleryImageId", i.CommunityGalleryImageID)
+ populate(objectMap, "id", i.ID)
+ populate(objectMap, "lun", i.Lun)
+ populate(objectMap, "sharedGalleryImageId", i.SharedGalleryImageID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ImageDiskReference.
+func (i *ImageDiskReference) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "communityGalleryImageId":
+ err = unpopulate(val, "CommunityGalleryImageID", &i.CommunityGalleryImageID)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &i.ID)
+ delete(rawMsg, key)
+ case "lun":
+ err = unpopulate(val, "Lun", &i.Lun)
+ delete(rawMsg, key)
+ case "sharedGalleryImageId":
+ err = unpopulate(val, "SharedGalleryImageID", &i.SharedGalleryImageID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ImageListResult.
+func (i ImageListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", i.NextLink)
+ populate(objectMap, "value", i.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ImageListResult.
+func (i *ImageListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &i.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &i.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ImageOSDisk.
+func (i ImageOSDisk) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "blobUri", i.BlobURI)
+ populate(objectMap, "caching", i.Caching)
+ populate(objectMap, "diskEncryptionSet", i.DiskEncryptionSet)
+ populate(objectMap, "diskSizeGB", i.DiskSizeGB)
+ populate(objectMap, "managedDisk", i.ManagedDisk)
+ populate(objectMap, "osState", i.OSState)
+ populate(objectMap, "osType", i.OSType)
+ populate(objectMap, "snapshot", i.Snapshot)
+ populate(objectMap, "storageAccountType", i.StorageAccountType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ImageOSDisk.
+func (i *ImageOSDisk) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "blobUri":
+ err = unpopulate(val, "BlobURI", &i.BlobURI)
+ delete(rawMsg, key)
+ case "caching":
+ err = unpopulate(val, "Caching", &i.Caching)
+ delete(rawMsg, key)
+ case "diskEncryptionSet":
+ err = unpopulate(val, "DiskEncryptionSet", &i.DiskEncryptionSet)
+ delete(rawMsg, key)
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &i.DiskSizeGB)
+ delete(rawMsg, key)
+ case "managedDisk":
+ err = unpopulate(val, "ManagedDisk", &i.ManagedDisk)
+ delete(rawMsg, key)
+ case "osState":
+ err = unpopulate(val, "OSState", &i.OSState)
+ delete(rawMsg, key)
+ case "osType":
+ err = unpopulate(val, "OSType", &i.OSType)
+ delete(rawMsg, key)
+ case "snapshot":
+ err = unpopulate(val, "Snapshot", &i.Snapshot)
+ delete(rawMsg, key)
+ case "storageAccountType":
+ err = unpopulate(val, "StorageAccountType", &i.StorageAccountType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ImageProperties.
+func (i ImageProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "hyperVGeneration", i.HyperVGeneration)
+ populate(objectMap, "provisioningState", i.ProvisioningState)
+ populate(objectMap, "sourceVirtualMachine", i.SourceVirtualMachine)
+ populate(objectMap, "storageProfile", i.StorageProfile)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ImageProperties.
+func (i *ImageProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "hyperVGeneration":
+ err = unpopulate(val, "HyperVGeneration", &i.HyperVGeneration)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &i.ProvisioningState)
+ delete(rawMsg, key)
+ case "sourceVirtualMachine":
+ err = unpopulate(val, "SourceVirtualMachine", &i.SourceVirtualMachine)
+ delete(rawMsg, key)
+ case "storageProfile":
+ err = unpopulate(val, "StorageProfile", &i.StorageProfile)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ImagePurchasePlan.
+func (i ImagePurchasePlan) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", i.Name)
+ populate(objectMap, "product", i.Product)
+ populate(objectMap, "publisher", i.Publisher)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ImagePurchasePlan.
+func (i *ImagePurchasePlan) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &i.Name)
+ delete(rawMsg, key)
+ case "product":
+ err = unpopulate(val, "Product", &i.Product)
+ delete(rawMsg, key)
+ case "publisher":
+ err = unpopulate(val, "Publisher", &i.Publisher)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ImageReference.
+func (i ImageReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "communityGalleryImageId", i.CommunityGalleryImageID)
+ populate(objectMap, "exactVersion", i.ExactVersion)
+ populate(objectMap, "id", i.ID)
+ populate(objectMap, "offer", i.Offer)
+ populate(objectMap, "publisher", i.Publisher)
+ populate(objectMap, "sku", i.SKU)
+ populate(objectMap, "sharedGalleryImageId", i.SharedGalleryImageID)
+ populate(objectMap, "version", i.Version)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ImageReference.
+func (i *ImageReference) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "communityGalleryImageId":
+ err = unpopulate(val, "CommunityGalleryImageID", &i.CommunityGalleryImageID)
+ delete(rawMsg, key)
+ case "exactVersion":
+ err = unpopulate(val, "ExactVersion", &i.ExactVersion)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &i.ID)
+ delete(rawMsg, key)
+ case "offer":
+ err = unpopulate(val, "Offer", &i.Offer)
+ delete(rawMsg, key)
+ case "publisher":
+ err = unpopulate(val, "Publisher", &i.Publisher)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &i.SKU)
+ delete(rawMsg, key)
+ case "sharedGalleryImageId":
+ err = unpopulate(val, "SharedGalleryImageID", &i.SharedGalleryImageID)
+ delete(rawMsg, key)
+ case "version":
+ err = unpopulate(val, "Version", &i.Version)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ImageStorageProfile.
+func (i ImageStorageProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dataDisks", i.DataDisks)
+ populate(objectMap, "osDisk", i.OSDisk)
+ populate(objectMap, "zoneResilient", i.ZoneResilient)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ImageStorageProfile.
+func (i *ImageStorageProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dataDisks":
+ err = unpopulate(val, "DataDisks", &i.DataDisks)
+ delete(rawMsg, key)
+ case "osDisk":
+ err = unpopulate(val, "OSDisk", &i.OSDisk)
+ delete(rawMsg, key)
+ case "zoneResilient":
+ err = unpopulate(val, "ZoneResilient", &i.ZoneResilient)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ImageUpdate.
+func (i ImageUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "properties", i.Properties)
+ populate(objectMap, "tags", i.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ImageUpdate.
+func (i *ImageUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "properties":
+ err = unpopulate(val, "Properties", &i.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &i.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ImageVersionSecurityProfile.
+func (i ImageVersionSecurityProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "uefiSettings", i.UefiSettings)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ImageVersionSecurityProfile.
+func (i *ImageVersionSecurityProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "uefiSettings":
+ err = unpopulate(val, "UefiSettings", &i.UefiSettings)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type InnerError.
+func (i InnerError) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "errordetail", i.Errordetail)
+ populate(objectMap, "exceptiontype", i.Exceptiontype)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type InnerError.
+func (i *InnerError) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "errordetail":
+ err = unpopulate(val, "Errordetail", &i.Errordetail)
+ delete(rawMsg, key)
+ case "exceptiontype":
+ err = unpopulate(val, "Exceptiontype", &i.Exceptiontype)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type InstanceSKU.
+func (i InstanceSKU) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", i.Name)
+ populate(objectMap, "tier", i.Tier)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceSKU.
+func (i *InstanceSKU) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &i.Name)
+ delete(rawMsg, key)
+ case "tier":
+ err = unpopulate(val, "Tier", &i.Tier)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type InstanceViewStatus.
+func (i InstanceViewStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "code", i.Code)
+ populate(objectMap, "displayStatus", i.DisplayStatus)
+ populate(objectMap, "level", i.Level)
+ populate(objectMap, "message", i.Message)
+ populateDateTimeRFC3339(objectMap, "time", i.Time)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceViewStatus.
+func (i *InstanceViewStatus) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "code":
+ err = unpopulate(val, "Code", &i.Code)
+ delete(rawMsg, key)
+ case "displayStatus":
+ err = unpopulate(val, "DisplayStatus", &i.DisplayStatus)
+ delete(rawMsg, key)
+ case "level":
+ err = unpopulate(val, "Level", &i.Level)
+ delete(rawMsg, key)
+ case "message":
+ err = unpopulate(val, "Message", &i.Message)
+ delete(rawMsg, key)
+ case "time":
+ err = unpopulateDateTimeRFC3339(val, "Time", &i.Time)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type InstanceViewStatusesSummary.
+func (i InstanceViewStatusesSummary) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "statusesSummary", i.StatusesSummary)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceViewStatusesSummary.
+func (i *InstanceViewStatusesSummary) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "statusesSummary":
+ err = unpopulate(val, "StatusesSummary", &i.StatusesSummary)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", i, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type KeyForDiskEncryptionSet.
+func (k KeyForDiskEncryptionSet) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "keyUrl", k.KeyURL)
+ populate(objectMap, "sourceVault", k.SourceVault)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type KeyForDiskEncryptionSet.
+func (k *KeyForDiskEncryptionSet) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", k, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "keyUrl":
+ err = unpopulate(val, "KeyURL", &k.KeyURL)
+ delete(rawMsg, key)
+ case "sourceVault":
+ err = unpopulate(val, "SourceVault", &k.SourceVault)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", k, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type KeyVaultAndKeyReference.
+func (k KeyVaultAndKeyReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "keyUrl", k.KeyURL)
+ populate(objectMap, "sourceVault", k.SourceVault)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultAndKeyReference.
+func (k *KeyVaultAndKeyReference) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", k, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "keyUrl":
+ err = unpopulate(val, "KeyURL", &k.KeyURL)
+ delete(rawMsg, key)
+ case "sourceVault":
+ err = unpopulate(val, "SourceVault", &k.SourceVault)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", k, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type KeyVaultAndSecretReference.
+func (k KeyVaultAndSecretReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "secretUrl", k.SecretURL)
+ populate(objectMap, "sourceVault", k.SourceVault)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultAndSecretReference.
+func (k *KeyVaultAndSecretReference) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", k, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "secretUrl":
+ err = unpopulate(val, "SecretURL", &k.SecretURL)
+ delete(rawMsg, key)
+ case "sourceVault":
+ err = unpopulate(val, "SourceVault", &k.SourceVault)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", k, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type KeyVaultKeyReference.
+func (k KeyVaultKeyReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "keyUrl", k.KeyURL)
+ populate(objectMap, "sourceVault", k.SourceVault)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultKeyReference.
+func (k *KeyVaultKeyReference) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", k, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "keyUrl":
+ err = unpopulate(val, "KeyURL", &k.KeyURL)
+ delete(rawMsg, key)
+ case "sourceVault":
+ err = unpopulate(val, "SourceVault", &k.SourceVault)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", k, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type KeyVaultSecretReference.
+func (k KeyVaultSecretReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "secretUrl", k.SecretURL)
+ populate(objectMap, "sourceVault", k.SourceVault)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type KeyVaultSecretReference.
+func (k *KeyVaultSecretReference) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", k, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "secretUrl":
+ err = unpopulate(val, "SecretURL", &k.SecretURL)
+ delete(rawMsg, key)
+ case "sourceVault":
+ err = unpopulate(val, "SourceVault", &k.SourceVault)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", k, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type LastPatchInstallationSummary.
+func (l LastPatchInstallationSummary) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "error", l.Error)
+ populate(objectMap, "excludedPatchCount", l.ExcludedPatchCount)
+ populate(objectMap, "failedPatchCount", l.FailedPatchCount)
+ populate(objectMap, "installationActivityId", l.InstallationActivityID)
+ populate(objectMap, "installedPatchCount", l.InstalledPatchCount)
+ populateDateTimeRFC3339(objectMap, "lastModifiedTime", l.LastModifiedTime)
+ populate(objectMap, "maintenanceWindowExceeded", l.MaintenanceWindowExceeded)
+ populate(objectMap, "notSelectedPatchCount", l.NotSelectedPatchCount)
+ populate(objectMap, "pendingPatchCount", l.PendingPatchCount)
+ populateDateTimeRFC3339(objectMap, "startTime", l.StartTime)
+ populate(objectMap, "status", l.Status)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type LastPatchInstallationSummary.
+func (l *LastPatchInstallationSummary) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "error":
+ err = unpopulate(val, "Error", &l.Error)
+ delete(rawMsg, key)
+ case "excludedPatchCount":
+ err = unpopulate(val, "ExcludedPatchCount", &l.ExcludedPatchCount)
+ delete(rawMsg, key)
+ case "failedPatchCount":
+ err = unpopulate(val, "FailedPatchCount", &l.FailedPatchCount)
+ delete(rawMsg, key)
+ case "installationActivityId":
+ err = unpopulate(val, "InstallationActivityID", &l.InstallationActivityID)
+ delete(rawMsg, key)
+ case "installedPatchCount":
+ err = unpopulate(val, "InstalledPatchCount", &l.InstalledPatchCount)
+ delete(rawMsg, key)
+ case "lastModifiedTime":
+ err = unpopulateDateTimeRFC3339(val, "LastModifiedTime", &l.LastModifiedTime)
+ delete(rawMsg, key)
+ case "maintenanceWindowExceeded":
+ err = unpopulate(val, "MaintenanceWindowExceeded", &l.MaintenanceWindowExceeded)
+ delete(rawMsg, key)
+ case "notSelectedPatchCount":
+ err = unpopulate(val, "NotSelectedPatchCount", &l.NotSelectedPatchCount)
+ delete(rawMsg, key)
+ case "pendingPatchCount":
+ err = unpopulate(val, "PendingPatchCount", &l.PendingPatchCount)
+ delete(rawMsg, key)
+ case "startTime":
+ err = unpopulateDateTimeRFC3339(val, "StartTime", &l.StartTime)
+ delete(rawMsg, key)
+ case "status":
+ err = unpopulate(val, "Status", &l.Status)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type LatestGalleryImageVersion.
+func (l LatestGalleryImageVersion) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "latestVersionName", l.LatestVersionName)
+ populate(objectMap, "location", l.Location)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type LatestGalleryImageVersion.
+func (l *LatestGalleryImageVersion) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "latestVersionName":
+ err = unpopulate(val, "LatestVersionName", &l.LatestVersionName)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &l.Location)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type LinuxConfiguration.
+func (l LinuxConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "disablePasswordAuthentication", l.DisablePasswordAuthentication)
+ populate(objectMap, "enableVMAgentPlatformUpdates", l.EnableVMAgentPlatformUpdates)
+ populate(objectMap, "patchSettings", l.PatchSettings)
+ populate(objectMap, "provisionVMAgent", l.ProvisionVMAgent)
+ populate(objectMap, "ssh", l.SSH)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxConfiguration.
+func (l *LinuxConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "disablePasswordAuthentication":
+ err = unpopulate(val, "DisablePasswordAuthentication", &l.DisablePasswordAuthentication)
+ delete(rawMsg, key)
+ case "enableVMAgentPlatformUpdates":
+ err = unpopulate(val, "EnableVMAgentPlatformUpdates", &l.EnableVMAgentPlatformUpdates)
+ delete(rawMsg, key)
+ case "patchSettings":
+ err = unpopulate(val, "PatchSettings", &l.PatchSettings)
+ delete(rawMsg, key)
+ case "provisionVMAgent":
+ err = unpopulate(val, "ProvisionVMAgent", &l.ProvisionVMAgent)
+ delete(rawMsg, key)
+ case "ssh":
+ err = unpopulate(val, "SSH", &l.SSH)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type LinuxParameters.
+func (l LinuxParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "classificationsToInclude", l.ClassificationsToInclude)
+ populate(objectMap, "maintenanceRunId", l.MaintenanceRunID)
+ populate(objectMap, "packageNameMasksToExclude", l.PackageNameMasksToExclude)
+ populate(objectMap, "packageNameMasksToInclude", l.PackageNameMasksToInclude)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxParameters.
+func (l *LinuxParameters) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "classificationsToInclude":
+ err = unpopulate(val, "ClassificationsToInclude", &l.ClassificationsToInclude)
+ delete(rawMsg, key)
+ case "maintenanceRunId":
+ err = unpopulate(val, "MaintenanceRunID", &l.MaintenanceRunID)
+ delete(rawMsg, key)
+ case "packageNameMasksToExclude":
+ err = unpopulate(val, "PackageNameMasksToExclude", &l.PackageNameMasksToExclude)
+ delete(rawMsg, key)
+ case "packageNameMasksToInclude":
+ err = unpopulate(val, "PackageNameMasksToInclude", &l.PackageNameMasksToInclude)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type LinuxPatchSettings.
+func (l LinuxPatchSettings) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "assessmentMode", l.AssessmentMode)
+ populate(objectMap, "automaticByPlatformSettings", l.AutomaticByPlatformSettings)
+ populate(objectMap, "patchMode", l.PatchMode)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxPatchSettings.
+func (l *LinuxPatchSettings) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "assessmentMode":
+ err = unpopulate(val, "AssessmentMode", &l.AssessmentMode)
+ delete(rawMsg, key)
+ case "automaticByPlatformSettings":
+ err = unpopulate(val, "AutomaticByPlatformSettings", &l.AutomaticByPlatformSettings)
+ delete(rawMsg, key)
+ case "patchMode":
+ err = unpopulate(val, "PatchMode", &l.PatchMode)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type LinuxVMGuestPatchAutomaticByPlatformSettings.
+func (l LinuxVMGuestPatchAutomaticByPlatformSettings) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "bypassPlatformSafetyChecksOnUserSchedule", l.BypassPlatformSafetyChecksOnUserSchedule)
+ populate(objectMap, "rebootSetting", l.RebootSetting)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxVMGuestPatchAutomaticByPlatformSettings.
+func (l *LinuxVMGuestPatchAutomaticByPlatformSettings) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "bypassPlatformSafetyChecksOnUserSchedule":
+ err = unpopulate(val, "BypassPlatformSafetyChecksOnUserSchedule", &l.BypassPlatformSafetyChecksOnUserSchedule)
+ delete(rawMsg, key)
+ case "rebootSetting":
+ err = unpopulate(val, "RebootSetting", &l.RebootSetting)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ListUsagesResult.
+func (l ListUsagesResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", l.NextLink)
+ populate(objectMap, "value", l.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ListUsagesResult.
+func (l *ListUsagesResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &l.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &l.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type LoadBalancerConfiguration.
+func (l LoadBalancerConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", l.ID)
+ populate(objectMap, "name", l.Name)
+ populate(objectMap, "properties", l.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerConfiguration.
+func (l *LoadBalancerConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &l.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &l.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &l.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type LoadBalancerConfigurationProperties.
+func (l LoadBalancerConfigurationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "frontendIpConfigurations", l.FrontendIPConfigurations)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerConfigurationProperties.
+func (l *LoadBalancerConfigurationProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "frontendIpConfigurations":
+ err = unpopulate(val, "FrontendIPConfigurations", &l.FrontendIPConfigurations)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type LoadBalancerFrontendIPConfiguration.
+func (l LoadBalancerFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", l.Name)
+ populate(objectMap, "properties", l.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerFrontendIPConfiguration.
+func (l *LoadBalancerFrontendIPConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &l.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &l.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type LoadBalancerFrontendIPConfigurationProperties.
+func (l LoadBalancerFrontendIPConfigurationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "privateIPAddress", l.PrivateIPAddress)
+ populate(objectMap, "publicIPAddress", l.PublicIPAddress)
+ populate(objectMap, "subnet", l.Subnet)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerFrontendIPConfigurationProperties.
+func (l *LoadBalancerFrontendIPConfigurationProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "privateIPAddress":
+ err = unpopulate(val, "PrivateIPAddress", &l.PrivateIPAddress)
+ delete(rawMsg, key)
+ case "publicIPAddress":
+ err = unpopulate(val, "PublicIPAddress", &l.PublicIPAddress)
+ delete(rawMsg, key)
+ case "subnet":
+ err = unpopulate(val, "Subnet", &l.Subnet)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type LogAnalyticsInputBase.
+func (l LogAnalyticsInputBase) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "blobContainerSasUri", l.BlobContainerSasURI)
+ populateDateTimeRFC3339(objectMap, "fromTime", l.FromTime)
+ populate(objectMap, "groupByClientApplicationId", l.GroupByClientApplicationID)
+ populate(objectMap, "groupByOperationName", l.GroupByOperationName)
+ populate(objectMap, "groupByResourceName", l.GroupByResourceName)
+ populate(objectMap, "groupByThrottlePolicy", l.GroupByThrottlePolicy)
+ populate(objectMap, "groupByUserAgent", l.GroupByUserAgent)
+ populateDateTimeRFC3339(objectMap, "toTime", l.ToTime)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type LogAnalyticsInputBase.
+func (l *LogAnalyticsInputBase) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "blobContainerSasUri":
+ err = unpopulate(val, "BlobContainerSasURI", &l.BlobContainerSasURI)
+ delete(rawMsg, key)
+ case "fromTime":
+ err = unpopulateDateTimeRFC3339(val, "FromTime", &l.FromTime)
+ delete(rawMsg, key)
+ case "groupByClientApplicationId":
+ err = unpopulate(val, "GroupByClientApplicationID", &l.GroupByClientApplicationID)
+ delete(rawMsg, key)
+ case "groupByOperationName":
+ err = unpopulate(val, "GroupByOperationName", &l.GroupByOperationName)
+ delete(rawMsg, key)
+ case "groupByResourceName":
+ err = unpopulate(val, "GroupByResourceName", &l.GroupByResourceName)
+ delete(rawMsg, key)
+ case "groupByThrottlePolicy":
+ err = unpopulate(val, "GroupByThrottlePolicy", &l.GroupByThrottlePolicy)
+ delete(rawMsg, key)
+ case "groupByUserAgent":
+ err = unpopulate(val, "GroupByUserAgent", &l.GroupByUserAgent)
+ delete(rawMsg, key)
+ case "toTime":
+ err = unpopulateDateTimeRFC3339(val, "ToTime", &l.ToTime)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type LogAnalyticsOperationResult.
+func (l LogAnalyticsOperationResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "properties", l.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type LogAnalyticsOperationResult.
+func (l *LogAnalyticsOperationResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "properties":
+ err = unpopulate(val, "Properties", &l.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type LogAnalyticsOutput.
+func (l LogAnalyticsOutput) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "output", l.Output)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type LogAnalyticsOutput.
+func (l *LogAnalyticsOutput) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "output":
+ err = unpopulate(val, "Output", &l.Output)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", l, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type MaintenanceRedeployStatus.
+func (m MaintenanceRedeployStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "isCustomerInitiatedMaintenanceAllowed", m.IsCustomerInitiatedMaintenanceAllowed)
+ populate(objectMap, "lastOperationMessage", m.LastOperationMessage)
+ populate(objectMap, "lastOperationResultCode", m.LastOperationResultCode)
+ populateDateTimeRFC3339(objectMap, "maintenanceWindowEndTime", m.MaintenanceWindowEndTime)
+ populateDateTimeRFC3339(objectMap, "maintenanceWindowStartTime", m.MaintenanceWindowStartTime)
+ populateDateTimeRFC3339(objectMap, "preMaintenanceWindowEndTime", m.PreMaintenanceWindowEndTime)
+ populateDateTimeRFC3339(objectMap, "preMaintenanceWindowStartTime", m.PreMaintenanceWindowStartTime)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceRedeployStatus.
+func (m *MaintenanceRedeployStatus) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", m, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "isCustomerInitiatedMaintenanceAllowed":
+ err = unpopulate(val, "IsCustomerInitiatedMaintenanceAllowed", &m.IsCustomerInitiatedMaintenanceAllowed)
+ delete(rawMsg, key)
+ case "lastOperationMessage":
+ err = unpopulate(val, "LastOperationMessage", &m.LastOperationMessage)
+ delete(rawMsg, key)
+ case "lastOperationResultCode":
+ err = unpopulate(val, "LastOperationResultCode", &m.LastOperationResultCode)
+ delete(rawMsg, key)
+ case "maintenanceWindowEndTime":
+ err = unpopulateDateTimeRFC3339(val, "MaintenanceWindowEndTime", &m.MaintenanceWindowEndTime)
+ delete(rawMsg, key)
+ case "maintenanceWindowStartTime":
+ err = unpopulateDateTimeRFC3339(val, "MaintenanceWindowStartTime", &m.MaintenanceWindowStartTime)
+ delete(rawMsg, key)
+ case "preMaintenanceWindowEndTime":
+ err = unpopulateDateTimeRFC3339(val, "PreMaintenanceWindowEndTime", &m.PreMaintenanceWindowEndTime)
+ delete(rawMsg, key)
+ case "preMaintenanceWindowStartTime":
+ err = unpopulateDateTimeRFC3339(val, "PreMaintenanceWindowStartTime", &m.PreMaintenanceWindowStartTime)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", m, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ManagedArtifact.
+func (m ManagedArtifact) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", m.ID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedArtifact.
+func (m *ManagedArtifact) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", m, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &m.ID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", m, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ManagedDiskParameters.
+func (m ManagedDiskParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskEncryptionSet", m.DiskEncryptionSet)
+ populate(objectMap, "id", m.ID)
+ populate(objectMap, "securityProfile", m.SecurityProfile)
+ populate(objectMap, "storageAccountType", m.StorageAccountType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDiskParameters.
+func (m *ManagedDiskParameters) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", m, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskEncryptionSet":
+ err = unpopulate(val, "DiskEncryptionSet", &m.DiskEncryptionSet)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &m.ID)
+ delete(rawMsg, key)
+ case "securityProfile":
+ err = unpopulate(val, "SecurityProfile", &m.SecurityProfile)
+ delete(rawMsg, key)
+ case "storageAccountType":
+ err = unpopulate(val, "StorageAccountType", &m.StorageAccountType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", m, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type NetworkInterfaceReference.
+func (n NetworkInterfaceReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", n.ID)
+ populate(objectMap, "properties", n.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterfaceReference.
+func (n *NetworkInterfaceReference) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", n, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &n.ID)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &n.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", n, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type NetworkInterfaceReferenceProperties.
+func (n NetworkInterfaceReferenceProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "deleteOption", n.DeleteOption)
+ populate(objectMap, "primary", n.Primary)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterfaceReferenceProperties.
+func (n *NetworkInterfaceReferenceProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", n, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "deleteOption":
+ err = unpopulate(val, "DeleteOption", &n.DeleteOption)
+ delete(rawMsg, key)
+ case "primary":
+ err = unpopulate(val, "Primary", &n.Primary)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", n, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type NetworkProfile.
+func (n NetworkProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "networkApiVersion", n.NetworkAPIVersion)
+ populate(objectMap, "networkInterfaceConfigurations", n.NetworkInterfaceConfigurations)
+ populate(objectMap, "networkInterfaces", n.NetworkInterfaces)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfile.
+func (n *NetworkProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", n, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "networkApiVersion":
+ err = unpopulate(val, "NetworkAPIVersion", &n.NetworkAPIVersion)
+ delete(rawMsg, key)
+ case "networkInterfaceConfigurations":
+ err = unpopulate(val, "NetworkInterfaceConfigurations", &n.NetworkInterfaceConfigurations)
+ delete(rawMsg, key)
+ case "networkInterfaces":
+ err = unpopulate(val, "NetworkInterfaces", &n.NetworkInterfaces)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", n, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OSDisk.
+func (o OSDisk) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "caching", o.Caching)
+ populate(objectMap, "createOption", o.CreateOption)
+ populate(objectMap, "deleteOption", o.DeleteOption)
+ populate(objectMap, "diffDiskSettings", o.DiffDiskSettings)
+ populate(objectMap, "diskSizeGB", o.DiskSizeGB)
+ populate(objectMap, "encryptionSettings", o.EncryptionSettings)
+ populate(objectMap, "image", o.Image)
+ populate(objectMap, "managedDisk", o.ManagedDisk)
+ populate(objectMap, "name", o.Name)
+ populate(objectMap, "osType", o.OSType)
+ populate(objectMap, "vhd", o.Vhd)
+ populate(objectMap, "writeAcceleratorEnabled", o.WriteAcceleratorEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OSDisk.
+func (o *OSDisk) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "caching":
+ err = unpopulate(val, "Caching", &o.Caching)
+ delete(rawMsg, key)
+ case "createOption":
+ err = unpopulate(val, "CreateOption", &o.CreateOption)
+ delete(rawMsg, key)
+ case "deleteOption":
+ err = unpopulate(val, "DeleteOption", &o.DeleteOption)
+ delete(rawMsg, key)
+ case "diffDiskSettings":
+ err = unpopulate(val, "DiffDiskSettings", &o.DiffDiskSettings)
+ delete(rawMsg, key)
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &o.DiskSizeGB)
+ delete(rawMsg, key)
+ case "encryptionSettings":
+ err = unpopulate(val, "EncryptionSettings", &o.EncryptionSettings)
+ delete(rawMsg, key)
+ case "image":
+ err = unpopulate(val, "Image", &o.Image)
+ delete(rawMsg, key)
+ case "managedDisk":
+ err = unpopulate(val, "ManagedDisk", &o.ManagedDisk)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &o.Name)
+ delete(rawMsg, key)
+ case "osType":
+ err = unpopulate(val, "OSType", &o.OSType)
+ delete(rawMsg, key)
+ case "vhd":
+ err = unpopulate(val, "Vhd", &o.Vhd)
+ delete(rawMsg, key)
+ case "writeAcceleratorEnabled":
+ err = unpopulate(val, "WriteAcceleratorEnabled", &o.WriteAcceleratorEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OSDiskImage.
+func (o OSDiskImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "operatingSystem", o.OperatingSystem)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OSDiskImage.
+func (o *OSDiskImage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "operatingSystem":
+ err = unpopulate(val, "OperatingSystem", &o.OperatingSystem)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OSDiskImageEncryption.
+func (o OSDiskImageEncryption) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskEncryptionSetId", o.DiskEncryptionSetID)
+ populate(objectMap, "securityProfile", o.SecurityProfile)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OSDiskImageEncryption.
+func (o *OSDiskImageEncryption) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskEncryptionSetId":
+ err = unpopulate(val, "DiskEncryptionSetID", &o.DiskEncryptionSetID)
+ delete(rawMsg, key)
+ case "securityProfile":
+ err = unpopulate(val, "SecurityProfile", &o.SecurityProfile)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OSDiskImageSecurityProfile.
+func (o OSDiskImageSecurityProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "confidentialVMEncryptionType", o.ConfidentialVMEncryptionType)
+ populate(objectMap, "secureVMDiskEncryptionSetId", o.SecureVMDiskEncryptionSetID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OSDiskImageSecurityProfile.
+func (o *OSDiskImageSecurityProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "confidentialVMEncryptionType":
+ err = unpopulate(val, "ConfidentialVMEncryptionType", &o.ConfidentialVMEncryptionType)
+ delete(rawMsg, key)
+ case "secureVMDiskEncryptionSetId":
+ err = unpopulate(val, "SecureVMDiskEncryptionSetID", &o.SecureVMDiskEncryptionSetID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OSFamily.
+func (o OSFamily) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", o.ID)
+ populate(objectMap, "location", o.Location)
+ populate(objectMap, "name", o.Name)
+ populate(objectMap, "properties", o.Properties)
+ populate(objectMap, "type", o.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OSFamily.
+func (o *OSFamily) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &o.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &o.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &o.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &o.Properties)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &o.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OSFamilyListResult.
+func (o OSFamilyListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", o.NextLink)
+ populate(objectMap, "value", o.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OSFamilyListResult.
+func (o *OSFamilyListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &o.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &o.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OSFamilyProperties.
+func (o OSFamilyProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "label", o.Label)
+ populate(objectMap, "name", o.Name)
+ populate(objectMap, "versions", o.Versions)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OSFamilyProperties.
+func (o *OSFamilyProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "label":
+ err = unpopulate(val, "Label", &o.Label)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &o.Name)
+ delete(rawMsg, key)
+ case "versions":
+ err = unpopulate(val, "Versions", &o.Versions)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OSImageNotificationProfile.
+func (o OSImageNotificationProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "enable", o.Enable)
+ populate(objectMap, "notBeforeTimeout", o.NotBeforeTimeout)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OSImageNotificationProfile.
+func (o *OSImageNotificationProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "enable":
+ err = unpopulate(val, "Enable", &o.Enable)
+ delete(rawMsg, key)
+ case "notBeforeTimeout":
+ err = unpopulate(val, "NotBeforeTimeout", &o.NotBeforeTimeout)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OSProfile.
+func (o OSProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "adminPassword", o.AdminPassword)
+ populate(objectMap, "adminUsername", o.AdminUsername)
+ populate(objectMap, "allowExtensionOperations", o.AllowExtensionOperations)
+ populate(objectMap, "computerName", o.ComputerName)
+ populate(objectMap, "customData", o.CustomData)
+ populate(objectMap, "linuxConfiguration", o.LinuxConfiguration)
+ populate(objectMap, "requireGuestProvisionSignal", o.RequireGuestProvisionSignal)
+ populate(objectMap, "secrets", o.Secrets)
+ populate(objectMap, "windowsConfiguration", o.WindowsConfiguration)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OSProfile.
+func (o *OSProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "adminPassword":
+ err = unpopulate(val, "AdminPassword", &o.AdminPassword)
+ delete(rawMsg, key)
+ case "adminUsername":
+ err = unpopulate(val, "AdminUsername", &o.AdminUsername)
+ delete(rawMsg, key)
+ case "allowExtensionOperations":
+ err = unpopulate(val, "AllowExtensionOperations", &o.AllowExtensionOperations)
+ delete(rawMsg, key)
+ case "computerName":
+ err = unpopulate(val, "ComputerName", &o.ComputerName)
+ delete(rawMsg, key)
+ case "customData":
+ err = unpopulate(val, "CustomData", &o.CustomData)
+ delete(rawMsg, key)
+ case "linuxConfiguration":
+ err = unpopulate(val, "LinuxConfiguration", &o.LinuxConfiguration)
+ delete(rawMsg, key)
+ case "requireGuestProvisionSignal":
+ err = unpopulate(val, "RequireGuestProvisionSignal", &o.RequireGuestProvisionSignal)
+ delete(rawMsg, key)
+ case "secrets":
+ err = unpopulate(val, "Secrets", &o.Secrets)
+ delete(rawMsg, key)
+ case "windowsConfiguration":
+ err = unpopulate(val, "WindowsConfiguration", &o.WindowsConfiguration)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OSProfileProvisioningData.
+func (o OSProfileProvisioningData) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "adminPassword", o.AdminPassword)
+ populate(objectMap, "customData", o.CustomData)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OSProfileProvisioningData.
+func (o *OSProfileProvisioningData) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "adminPassword":
+ err = unpopulate(val, "AdminPassword", &o.AdminPassword)
+ delete(rawMsg, key)
+ case "customData":
+ err = unpopulate(val, "CustomData", &o.CustomData)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OSVersion.
+func (o OSVersion) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", o.ID)
+ populate(objectMap, "location", o.Location)
+ populate(objectMap, "name", o.Name)
+ populate(objectMap, "properties", o.Properties)
+ populate(objectMap, "type", o.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OSVersion.
+func (o *OSVersion) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &o.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &o.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &o.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &o.Properties)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &o.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OSVersionListResult.
+func (o OSVersionListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", o.NextLink)
+ populate(objectMap, "value", o.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OSVersionListResult.
+func (o *OSVersionListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &o.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &o.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OSVersionProperties.
+func (o OSVersionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "family", o.Family)
+ populate(objectMap, "familyLabel", o.FamilyLabel)
+ populate(objectMap, "isActive", o.IsActive)
+ populate(objectMap, "isDefault", o.IsDefault)
+ populate(objectMap, "label", o.Label)
+ populate(objectMap, "version", o.Version)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OSVersionProperties.
+func (o *OSVersionProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "family":
+ err = unpopulate(val, "Family", &o.Family)
+ delete(rawMsg, key)
+ case "familyLabel":
+ err = unpopulate(val, "FamilyLabel", &o.FamilyLabel)
+ delete(rawMsg, key)
+ case "isActive":
+ err = unpopulate(val, "IsActive", &o.IsActive)
+ delete(rawMsg, key)
+ case "isDefault":
+ err = unpopulate(val, "IsDefault", &o.IsDefault)
+ delete(rawMsg, key)
+ case "label":
+ err = unpopulate(val, "Label", &o.Label)
+ delete(rawMsg, key)
+ case "version":
+ err = unpopulate(val, "Version", &o.Version)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OSVersionPropertiesBase.
+func (o OSVersionPropertiesBase) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "isActive", o.IsActive)
+ populate(objectMap, "isDefault", o.IsDefault)
+ populate(objectMap, "label", o.Label)
+ populate(objectMap, "version", o.Version)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OSVersionPropertiesBase.
+func (o *OSVersionPropertiesBase) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "isActive":
+ err = unpopulate(val, "IsActive", &o.IsActive)
+ delete(rawMsg, key)
+ case "isDefault":
+ err = unpopulate(val, "IsDefault", &o.IsDefault)
+ delete(rawMsg, key)
+ case "label":
+ err = unpopulate(val, "Label", &o.Label)
+ delete(rawMsg, key)
+ case "version":
+ err = unpopulate(val, "Version", &o.Version)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OperationListResult.
+func (o OperationListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "value", o.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
+func (o *OperationListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "value":
+ err = unpopulate(val, "Value", &o.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OperationValue.
+func (o OperationValue) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "display", o.Display)
+ populate(objectMap, "name", o.Name)
+ populate(objectMap, "origin", o.Origin)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OperationValue.
+func (o *OperationValue) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "display":
+ err = unpopulate(val, "Display", &o.Display)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &o.Name)
+ delete(rawMsg, key)
+ case "origin":
+ err = unpopulate(val, "Origin", &o.Origin)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OperationValueDisplay.
+func (o OperationValueDisplay) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "description", o.Description)
+ populate(objectMap, "operation", o.Operation)
+ populate(objectMap, "provider", o.Provider)
+ populate(objectMap, "resource", o.Resource)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OperationValueDisplay.
+func (o *OperationValueDisplay) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "description":
+ err = unpopulate(val, "Description", &o.Description)
+ delete(rawMsg, key)
+ case "operation":
+ err = unpopulate(val, "Operation", &o.Operation)
+ delete(rawMsg, key)
+ case "provider":
+ err = unpopulate(val, "Provider", &o.Provider)
+ delete(rawMsg, key)
+ case "resource":
+ err = unpopulate(val, "Resource", &o.Resource)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OrchestrationServiceStateInput.
+func (o OrchestrationServiceStateInput) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "action", o.Action)
+ populate(objectMap, "serviceName", o.ServiceName)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OrchestrationServiceStateInput.
+func (o *OrchestrationServiceStateInput) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "action":
+ err = unpopulate(val, "Action", &o.Action)
+ delete(rawMsg, key)
+ case "serviceName":
+ err = unpopulate(val, "ServiceName", &o.ServiceName)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type OrchestrationServiceSummary.
+func (o OrchestrationServiceSummary) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "serviceName", o.ServiceName)
+ populate(objectMap, "serviceState", o.ServiceState)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type OrchestrationServiceSummary.
+func (o *OrchestrationServiceSummary) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "serviceName":
+ err = unpopulate(val, "ServiceName", &o.ServiceName)
+ delete(rawMsg, key)
+ case "serviceState":
+ err = unpopulate(val, "ServiceState", &o.ServiceState)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", o, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PatchInstallationDetail.
+func (p PatchInstallationDetail) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "classifications", p.Classifications)
+ populate(objectMap, "installationState", p.InstallationState)
+ populate(objectMap, "kbId", p.KbID)
+ populate(objectMap, "name", p.Name)
+ populate(objectMap, "patchId", p.PatchID)
+ populate(objectMap, "version", p.Version)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PatchInstallationDetail.
+func (p *PatchInstallationDetail) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "classifications":
+ err = unpopulate(val, "Classifications", &p.Classifications)
+ delete(rawMsg, key)
+ case "installationState":
+ err = unpopulate(val, "InstallationState", &p.InstallationState)
+ delete(rawMsg, key)
+ case "kbId":
+ err = unpopulate(val, "KbID", &p.KbID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &p.Name)
+ delete(rawMsg, key)
+ case "patchId":
+ err = unpopulate(val, "PatchID", &p.PatchID)
+ delete(rawMsg, key)
+ case "version":
+ err = unpopulate(val, "Version", &p.Version)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PatchSettings.
+func (p PatchSettings) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "assessmentMode", p.AssessmentMode)
+ populate(objectMap, "automaticByPlatformSettings", p.AutomaticByPlatformSettings)
+ populate(objectMap, "enableHotpatching", p.EnableHotpatching)
+ populate(objectMap, "patchMode", p.PatchMode)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PatchSettings.
+func (p *PatchSettings) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "assessmentMode":
+ err = unpopulate(val, "AssessmentMode", &p.AssessmentMode)
+ delete(rawMsg, key)
+ case "automaticByPlatformSettings":
+ err = unpopulate(val, "AutomaticByPlatformSettings", &p.AutomaticByPlatformSettings)
+ delete(rawMsg, key)
+ case "enableHotpatching":
+ err = unpopulate(val, "EnableHotpatching", &p.EnableHotpatching)
+ delete(rawMsg, key)
+ case "patchMode":
+ err = unpopulate(val, "PatchMode", &p.PatchMode)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PirCommunityGalleryResource.
+func (p PirCommunityGalleryResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "identifier", p.Identifier)
+ populate(objectMap, "location", p.Location)
+ populate(objectMap, "name", p.Name)
+ populate(objectMap, "type", p.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PirCommunityGalleryResource.
+func (p *PirCommunityGalleryResource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "identifier":
+ err = unpopulate(val, "Identifier", &p.Identifier)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &p.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &p.Name)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &p.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PirResource.
+func (p PirResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "location", p.Location)
+ populate(objectMap, "name", p.Name)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PirResource.
+func (p *PirResource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "location":
+ err = unpopulate(val, "Location", &p.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &p.Name)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PirSharedGalleryResource.
+func (p PirSharedGalleryResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "identifier", p.Identifier)
+ populate(objectMap, "location", p.Location)
+ populate(objectMap, "name", p.Name)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PirSharedGalleryResource.
+func (p *PirSharedGalleryResource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "identifier":
+ err = unpopulate(val, "Identifier", &p.Identifier)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &p.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &p.Name)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type Plan.
+func (p Plan) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", p.Name)
+ populate(objectMap, "product", p.Product)
+ populate(objectMap, "promotionCode", p.PromotionCode)
+ populate(objectMap, "publisher", p.Publisher)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type Plan.
+func (p *Plan) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &p.Name)
+ delete(rawMsg, key)
+ case "product":
+ err = unpopulate(val, "Product", &p.Product)
+ delete(rawMsg, key)
+ case "promotionCode":
+ err = unpopulate(val, "PromotionCode", &p.PromotionCode)
+ delete(rawMsg, key)
+ case "publisher":
+ err = unpopulate(val, "Publisher", &p.Publisher)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PolicyViolation.
+func (p PolicyViolation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "category", p.Category)
+ populate(objectMap, "details", p.Details)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PolicyViolation.
+func (p *PolicyViolation) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "category":
+ err = unpopulate(val, "Category", &p.Category)
+ delete(rawMsg, key)
+ case "details":
+ err = unpopulate(val, "Details", &p.Details)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PriorityMixPolicy.
+func (p PriorityMixPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "baseRegularPriorityCount", p.BaseRegularPriorityCount)
+ populate(objectMap, "regularPriorityPercentageAboveBase", p.RegularPriorityPercentageAboveBase)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PriorityMixPolicy.
+func (p *PriorityMixPolicy) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "baseRegularPriorityCount":
+ err = unpopulate(val, "BaseRegularPriorityCount", &p.BaseRegularPriorityCount)
+ delete(rawMsg, key)
+ case "regularPriorityPercentageAboveBase":
+ err = unpopulate(val, "RegularPriorityPercentageAboveBase", &p.RegularPriorityPercentageAboveBase)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.
+func (p PrivateEndpoint) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", p.ID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.
+func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &p.ID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.
+func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", p.ID)
+ populate(objectMap, "name", p.Name)
+ populate(objectMap, "properties", p.Properties)
+ populate(objectMap, "type", p.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.
+func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &p.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &p.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &p.Properties)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &p.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.
+func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", p.NextLink)
+ populate(objectMap, "value", p.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.
+func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &p.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &p.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.
+func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "privateEndpoint", p.PrivateEndpoint)
+ populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState)
+ populate(objectMap, "provisioningState", p.ProvisioningState)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.
+func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "privateEndpoint":
+ err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint)
+ delete(rawMsg, key)
+ case "privateLinkServiceConnectionState":
+ err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &p.ProvisioningState)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.
+func (p PrivateLinkResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", p.ID)
+ populate(objectMap, "name", p.Name)
+ populate(objectMap, "properties", p.Properties)
+ populate(objectMap, "type", p.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.
+func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &p.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &p.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &p.Properties)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &p.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.
+func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "value", p.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.
+func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "value":
+ err = unpopulate(val, "Value", &p.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.
+func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "groupId", p.GroupID)
+ populate(objectMap, "requiredMembers", p.RequiredMembers)
+ populate(objectMap, "requiredZoneNames", p.RequiredZoneNames)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.
+func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "groupId":
+ err = unpopulate(val, "GroupID", &p.GroupID)
+ delete(rawMsg, key)
+ case "requiredMembers":
+ err = unpopulate(val, "RequiredMembers", &p.RequiredMembers)
+ delete(rawMsg, key)
+ case "requiredZoneNames":
+ err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.
+func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "actionsRequired", p.ActionsRequired)
+ populate(objectMap, "description", p.Description)
+ populate(objectMap, "status", p.Status)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.
+func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "actionsRequired":
+ err = unpopulate(val, "ActionsRequired", &p.ActionsRequired)
+ delete(rawMsg, key)
+ case "description":
+ err = unpopulate(val, "Description", &p.Description)
+ delete(rawMsg, key)
+ case "status":
+ err = unpopulate(val, "Status", &p.Status)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PropertyUpdatesInProgress.
+func (p PropertyUpdatesInProgress) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "targetTier", p.TargetTier)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PropertyUpdatesInProgress.
+func (p *PropertyUpdatesInProgress) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "targetTier":
+ err = unpopulate(val, "TargetTier", &p.TargetTier)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ProximityPlacementGroup.
+func (p ProximityPlacementGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", p.ID)
+ populate(objectMap, "location", p.Location)
+ populate(objectMap, "name", p.Name)
+ populate(objectMap, "properties", p.Properties)
+ populate(objectMap, "tags", p.Tags)
+ populate(objectMap, "type", p.Type)
+ populate(objectMap, "zones", p.Zones)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ProximityPlacementGroup.
+func (p *ProximityPlacementGroup) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &p.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &p.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &p.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &p.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &p.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &p.Type)
+ delete(rawMsg, key)
+ case "zones":
+ err = unpopulate(val, "Zones", &p.Zones)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ProximityPlacementGroupListResult.
+func (p ProximityPlacementGroupListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", p.NextLink)
+ populate(objectMap, "value", p.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ProximityPlacementGroupListResult.
+func (p *ProximityPlacementGroupListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &p.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &p.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ProximityPlacementGroupProperties.
+func (p ProximityPlacementGroupProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "availabilitySets", p.AvailabilitySets)
+ populate(objectMap, "colocationStatus", p.ColocationStatus)
+ populate(objectMap, "intent", p.Intent)
+ populate(objectMap, "proximityPlacementGroupType", p.ProximityPlacementGroupType)
+ populate(objectMap, "virtualMachineScaleSets", p.VirtualMachineScaleSets)
+ populate(objectMap, "virtualMachines", p.VirtualMachines)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ProximityPlacementGroupProperties.
+func (p *ProximityPlacementGroupProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "availabilitySets":
+ err = unpopulate(val, "AvailabilitySets", &p.AvailabilitySets)
+ delete(rawMsg, key)
+ case "colocationStatus":
+ err = unpopulate(val, "ColocationStatus", &p.ColocationStatus)
+ delete(rawMsg, key)
+ case "intent":
+ err = unpopulate(val, "Intent", &p.Intent)
+ delete(rawMsg, key)
+ case "proximityPlacementGroupType":
+ err = unpopulate(val, "ProximityPlacementGroupType", &p.ProximityPlacementGroupType)
+ delete(rawMsg, key)
+ case "virtualMachineScaleSets":
+ err = unpopulate(val, "VirtualMachineScaleSets", &p.VirtualMachineScaleSets)
+ delete(rawMsg, key)
+ case "virtualMachines":
+ err = unpopulate(val, "VirtualMachines", &p.VirtualMachines)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ProximityPlacementGroupPropertiesIntent.
+func (p ProximityPlacementGroupPropertiesIntent) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "vmSizes", p.VMSizes)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ProximityPlacementGroupPropertiesIntent.
+func (p *ProximityPlacementGroupPropertiesIntent) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "vmSizes":
+ err = unpopulate(val, "VMSizes", &p.VMSizes)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ProximityPlacementGroupUpdate.
+func (p ProximityPlacementGroupUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "tags", p.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ProximityPlacementGroupUpdate.
+func (p *ProximityPlacementGroupUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "tags":
+ err = unpopulate(val, "Tags", &p.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ProxyAgentSettings.
+func (p ProxyAgentSettings) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "enabled", p.Enabled)
+ populate(objectMap, "keyIncarnationId", p.KeyIncarnationID)
+ populate(objectMap, "mode", p.Mode)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyAgentSettings.
+func (p *ProxyAgentSettings) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "enabled":
+ err = unpopulate(val, "Enabled", &p.Enabled)
+ delete(rawMsg, key)
+ case "keyIncarnationId":
+ err = unpopulate(val, "KeyIncarnationID", &p.KeyIncarnationID)
+ delete(rawMsg, key)
+ case "mode":
+ err = unpopulate(val, "Mode", &p.Mode)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ProxyOnlyResource.
+func (p ProxyOnlyResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", p.ID)
+ populate(objectMap, "name", p.Name)
+ populate(objectMap, "type", p.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyOnlyResource.
+func (p *ProxyOnlyResource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &p.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &p.Name)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &p.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ProxyResource.
+func (p ProxyResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", p.ID)
+ populate(objectMap, "name", p.Name)
+ populate(objectMap, "type", p.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
+func (p *ProxyResource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &p.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &p.Name)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &p.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PublicIPAddressSKU.
+func (p PublicIPAddressSKU) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", p.Name)
+ populate(objectMap, "tier", p.Tier)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PublicIPAddressSKU.
+func (p *PublicIPAddressSKU) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &p.Name)
+ delete(rawMsg, key)
+ case "tier":
+ err = unpopulate(val, "Tier", &p.Tier)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type PurchasePlan.
+func (p PurchasePlan) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", p.Name)
+ populate(objectMap, "product", p.Product)
+ populate(objectMap, "publisher", p.Publisher)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type PurchasePlan.
+func (p *PurchasePlan) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &p.Name)
+ delete(rawMsg, key)
+ case "product":
+ err = unpopulate(val, "Product", &p.Product)
+ delete(rawMsg, key)
+ case "publisher":
+ err = unpopulate(val, "Publisher", &p.Publisher)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", p, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RecommendedMachineConfiguration.
+func (r RecommendedMachineConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "memory", r.Memory)
+ populate(objectMap, "vCPUs", r.VCPUs)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedMachineConfiguration.
+func (r *RecommendedMachineConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "memory":
+ err = unpopulate(val, "Memory", &r.Memory)
+ delete(rawMsg, key)
+ case "vCPUs":
+ err = unpopulate(val, "VCPUs", &r.VCPUs)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RecoveryWalkResponse.
+func (r RecoveryWalkResponse) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextPlatformUpdateDomain", r.NextPlatformUpdateDomain)
+ populate(objectMap, "walkPerformed", r.WalkPerformed)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RecoveryWalkResponse.
+func (r *RecoveryWalkResponse) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextPlatformUpdateDomain":
+ err = unpopulate(val, "NextPlatformUpdateDomain", &r.NextPlatformUpdateDomain)
+ delete(rawMsg, key)
+ case "walkPerformed":
+ err = unpopulate(val, "WalkPerformed", &r.WalkPerformed)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RegionalReplicationStatus.
+func (r RegionalReplicationStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "details", r.Details)
+ populate(objectMap, "progress", r.Progress)
+ populate(objectMap, "region", r.Region)
+ populate(objectMap, "state", r.State)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RegionalReplicationStatus.
+func (r *RegionalReplicationStatus) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "details":
+ err = unpopulate(val, "Details", &r.Details)
+ delete(rawMsg, key)
+ case "progress":
+ err = unpopulate(val, "Progress", &r.Progress)
+ delete(rawMsg, key)
+ case "region":
+ err = unpopulate(val, "Region", &r.Region)
+ delete(rawMsg, key)
+ case "state":
+ err = unpopulate(val, "State", &r.State)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RegionalSharingStatus.
+func (r RegionalSharingStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "details", r.Details)
+ populate(objectMap, "region", r.Region)
+ populate(objectMap, "state", r.State)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RegionalSharingStatus.
+func (r *RegionalSharingStatus) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "details":
+ err = unpopulate(val, "Details", &r.Details)
+ delete(rawMsg, key)
+ case "region":
+ err = unpopulate(val, "Region", &r.Region)
+ delete(rawMsg, key)
+ case "state":
+ err = unpopulate(val, "State", &r.State)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ReplicationStatus.
+func (r ReplicationStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "aggregatedState", r.AggregatedState)
+ populate(objectMap, "summary", r.Summary)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationStatus.
+func (r *ReplicationStatus) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "aggregatedState":
+ err = unpopulate(val, "AggregatedState", &r.AggregatedState)
+ delete(rawMsg, key)
+ case "summary":
+ err = unpopulate(val, "Summary", &r.Summary)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RequestRateByIntervalInput.
+func (r RequestRateByIntervalInput) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "blobContainerSasUri", r.BlobContainerSasURI)
+ populateDateTimeRFC3339(objectMap, "fromTime", r.FromTime)
+ populate(objectMap, "groupByClientApplicationId", r.GroupByClientApplicationID)
+ populate(objectMap, "groupByOperationName", r.GroupByOperationName)
+ populate(objectMap, "groupByResourceName", r.GroupByResourceName)
+ populate(objectMap, "groupByThrottlePolicy", r.GroupByThrottlePolicy)
+ populate(objectMap, "groupByUserAgent", r.GroupByUserAgent)
+ populate(objectMap, "intervalLength", r.IntervalLength)
+ populateDateTimeRFC3339(objectMap, "toTime", r.ToTime)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RequestRateByIntervalInput.
+func (r *RequestRateByIntervalInput) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "blobContainerSasUri":
+ err = unpopulate(val, "BlobContainerSasURI", &r.BlobContainerSasURI)
+ delete(rawMsg, key)
+ case "fromTime":
+ err = unpopulateDateTimeRFC3339(val, "FromTime", &r.FromTime)
+ delete(rawMsg, key)
+ case "groupByClientApplicationId":
+ err = unpopulate(val, "GroupByClientApplicationID", &r.GroupByClientApplicationID)
+ delete(rawMsg, key)
+ case "groupByOperationName":
+ err = unpopulate(val, "GroupByOperationName", &r.GroupByOperationName)
+ delete(rawMsg, key)
+ case "groupByResourceName":
+ err = unpopulate(val, "GroupByResourceName", &r.GroupByResourceName)
+ delete(rawMsg, key)
+ case "groupByThrottlePolicy":
+ err = unpopulate(val, "GroupByThrottlePolicy", &r.GroupByThrottlePolicy)
+ delete(rawMsg, key)
+ case "groupByUserAgent":
+ err = unpopulate(val, "GroupByUserAgent", &r.GroupByUserAgent)
+ delete(rawMsg, key)
+ case "intervalLength":
+ err = unpopulate(val, "IntervalLength", &r.IntervalLength)
+ delete(rawMsg, key)
+ case "toTime":
+ err = unpopulateDateTimeRFC3339(val, "ToTime", &r.ToTime)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResiliencyPolicy.
+func (r ResiliencyPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "resilientVMCreationPolicy", r.ResilientVMCreationPolicy)
+ populate(objectMap, "resilientVMDeletionPolicy", r.ResilientVMDeletionPolicy)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResiliencyPolicy.
+func (r *ResiliencyPolicy) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "resilientVMCreationPolicy":
+ err = unpopulate(val, "ResilientVMCreationPolicy", &r.ResilientVMCreationPolicy)
+ delete(rawMsg, key)
+ case "resilientVMDeletionPolicy":
+ err = unpopulate(val, "ResilientVMDeletionPolicy", &r.ResilientVMDeletionPolicy)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResilientVMCreationPolicy.
+func (r ResilientVMCreationPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "enabled", r.Enabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResilientVMCreationPolicy.
+func (r *ResilientVMCreationPolicy) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "enabled":
+ err = unpopulate(val, "Enabled", &r.Enabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResilientVMDeletionPolicy.
+func (r ResilientVMDeletionPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "enabled", r.Enabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResilientVMDeletionPolicy.
+func (r *ResilientVMDeletionPolicy) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "enabled":
+ err = unpopulate(val, "Enabled", &r.Enabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", r.ID)
+ populate(objectMap, "location", r.Location)
+ populate(objectMap, "name", r.Name)
+ populate(objectMap, "tags", r.Tags)
+ populate(objectMap, "type", r.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
+func (r *Resource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &r.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &r.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &r.Name)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &r.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &r.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResourceInstanceViewStatus.
+func (r ResourceInstanceViewStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "code", r.Code)
+ populate(objectMap, "displayStatus", r.DisplayStatus)
+ populate(objectMap, "level", r.Level)
+ populate(objectMap, "message", r.Message)
+ populateDateTimeRFC3339(objectMap, "time", r.Time)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceInstanceViewStatus.
+func (r *ResourceInstanceViewStatus) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "code":
+ err = unpopulate(val, "Code", &r.Code)
+ delete(rawMsg, key)
+ case "displayStatus":
+ err = unpopulate(val, "DisplayStatus", &r.DisplayStatus)
+ delete(rawMsg, key)
+ case "level":
+ err = unpopulate(val, "Level", &r.Level)
+ delete(rawMsg, key)
+ case "message":
+ err = unpopulate(val, "Message", &r.Message)
+ delete(rawMsg, key)
+ case "time":
+ err = unpopulateDateTimeRFC3339(val, "Time", &r.Time)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResourceRange.
+func (r ResourceRange) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "max", r.Max)
+ populate(objectMap, "min", r.Min)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceRange.
+func (r *ResourceRange) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "max":
+ err = unpopulate(val, "Max", &r.Max)
+ delete(rawMsg, key)
+ case "min":
+ err = unpopulate(val, "Min", &r.Min)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResourceSKU.
+func (r ResourceSKU) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "apiVersions", r.APIVersions)
+ populate(objectMap, "capabilities", r.Capabilities)
+ populate(objectMap, "capacity", r.Capacity)
+ populate(objectMap, "costs", r.Costs)
+ populate(objectMap, "family", r.Family)
+ populate(objectMap, "kind", r.Kind)
+ populate(objectMap, "locationInfo", r.LocationInfo)
+ populate(objectMap, "locations", r.Locations)
+ populate(objectMap, "name", r.Name)
+ populate(objectMap, "resourceType", r.ResourceType)
+ populate(objectMap, "restrictions", r.Restrictions)
+ populate(objectMap, "size", r.Size)
+ populate(objectMap, "tier", r.Tier)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU.
+func (r *ResourceSKU) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "apiVersions":
+ err = unpopulate(val, "APIVersions", &r.APIVersions)
+ delete(rawMsg, key)
+ case "capabilities":
+ err = unpopulate(val, "Capabilities", &r.Capabilities)
+ delete(rawMsg, key)
+ case "capacity":
+ err = unpopulate(val, "Capacity", &r.Capacity)
+ delete(rawMsg, key)
+ case "costs":
+ err = unpopulate(val, "Costs", &r.Costs)
+ delete(rawMsg, key)
+ case "family":
+ err = unpopulate(val, "Family", &r.Family)
+ delete(rawMsg, key)
+ case "kind":
+ err = unpopulate(val, "Kind", &r.Kind)
+ delete(rawMsg, key)
+ case "locationInfo":
+ err = unpopulate(val, "LocationInfo", &r.LocationInfo)
+ delete(rawMsg, key)
+ case "locations":
+ err = unpopulate(val, "Locations", &r.Locations)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &r.Name)
+ delete(rawMsg, key)
+ case "resourceType":
+ err = unpopulate(val, "ResourceType", &r.ResourceType)
+ delete(rawMsg, key)
+ case "restrictions":
+ err = unpopulate(val, "Restrictions", &r.Restrictions)
+ delete(rawMsg, key)
+ case "size":
+ err = unpopulate(val, "Size", &r.Size)
+ delete(rawMsg, key)
+ case "tier":
+ err = unpopulate(val, "Tier", &r.Tier)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapabilities.
+func (r ResourceSKUCapabilities) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", r.Name)
+ populate(objectMap, "value", r.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCapabilities.
+func (r *ResourceSKUCapabilities) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &r.Name)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &r.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapacity.
+func (r ResourceSKUCapacity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "default", r.Default)
+ populate(objectMap, "maximum", r.Maximum)
+ populate(objectMap, "minimum", r.Minimum)
+ populate(objectMap, "scaleType", r.ScaleType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCapacity.
+func (r *ResourceSKUCapacity) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "default":
+ err = unpopulate(val, "Default", &r.Default)
+ delete(rawMsg, key)
+ case "maximum":
+ err = unpopulate(val, "Maximum", &r.Maximum)
+ delete(rawMsg, key)
+ case "minimum":
+ err = unpopulate(val, "Minimum", &r.Minimum)
+ delete(rawMsg, key)
+ case "scaleType":
+ err = unpopulate(val, "ScaleType", &r.ScaleType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResourceSKUCosts.
+func (r ResourceSKUCosts) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "extendedUnit", r.ExtendedUnit)
+ populate(objectMap, "meterID", r.MeterID)
+ populate(objectMap, "quantity", r.Quantity)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCosts.
+func (r *ResourceSKUCosts) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "extendedUnit":
+ err = unpopulate(val, "ExtendedUnit", &r.ExtendedUnit)
+ delete(rawMsg, key)
+ case "meterID":
+ err = unpopulate(val, "MeterID", &r.MeterID)
+ delete(rawMsg, key)
+ case "quantity":
+ err = unpopulate(val, "Quantity", &r.Quantity)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResourceSKULocationInfo.
+func (r ResourceSKULocationInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "extendedLocations", r.ExtendedLocations)
+ populate(objectMap, "location", r.Location)
+ populate(objectMap, "type", r.Type)
+ populate(objectMap, "zoneDetails", r.ZoneDetails)
+ populate(objectMap, "zones", r.Zones)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKULocationInfo.
+func (r *ResourceSKULocationInfo) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "extendedLocations":
+ err = unpopulate(val, "ExtendedLocations", &r.ExtendedLocations)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &r.Location)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &r.Type)
+ delete(rawMsg, key)
+ case "zoneDetails":
+ err = unpopulate(val, "ZoneDetails", &r.ZoneDetails)
+ delete(rawMsg, key)
+ case "zones":
+ err = unpopulate(val, "Zones", &r.Zones)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictionInfo.
+func (r ResourceSKURestrictionInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "locations", r.Locations)
+ populate(objectMap, "zones", r.Zones)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKURestrictionInfo.
+func (r *ResourceSKURestrictionInfo) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "locations":
+ err = unpopulate(val, "Locations", &r.Locations)
+ delete(rawMsg, key)
+ case "zones":
+ err = unpopulate(val, "Zones", &r.Zones)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictions.
+func (r ResourceSKURestrictions) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "reasonCode", r.ReasonCode)
+ populate(objectMap, "restrictionInfo", r.RestrictionInfo)
+ populate(objectMap, "type", r.Type)
+ populate(objectMap, "values", r.Values)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKURestrictions.
+func (r *ResourceSKURestrictions) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "reasonCode":
+ err = unpopulate(val, "ReasonCode", &r.ReasonCode)
+ delete(rawMsg, key)
+ case "restrictionInfo":
+ err = unpopulate(val, "RestrictionInfo", &r.RestrictionInfo)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &r.Type)
+ delete(rawMsg, key)
+ case "values":
+ err = unpopulate(val, "Values", &r.Values)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResourceSKUZoneDetails.
+func (r ResourceSKUZoneDetails) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "capabilities", r.Capabilities)
+ populate(objectMap, "name", r.Name)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUZoneDetails.
+func (r *ResourceSKUZoneDetails) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "capabilities":
+ err = unpopulate(val, "Capabilities", &r.Capabilities)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &r.Name)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResourceSKUsResult.
+func (r ResourceSKUsResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", r.NextLink)
+ populate(objectMap, "value", r.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUsResult.
+func (r *ResourceSKUsResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &r.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &r.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResourceSharingProfile.
+func (r ResourceSharingProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "subscriptionIds", r.SubscriptionIDs)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSharingProfile.
+func (r *ResourceSharingProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "subscriptionIds":
+ err = unpopulate(val, "SubscriptionIDs", &r.SubscriptionIDs)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResourceURIList.
+func (r ResourceURIList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", r.NextLink)
+ populate(objectMap, "value", r.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceURIList.
+func (r *ResourceURIList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &r.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &r.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ResourceWithOptionalLocation.
+func (r ResourceWithOptionalLocation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", r.ID)
+ populate(objectMap, "location", r.Location)
+ populate(objectMap, "name", r.Name)
+ populate(objectMap, "tags", r.Tags)
+ populate(objectMap, "type", r.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceWithOptionalLocation.
+func (r *ResourceWithOptionalLocation) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &r.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &r.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &r.Name)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &r.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &r.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RestorePoint.
+func (r RestorePoint) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", r.ID)
+ populate(objectMap, "name", r.Name)
+ populate(objectMap, "properties", r.Properties)
+ populate(objectMap, "type", r.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePoint.
+func (r *RestorePoint) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &r.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &r.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &r.Properties)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &r.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RestorePointCollection.
+func (r RestorePointCollection) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", r.ID)
+ populate(objectMap, "location", r.Location)
+ populate(objectMap, "name", r.Name)
+ populate(objectMap, "properties", r.Properties)
+ populate(objectMap, "tags", r.Tags)
+ populate(objectMap, "type", r.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointCollection.
+func (r *RestorePointCollection) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &r.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &r.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &r.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &r.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &r.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &r.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RestorePointCollectionListResult.
+func (r RestorePointCollectionListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", r.NextLink)
+ populate(objectMap, "value", r.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointCollectionListResult.
+func (r *RestorePointCollectionListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &r.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &r.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RestorePointCollectionProperties.
+func (r RestorePointCollectionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "provisioningState", r.ProvisioningState)
+ populate(objectMap, "restorePointCollectionId", r.RestorePointCollectionID)
+ populate(objectMap, "restorePoints", r.RestorePoints)
+ populate(objectMap, "source", r.Source)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointCollectionProperties.
+func (r *RestorePointCollectionProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &r.ProvisioningState)
+ delete(rawMsg, key)
+ case "restorePointCollectionId":
+ err = unpopulate(val, "RestorePointCollectionID", &r.RestorePointCollectionID)
+ delete(rawMsg, key)
+ case "restorePoints":
+ err = unpopulate(val, "RestorePoints", &r.RestorePoints)
+ delete(rawMsg, key)
+ case "source":
+ err = unpopulate(val, "Source", &r.Source)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RestorePointCollectionSourceProperties.
+func (r RestorePointCollectionSourceProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", r.ID)
+ populate(objectMap, "location", r.Location)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointCollectionSourceProperties.
+func (r *RestorePointCollectionSourceProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &r.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &r.Location)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RestorePointCollectionUpdate.
+func (r RestorePointCollectionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "properties", r.Properties)
+ populate(objectMap, "tags", r.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointCollectionUpdate.
+func (r *RestorePointCollectionUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "properties":
+ err = unpopulate(val, "Properties", &r.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &r.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RestorePointEncryption.
+func (r RestorePointEncryption) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskEncryptionSet", r.DiskEncryptionSet)
+ populate(objectMap, "type", r.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointEncryption.
+func (r *RestorePointEncryption) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskEncryptionSet":
+ err = unpopulate(val, "DiskEncryptionSet", &r.DiskEncryptionSet)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &r.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RestorePointInstanceView.
+func (r RestorePointInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskRestorePoints", r.DiskRestorePoints)
+ populate(objectMap, "statuses", r.Statuses)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointInstanceView.
+func (r *RestorePointInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskRestorePoints":
+ err = unpopulate(val, "DiskRestorePoints", &r.DiskRestorePoints)
+ delete(rawMsg, key)
+ case "statuses":
+ err = unpopulate(val, "Statuses", &r.Statuses)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RestorePointProperties.
+func (r RestorePointProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "consistencyMode", r.ConsistencyMode)
+ populate(objectMap, "excludeDisks", r.ExcludeDisks)
+ populate(objectMap, "instanceView", r.InstanceView)
+ populate(objectMap, "provisioningState", r.ProvisioningState)
+ populate(objectMap, "sourceMetadata", r.SourceMetadata)
+ populate(objectMap, "sourceRestorePoint", r.SourceRestorePoint)
+ populateDateTimeRFC3339(objectMap, "timeCreated", r.TimeCreated)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointProperties.
+func (r *RestorePointProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "consistencyMode":
+ err = unpopulate(val, "ConsistencyMode", &r.ConsistencyMode)
+ delete(rawMsg, key)
+ case "excludeDisks":
+ err = unpopulate(val, "ExcludeDisks", &r.ExcludeDisks)
+ delete(rawMsg, key)
+ case "instanceView":
+ err = unpopulate(val, "InstanceView", &r.InstanceView)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &r.ProvisioningState)
+ delete(rawMsg, key)
+ case "sourceMetadata":
+ err = unpopulate(val, "SourceMetadata", &r.SourceMetadata)
+ delete(rawMsg, key)
+ case "sourceRestorePoint":
+ err = unpopulate(val, "SourceRestorePoint", &r.SourceRestorePoint)
+ delete(rawMsg, key)
+ case "timeCreated":
+ err = unpopulateDateTimeRFC3339(val, "TimeCreated", &r.TimeCreated)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RestorePointSourceMetadata.
+func (r RestorePointSourceMetadata) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diagnosticsProfile", r.DiagnosticsProfile)
+ populate(objectMap, "hardwareProfile", r.HardwareProfile)
+ populate(objectMap, "hyperVGeneration", r.HyperVGeneration)
+ populate(objectMap, "licenseType", r.LicenseType)
+ populate(objectMap, "location", r.Location)
+ populate(objectMap, "osProfile", r.OSProfile)
+ populate(objectMap, "securityProfile", r.SecurityProfile)
+ populate(objectMap, "storageProfile", r.StorageProfile)
+ populate(objectMap, "userData", r.UserData)
+ populate(objectMap, "vmId", r.VMID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointSourceMetadata.
+func (r *RestorePointSourceMetadata) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diagnosticsProfile":
+ err = unpopulate(val, "DiagnosticsProfile", &r.DiagnosticsProfile)
+ delete(rawMsg, key)
+ case "hardwareProfile":
+ err = unpopulate(val, "HardwareProfile", &r.HardwareProfile)
+ delete(rawMsg, key)
+ case "hyperVGeneration":
+ err = unpopulate(val, "HyperVGeneration", &r.HyperVGeneration)
+ delete(rawMsg, key)
+ case "licenseType":
+ err = unpopulate(val, "LicenseType", &r.LicenseType)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &r.Location)
+ delete(rawMsg, key)
+ case "osProfile":
+ err = unpopulate(val, "OSProfile", &r.OSProfile)
+ delete(rawMsg, key)
+ case "securityProfile":
+ err = unpopulate(val, "SecurityProfile", &r.SecurityProfile)
+ delete(rawMsg, key)
+ case "storageProfile":
+ err = unpopulate(val, "StorageProfile", &r.StorageProfile)
+ delete(rawMsg, key)
+ case "userData":
+ err = unpopulate(val, "UserData", &r.UserData)
+ delete(rawMsg, key)
+ case "vmId":
+ err = unpopulate(val, "VMID", &r.VMID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RestorePointSourceVMDataDisk.
+func (r RestorePointSourceVMDataDisk) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "caching", r.Caching)
+ populate(objectMap, "diskRestorePoint", r.DiskRestorePoint)
+ populate(objectMap, "diskSizeGB", r.DiskSizeGB)
+ populate(objectMap, "lun", r.Lun)
+ populate(objectMap, "managedDisk", r.ManagedDisk)
+ populate(objectMap, "name", r.Name)
+ populate(objectMap, "writeAcceleratorEnabled", r.WriteAcceleratorEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointSourceVMDataDisk.
+func (r *RestorePointSourceVMDataDisk) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "caching":
+ err = unpopulate(val, "Caching", &r.Caching)
+ delete(rawMsg, key)
+ case "diskRestorePoint":
+ err = unpopulate(val, "DiskRestorePoint", &r.DiskRestorePoint)
+ delete(rawMsg, key)
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &r.DiskSizeGB)
+ delete(rawMsg, key)
+ case "lun":
+ err = unpopulate(val, "Lun", &r.Lun)
+ delete(rawMsg, key)
+ case "managedDisk":
+ err = unpopulate(val, "ManagedDisk", &r.ManagedDisk)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &r.Name)
+ delete(rawMsg, key)
+ case "writeAcceleratorEnabled":
+ err = unpopulate(val, "WriteAcceleratorEnabled", &r.WriteAcceleratorEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RestorePointSourceVMOSDisk.
+func (r RestorePointSourceVMOSDisk) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "caching", r.Caching)
+ populate(objectMap, "diskRestorePoint", r.DiskRestorePoint)
+ populate(objectMap, "diskSizeGB", r.DiskSizeGB)
+ populate(objectMap, "encryptionSettings", r.EncryptionSettings)
+ populate(objectMap, "managedDisk", r.ManagedDisk)
+ populate(objectMap, "name", r.Name)
+ populate(objectMap, "osType", r.OSType)
+ populate(objectMap, "writeAcceleratorEnabled", r.WriteAcceleratorEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointSourceVMOSDisk.
+func (r *RestorePointSourceVMOSDisk) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "caching":
+ err = unpopulate(val, "Caching", &r.Caching)
+ delete(rawMsg, key)
+ case "diskRestorePoint":
+ err = unpopulate(val, "DiskRestorePoint", &r.DiskRestorePoint)
+ delete(rawMsg, key)
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &r.DiskSizeGB)
+ delete(rawMsg, key)
+ case "encryptionSettings":
+ err = unpopulate(val, "EncryptionSettings", &r.EncryptionSettings)
+ delete(rawMsg, key)
+ case "managedDisk":
+ err = unpopulate(val, "ManagedDisk", &r.ManagedDisk)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &r.Name)
+ delete(rawMsg, key)
+ case "osType":
+ err = unpopulate(val, "OSType", &r.OSType)
+ delete(rawMsg, key)
+ case "writeAcceleratorEnabled":
+ err = unpopulate(val, "WriteAcceleratorEnabled", &r.WriteAcceleratorEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RestorePointSourceVMStorageProfile.
+func (r RestorePointSourceVMStorageProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dataDisks", r.DataDisks)
+ populate(objectMap, "diskControllerType", r.DiskControllerType)
+ populate(objectMap, "osDisk", r.OSDisk)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointSourceVMStorageProfile.
+func (r *RestorePointSourceVMStorageProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dataDisks":
+ err = unpopulate(val, "DataDisks", &r.DataDisks)
+ delete(rawMsg, key)
+ case "diskControllerType":
+ err = unpopulate(val, "DiskControllerType", &r.DiskControllerType)
+ delete(rawMsg, key)
+ case "osDisk":
+ err = unpopulate(val, "OSDisk", &r.OSDisk)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RetrieveBootDiagnosticsDataResult.
+func (r RetrieveBootDiagnosticsDataResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "consoleScreenshotBlobUri", r.ConsoleScreenshotBlobURI)
+ populate(objectMap, "serialConsoleLogBlobUri", r.SerialConsoleLogBlobURI)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RetrieveBootDiagnosticsDataResult.
+func (r *RetrieveBootDiagnosticsDataResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "consoleScreenshotBlobUri":
+ err = unpopulate(val, "ConsoleScreenshotBlobURI", &r.ConsoleScreenshotBlobURI)
+ delete(rawMsg, key)
+ case "serialConsoleLogBlobUri":
+ err = unpopulate(val, "SerialConsoleLogBlobURI", &r.SerialConsoleLogBlobURI)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RoleInstance.
+func (r RoleInstance) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", r.ID)
+ populate(objectMap, "location", r.Location)
+ populate(objectMap, "name", r.Name)
+ populate(objectMap, "properties", r.Properties)
+ populate(objectMap, "sku", r.SKU)
+ populate(objectMap, "tags", r.Tags)
+ populate(objectMap, "type", r.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RoleInstance.
+func (r *RoleInstance) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &r.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &r.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &r.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &r.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &r.SKU)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &r.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &r.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RoleInstanceListResult.
+func (r RoleInstanceListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", r.NextLink)
+ populate(objectMap, "value", r.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RoleInstanceListResult.
+func (r *RoleInstanceListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &r.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &r.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RoleInstanceNetworkProfile.
+func (r RoleInstanceNetworkProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "networkInterfaces", r.NetworkInterfaces)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RoleInstanceNetworkProfile.
+func (r *RoleInstanceNetworkProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "networkInterfaces":
+ err = unpopulate(val, "NetworkInterfaces", &r.NetworkInterfaces)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RoleInstanceProperties.
+func (r RoleInstanceProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "instanceView", r.InstanceView)
+ populate(objectMap, "networkProfile", r.NetworkProfile)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RoleInstanceProperties.
+func (r *RoleInstanceProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "instanceView":
+ err = unpopulate(val, "InstanceView", &r.InstanceView)
+ delete(rawMsg, key)
+ case "networkProfile":
+ err = unpopulate(val, "NetworkProfile", &r.NetworkProfile)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RoleInstanceView.
+func (r RoleInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "platformFaultDomain", r.PlatformFaultDomain)
+ populate(objectMap, "platformUpdateDomain", r.PlatformUpdateDomain)
+ populate(objectMap, "privateId", r.PrivateID)
+ populate(objectMap, "statuses", r.Statuses)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RoleInstanceView.
+func (r *RoleInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "platformFaultDomain":
+ err = unpopulate(val, "PlatformFaultDomain", &r.PlatformFaultDomain)
+ delete(rawMsg, key)
+ case "platformUpdateDomain":
+ err = unpopulate(val, "PlatformUpdateDomain", &r.PlatformUpdateDomain)
+ delete(rawMsg, key)
+ case "privateId":
+ err = unpopulate(val, "PrivateID", &r.PrivateID)
+ delete(rawMsg, key)
+ case "statuses":
+ err = unpopulate(val, "Statuses", &r.Statuses)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RoleInstances.
+func (r RoleInstances) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "roleInstances", r.RoleInstances)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RoleInstances.
+func (r *RoleInstances) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "roleInstances":
+ err = unpopulate(val, "RoleInstances", &r.RoleInstances)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RollbackStatusInfo.
+func (r RollbackStatusInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "failedRolledbackInstanceCount", r.FailedRolledbackInstanceCount)
+ populate(objectMap, "rollbackError", r.RollbackError)
+ populate(objectMap, "successfullyRolledbackInstanceCount", r.SuccessfullyRolledbackInstanceCount)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RollbackStatusInfo.
+func (r *RollbackStatusInfo) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "failedRolledbackInstanceCount":
+ err = unpopulate(val, "FailedRolledbackInstanceCount", &r.FailedRolledbackInstanceCount)
+ delete(rawMsg, key)
+ case "rollbackError":
+ err = unpopulate(val, "RollbackError", &r.RollbackError)
+ delete(rawMsg, key)
+ case "successfullyRolledbackInstanceCount":
+ err = unpopulate(val, "SuccessfullyRolledbackInstanceCount", &r.SuccessfullyRolledbackInstanceCount)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RollingUpgradePolicy.
+func (r RollingUpgradePolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "enableCrossZoneUpgrade", r.EnableCrossZoneUpgrade)
+ populate(objectMap, "maxBatchInstancePercent", r.MaxBatchInstancePercent)
+ populate(objectMap, "maxSurge", r.MaxSurge)
+ populate(objectMap, "maxUnhealthyInstancePercent", r.MaxUnhealthyInstancePercent)
+ populate(objectMap, "maxUnhealthyUpgradedInstancePercent", r.MaxUnhealthyUpgradedInstancePercent)
+ populate(objectMap, "pauseTimeBetweenBatches", r.PauseTimeBetweenBatches)
+ populate(objectMap, "prioritizeUnhealthyInstances", r.PrioritizeUnhealthyInstances)
+ populate(objectMap, "rollbackFailedInstancesOnPolicyBreach", r.RollbackFailedInstancesOnPolicyBreach)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RollingUpgradePolicy.
+func (r *RollingUpgradePolicy) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "enableCrossZoneUpgrade":
+ err = unpopulate(val, "EnableCrossZoneUpgrade", &r.EnableCrossZoneUpgrade)
+ delete(rawMsg, key)
+ case "maxBatchInstancePercent":
+ err = unpopulate(val, "MaxBatchInstancePercent", &r.MaxBatchInstancePercent)
+ delete(rawMsg, key)
+ case "maxSurge":
+ err = unpopulate(val, "MaxSurge", &r.MaxSurge)
+ delete(rawMsg, key)
+ case "maxUnhealthyInstancePercent":
+ err = unpopulate(val, "MaxUnhealthyInstancePercent", &r.MaxUnhealthyInstancePercent)
+ delete(rawMsg, key)
+ case "maxUnhealthyUpgradedInstancePercent":
+ err = unpopulate(val, "MaxUnhealthyUpgradedInstancePercent", &r.MaxUnhealthyUpgradedInstancePercent)
+ delete(rawMsg, key)
+ case "pauseTimeBetweenBatches":
+ err = unpopulate(val, "PauseTimeBetweenBatches", &r.PauseTimeBetweenBatches)
+ delete(rawMsg, key)
+ case "prioritizeUnhealthyInstances":
+ err = unpopulate(val, "PrioritizeUnhealthyInstances", &r.PrioritizeUnhealthyInstances)
+ delete(rawMsg, key)
+ case "rollbackFailedInstancesOnPolicyBreach":
+ err = unpopulate(val, "RollbackFailedInstancesOnPolicyBreach", &r.RollbackFailedInstancesOnPolicyBreach)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RollingUpgradeProgressInfo.
+func (r RollingUpgradeProgressInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "failedInstanceCount", r.FailedInstanceCount)
+ populate(objectMap, "inProgressInstanceCount", r.InProgressInstanceCount)
+ populate(objectMap, "pendingInstanceCount", r.PendingInstanceCount)
+ populate(objectMap, "successfulInstanceCount", r.SuccessfulInstanceCount)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RollingUpgradeProgressInfo.
+func (r *RollingUpgradeProgressInfo) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "failedInstanceCount":
+ err = unpopulate(val, "FailedInstanceCount", &r.FailedInstanceCount)
+ delete(rawMsg, key)
+ case "inProgressInstanceCount":
+ err = unpopulate(val, "InProgressInstanceCount", &r.InProgressInstanceCount)
+ delete(rawMsg, key)
+ case "pendingInstanceCount":
+ err = unpopulate(val, "PendingInstanceCount", &r.PendingInstanceCount)
+ delete(rawMsg, key)
+ case "successfulInstanceCount":
+ err = unpopulate(val, "SuccessfulInstanceCount", &r.SuccessfulInstanceCount)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RollingUpgradeRunningStatus.
+func (r RollingUpgradeRunningStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "code", r.Code)
+ populate(objectMap, "lastAction", r.LastAction)
+ populateDateTimeRFC3339(objectMap, "lastActionTime", r.LastActionTime)
+ populateDateTimeRFC3339(objectMap, "startTime", r.StartTime)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RollingUpgradeRunningStatus.
+func (r *RollingUpgradeRunningStatus) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "code":
+ err = unpopulate(val, "Code", &r.Code)
+ delete(rawMsg, key)
+ case "lastAction":
+ err = unpopulate(val, "LastAction", &r.LastAction)
+ delete(rawMsg, key)
+ case "lastActionTime":
+ err = unpopulateDateTimeRFC3339(val, "LastActionTime", &r.LastActionTime)
+ delete(rawMsg, key)
+ case "startTime":
+ err = unpopulateDateTimeRFC3339(val, "StartTime", &r.StartTime)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RollingUpgradeStatusInfo.
+func (r RollingUpgradeStatusInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", r.ID)
+ populate(objectMap, "location", r.Location)
+ populate(objectMap, "name", r.Name)
+ populate(objectMap, "properties", r.Properties)
+ populate(objectMap, "tags", r.Tags)
+ populate(objectMap, "type", r.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RollingUpgradeStatusInfo.
+func (r *RollingUpgradeStatusInfo) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &r.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &r.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &r.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &r.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &r.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &r.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RollingUpgradeStatusInfoProperties.
+func (r RollingUpgradeStatusInfoProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "error", r.Error)
+ populate(objectMap, "policy", r.Policy)
+ populate(objectMap, "progress", r.Progress)
+ populate(objectMap, "runningStatus", r.RunningStatus)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RollingUpgradeStatusInfoProperties.
+func (r *RollingUpgradeStatusInfoProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "error":
+ err = unpopulate(val, "Error", &r.Error)
+ delete(rawMsg, key)
+ case "policy":
+ err = unpopulate(val, "Policy", &r.Policy)
+ delete(rawMsg, key)
+ case "progress":
+ err = unpopulate(val, "Progress", &r.Progress)
+ delete(rawMsg, key)
+ case "runningStatus":
+ err = unpopulate(val, "RunningStatus", &r.RunningStatus)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RunCommandDocument.
+func (r RunCommandDocument) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "description", r.Description)
+ populate(objectMap, "id", r.ID)
+ populate(objectMap, "label", r.Label)
+ populate(objectMap, "osType", r.OSType)
+ populate(objectMap, "parameters", r.Parameters)
+ populate(objectMap, "$schema", r.Schema)
+ populate(objectMap, "script", r.Script)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RunCommandDocument.
+func (r *RunCommandDocument) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "description":
+ err = unpopulate(val, "Description", &r.Description)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &r.ID)
+ delete(rawMsg, key)
+ case "label":
+ err = unpopulate(val, "Label", &r.Label)
+ delete(rawMsg, key)
+ case "osType":
+ err = unpopulate(val, "OSType", &r.OSType)
+ delete(rawMsg, key)
+ case "parameters":
+ err = unpopulate(val, "Parameters", &r.Parameters)
+ delete(rawMsg, key)
+ case "$schema":
+ err = unpopulate(val, "Schema", &r.Schema)
+ delete(rawMsg, key)
+ case "script":
+ err = unpopulate(val, "Script", &r.Script)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RunCommandDocumentBase.
+func (r RunCommandDocumentBase) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "description", r.Description)
+ populate(objectMap, "id", r.ID)
+ populate(objectMap, "label", r.Label)
+ populate(objectMap, "osType", r.OSType)
+ populate(objectMap, "$schema", r.Schema)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RunCommandDocumentBase.
+func (r *RunCommandDocumentBase) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "description":
+ err = unpopulate(val, "Description", &r.Description)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &r.ID)
+ delete(rawMsg, key)
+ case "label":
+ err = unpopulate(val, "Label", &r.Label)
+ delete(rawMsg, key)
+ case "osType":
+ err = unpopulate(val, "OSType", &r.OSType)
+ delete(rawMsg, key)
+ case "$schema":
+ err = unpopulate(val, "Schema", &r.Schema)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RunCommandInput.
+func (r RunCommandInput) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "commandId", r.CommandID)
+ populate(objectMap, "parameters", r.Parameters)
+ populate(objectMap, "script", r.Script)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RunCommandInput.
+func (r *RunCommandInput) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "commandId":
+ err = unpopulate(val, "CommandID", &r.CommandID)
+ delete(rawMsg, key)
+ case "parameters":
+ err = unpopulate(val, "Parameters", &r.Parameters)
+ delete(rawMsg, key)
+ case "script":
+ err = unpopulate(val, "Script", &r.Script)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RunCommandInputParameter.
+func (r RunCommandInputParameter) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", r.Name)
+ populate(objectMap, "value", r.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RunCommandInputParameter.
+func (r *RunCommandInputParameter) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &r.Name)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &r.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RunCommandListResult.
+func (r RunCommandListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", r.NextLink)
+ populate(objectMap, "value", r.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RunCommandListResult.
+func (r *RunCommandListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &r.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &r.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RunCommandManagedIdentity.
+func (r RunCommandManagedIdentity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "clientId", r.ClientID)
+ populate(objectMap, "objectId", r.ObjectID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RunCommandManagedIdentity.
+func (r *RunCommandManagedIdentity) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "clientId":
+ err = unpopulate(val, "ClientID", &r.ClientID)
+ delete(rawMsg, key)
+ case "objectId":
+ err = unpopulate(val, "ObjectID", &r.ObjectID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RunCommandParameterDefinition.
+func (r RunCommandParameterDefinition) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "defaultValue", r.DefaultValue)
+ populate(objectMap, "name", r.Name)
+ populate(objectMap, "required", r.Required)
+ populate(objectMap, "type", r.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RunCommandParameterDefinition.
+func (r *RunCommandParameterDefinition) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "defaultValue":
+ err = unpopulate(val, "DefaultValue", &r.DefaultValue)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &r.Name)
+ delete(rawMsg, key)
+ case "required":
+ err = unpopulate(val, "Required", &r.Required)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &r.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type RunCommandResult.
+func (r RunCommandResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "value", r.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type RunCommandResult.
+func (r *RunCommandResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "value":
+ err = unpopulate(val, "Value", &r.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", r, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SKU.
+func (s SKU) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "capacity", s.Capacity)
+ populate(objectMap, "name", s.Name)
+ populate(objectMap, "tier", s.Tier)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SKU.
+func (s *SKU) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "capacity":
+ err = unpopulate(val, "Capacity", &s.Capacity)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &s.Name)
+ delete(rawMsg, key)
+ case "tier":
+ err = unpopulate(val, "Tier", &s.Tier)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SSHConfiguration.
+func (s SSHConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "publicKeys", s.PublicKeys)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SSHConfiguration.
+func (s *SSHConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "publicKeys":
+ err = unpopulate(val, "PublicKeys", &s.PublicKeys)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SSHGenerateKeyPairInputParameters.
+func (s SSHGenerateKeyPairInputParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "encryptionType", s.EncryptionType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SSHGenerateKeyPairInputParameters.
+func (s *SSHGenerateKeyPairInputParameters) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "encryptionType":
+ err = unpopulate(val, "EncryptionType", &s.EncryptionType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SSHPublicKey.
+func (s SSHPublicKey) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "keyData", s.KeyData)
+ populate(objectMap, "path", s.Path)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKey.
+func (s *SSHPublicKey) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "keyData":
+ err = unpopulate(val, "KeyData", &s.KeyData)
+ delete(rawMsg, key)
+ case "path":
+ err = unpopulate(val, "Path", &s.Path)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SSHPublicKeyGenerateKeyPairResult.
+func (s SSHPublicKeyGenerateKeyPairResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", s.ID)
+ populate(objectMap, "privateKey", s.PrivateKey)
+ populate(objectMap, "publicKey", s.PublicKey)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKeyGenerateKeyPairResult.
+func (s *SSHPublicKeyGenerateKeyPairResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &s.ID)
+ delete(rawMsg, key)
+ case "privateKey":
+ err = unpopulate(val, "PrivateKey", &s.PrivateKey)
+ delete(rawMsg, key)
+ case "publicKey":
+ err = unpopulate(val, "PublicKey", &s.PublicKey)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SSHPublicKeyResource.
+func (s SSHPublicKeyResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", s.ID)
+ populate(objectMap, "location", s.Location)
+ populate(objectMap, "name", s.Name)
+ populate(objectMap, "properties", s.Properties)
+ populate(objectMap, "tags", s.Tags)
+ populate(objectMap, "type", s.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKeyResource.
+func (s *SSHPublicKeyResource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &s.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &s.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &s.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &s.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &s.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &s.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SSHPublicKeyResourceProperties.
+func (s SSHPublicKeyResourceProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "publicKey", s.PublicKey)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKeyResourceProperties.
+func (s *SSHPublicKeyResourceProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "publicKey":
+ err = unpopulate(val, "PublicKey", &s.PublicKey)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SSHPublicKeyUpdateResource.
+func (s SSHPublicKeyUpdateResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "properties", s.Properties)
+ populate(objectMap, "tags", s.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKeyUpdateResource.
+func (s *SSHPublicKeyUpdateResource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "properties":
+ err = unpopulate(val, "Properties", &s.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &s.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SSHPublicKeysGroupListResult.
+func (s SSHPublicKeysGroupListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", s.NextLink)
+ populate(objectMap, "value", s.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SSHPublicKeysGroupListResult.
+func (s *SSHPublicKeysGroupListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &s.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &s.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ScaleInPolicy.
+func (s ScaleInPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "forceDeletion", s.ForceDeletion)
+ populate(objectMap, "rules", s.Rules)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleInPolicy.
+func (s *ScaleInPolicy) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "forceDeletion":
+ err = unpopulate(val, "ForceDeletion", &s.ForceDeletion)
+ delete(rawMsg, key)
+ case "rules":
+ err = unpopulate(val, "Rules", &s.Rules)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ScheduledEventsAdditionalPublishingTargets.
+func (s ScheduledEventsAdditionalPublishingTargets) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "eventGridAndResourceGraph", s.EventGridAndResourceGraph)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduledEventsAdditionalPublishingTargets.
+func (s *ScheduledEventsAdditionalPublishingTargets) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "eventGridAndResourceGraph":
+ err = unpopulate(val, "EventGridAndResourceGraph", &s.EventGridAndResourceGraph)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ScheduledEventsPolicy.
+func (s ScheduledEventsPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "scheduledEventsAdditionalPublishingTargets", s.ScheduledEventsAdditionalPublishingTargets)
+ populate(objectMap, "userInitiatedReboot", s.UserInitiatedReboot)
+ populate(objectMap, "userInitiatedRedeploy", s.UserInitiatedRedeploy)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduledEventsPolicy.
+func (s *ScheduledEventsPolicy) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "scheduledEventsAdditionalPublishingTargets":
+ err = unpopulate(val, "ScheduledEventsAdditionalPublishingTargets", &s.ScheduledEventsAdditionalPublishingTargets)
+ delete(rawMsg, key)
+ case "userInitiatedReboot":
+ err = unpopulate(val, "UserInitiatedReboot", &s.UserInitiatedReboot)
+ delete(rawMsg, key)
+ case "userInitiatedRedeploy":
+ err = unpopulate(val, "UserInitiatedRedeploy", &s.UserInitiatedRedeploy)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ScheduledEventsProfile.
+func (s ScheduledEventsProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "osImageNotificationProfile", s.OSImageNotificationProfile)
+ populate(objectMap, "terminateNotificationProfile", s.TerminateNotificationProfile)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduledEventsProfile.
+func (s *ScheduledEventsProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "osImageNotificationProfile":
+ err = unpopulate(val, "OSImageNotificationProfile", &s.OSImageNotificationProfile)
+ delete(rawMsg, key)
+ case "terminateNotificationProfile":
+ err = unpopulate(val, "TerminateNotificationProfile", &s.TerminateNotificationProfile)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SecurityPostureReference.
+func (s SecurityPostureReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "excludeExtensions", s.ExcludeExtensions)
+ populate(objectMap, "id", s.ID)
+ populate(objectMap, "isOverridable", s.IsOverridable)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPostureReference.
+func (s *SecurityPostureReference) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "excludeExtensions":
+ err = unpopulate(val, "ExcludeExtensions", &s.ExcludeExtensions)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &s.ID)
+ delete(rawMsg, key)
+ case "isOverridable":
+ err = unpopulate(val, "IsOverridable", &s.IsOverridable)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SecurityPostureReferenceUpdate.
+func (s SecurityPostureReferenceUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "excludeExtensions", s.ExcludeExtensions)
+ populate(objectMap, "id", s.ID)
+ populate(objectMap, "isOverridable", s.IsOverridable)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityPostureReferenceUpdate.
+func (s *SecurityPostureReferenceUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "excludeExtensions":
+ err = unpopulate(val, "ExcludeExtensions", &s.ExcludeExtensions)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &s.ID)
+ delete(rawMsg, key)
+ case "isOverridable":
+ err = unpopulate(val, "IsOverridable", &s.IsOverridable)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SecurityProfile.
+func (s SecurityProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "encryptionAtHost", s.EncryptionAtHost)
+ populate(objectMap, "encryptionIdentity", s.EncryptionIdentity)
+ populate(objectMap, "proxyAgentSettings", s.ProxyAgentSettings)
+ populate(objectMap, "securityType", s.SecurityType)
+ populate(objectMap, "uefiSettings", s.UefiSettings)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SecurityProfile.
+func (s *SecurityProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "encryptionAtHost":
+ err = unpopulate(val, "EncryptionAtHost", &s.EncryptionAtHost)
+ delete(rawMsg, key)
+ case "encryptionIdentity":
+ err = unpopulate(val, "EncryptionIdentity", &s.EncryptionIdentity)
+ delete(rawMsg, key)
+ case "proxyAgentSettings":
+ err = unpopulate(val, "ProxyAgentSettings", &s.ProxyAgentSettings)
+ delete(rawMsg, key)
+ case "securityType":
+ err = unpopulate(val, "SecurityType", &s.SecurityType)
+ delete(rawMsg, key)
+ case "uefiSettings":
+ err = unpopulate(val, "UefiSettings", &s.UefiSettings)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ServiceArtifactReference.
+func (s ServiceArtifactReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", s.ID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceArtifactReference.
+func (s *ServiceArtifactReference) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &s.ID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ShareInfoElement.
+func (s ShareInfoElement) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "vmUri", s.VMURI)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ShareInfoElement.
+func (s *ShareInfoElement) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "vmUri":
+ err = unpopulate(val, "VMURI", &s.VMURI)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharedGallery.
+func (s SharedGallery) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "identifier", s.Identifier)
+ populate(objectMap, "location", s.Location)
+ populate(objectMap, "name", s.Name)
+ populate(objectMap, "properties", s.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGallery.
+func (s *SharedGallery) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "identifier":
+ err = unpopulate(val, "Identifier", &s.Identifier)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &s.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &s.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &s.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharedGalleryDataDiskImage.
+func (s SharedGalleryDataDiskImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskSizeGB", s.DiskSizeGB)
+ populate(objectMap, "hostCaching", s.HostCaching)
+ populate(objectMap, "lun", s.Lun)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryDataDiskImage.
+func (s *SharedGalleryDataDiskImage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &s.DiskSizeGB)
+ delete(rawMsg, key)
+ case "hostCaching":
+ err = unpopulate(val, "HostCaching", &s.HostCaching)
+ delete(rawMsg, key)
+ case "lun":
+ err = unpopulate(val, "Lun", &s.Lun)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharedGalleryDiskImage.
+func (s SharedGalleryDiskImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskSizeGB", s.DiskSizeGB)
+ populate(objectMap, "hostCaching", s.HostCaching)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryDiskImage.
+func (s *SharedGalleryDiskImage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &s.DiskSizeGB)
+ delete(rawMsg, key)
+ case "hostCaching":
+ err = unpopulate(val, "HostCaching", &s.HostCaching)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharedGalleryIdentifier.
+func (s SharedGalleryIdentifier) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "uniqueId", s.UniqueID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryIdentifier.
+func (s *SharedGalleryIdentifier) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "uniqueId":
+ err = unpopulate(val, "UniqueID", &s.UniqueID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharedGalleryImage.
+func (s SharedGalleryImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "identifier", s.Identifier)
+ populate(objectMap, "location", s.Location)
+ populate(objectMap, "name", s.Name)
+ populate(objectMap, "properties", s.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryImage.
+func (s *SharedGalleryImage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "identifier":
+ err = unpopulate(val, "Identifier", &s.Identifier)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &s.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &s.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &s.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharedGalleryImageList.
+func (s SharedGalleryImageList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", s.NextLink)
+ populate(objectMap, "value", s.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryImageList.
+func (s *SharedGalleryImageList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &s.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &s.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharedGalleryImageProperties.
+func (s SharedGalleryImageProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "architecture", s.Architecture)
+ populate(objectMap, "artifactTags", s.ArtifactTags)
+ populate(objectMap, "disallowed", s.Disallowed)
+ populateDateTimeRFC3339(objectMap, "endOfLifeDate", s.EndOfLifeDate)
+ populate(objectMap, "eula", s.Eula)
+ populate(objectMap, "features", s.Features)
+ populate(objectMap, "hyperVGeneration", s.HyperVGeneration)
+ populate(objectMap, "identifier", s.Identifier)
+ populate(objectMap, "osState", s.OSState)
+ populate(objectMap, "osType", s.OSType)
+ populate(objectMap, "privacyStatementUri", s.PrivacyStatementURI)
+ populate(objectMap, "purchasePlan", s.PurchasePlan)
+ populate(objectMap, "recommended", s.Recommended)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryImageProperties.
+func (s *SharedGalleryImageProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "architecture":
+ err = unpopulate(val, "Architecture", &s.Architecture)
+ delete(rawMsg, key)
+ case "artifactTags":
+ err = unpopulate(val, "ArtifactTags", &s.ArtifactTags)
+ delete(rawMsg, key)
+ case "disallowed":
+ err = unpopulate(val, "Disallowed", &s.Disallowed)
+ delete(rawMsg, key)
+ case "endOfLifeDate":
+ err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &s.EndOfLifeDate)
+ delete(rawMsg, key)
+ case "eula":
+ err = unpopulate(val, "Eula", &s.Eula)
+ delete(rawMsg, key)
+ case "features":
+ err = unpopulate(val, "Features", &s.Features)
+ delete(rawMsg, key)
+ case "hyperVGeneration":
+ err = unpopulate(val, "HyperVGeneration", &s.HyperVGeneration)
+ delete(rawMsg, key)
+ case "identifier":
+ err = unpopulate(val, "Identifier", &s.Identifier)
+ delete(rawMsg, key)
+ case "osState":
+ err = unpopulate(val, "OSState", &s.OSState)
+ delete(rawMsg, key)
+ case "osType":
+ err = unpopulate(val, "OSType", &s.OSType)
+ delete(rawMsg, key)
+ case "privacyStatementUri":
+ err = unpopulate(val, "PrivacyStatementURI", &s.PrivacyStatementURI)
+ delete(rawMsg, key)
+ case "purchasePlan":
+ err = unpopulate(val, "PurchasePlan", &s.PurchasePlan)
+ delete(rawMsg, key)
+ case "recommended":
+ err = unpopulate(val, "Recommended", &s.Recommended)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharedGalleryImageVersion.
+func (s SharedGalleryImageVersion) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "identifier", s.Identifier)
+ populate(objectMap, "location", s.Location)
+ populate(objectMap, "name", s.Name)
+ populate(objectMap, "properties", s.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryImageVersion.
+func (s *SharedGalleryImageVersion) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "identifier":
+ err = unpopulate(val, "Identifier", &s.Identifier)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &s.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &s.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &s.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharedGalleryImageVersionList.
+func (s SharedGalleryImageVersionList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", s.NextLink)
+ populate(objectMap, "value", s.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryImageVersionList.
+func (s *SharedGalleryImageVersionList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &s.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &s.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharedGalleryImageVersionProperties.
+func (s SharedGalleryImageVersionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "artifactTags", s.ArtifactTags)
+ populateDateTimeRFC3339(objectMap, "endOfLifeDate", s.EndOfLifeDate)
+ populate(objectMap, "excludeFromLatest", s.ExcludeFromLatest)
+ populateDateTimeRFC3339(objectMap, "publishedDate", s.PublishedDate)
+ populate(objectMap, "storageProfile", s.StorageProfile)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryImageVersionProperties.
+func (s *SharedGalleryImageVersionProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "artifactTags":
+ err = unpopulate(val, "ArtifactTags", &s.ArtifactTags)
+ delete(rawMsg, key)
+ case "endOfLifeDate":
+ err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &s.EndOfLifeDate)
+ delete(rawMsg, key)
+ case "excludeFromLatest":
+ err = unpopulate(val, "ExcludeFromLatest", &s.ExcludeFromLatest)
+ delete(rawMsg, key)
+ case "publishedDate":
+ err = unpopulateDateTimeRFC3339(val, "PublishedDate", &s.PublishedDate)
+ delete(rawMsg, key)
+ case "storageProfile":
+ err = unpopulate(val, "StorageProfile", &s.StorageProfile)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharedGalleryImageVersionStorageProfile.
+func (s SharedGalleryImageVersionStorageProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dataDiskImages", s.DataDiskImages)
+ populate(objectMap, "osDiskImage", s.OSDiskImage)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryImageVersionStorageProfile.
+func (s *SharedGalleryImageVersionStorageProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dataDiskImages":
+ err = unpopulate(val, "DataDiskImages", &s.DataDiskImages)
+ delete(rawMsg, key)
+ case "osDiskImage":
+ err = unpopulate(val, "OSDiskImage", &s.OSDiskImage)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharedGalleryList.
+func (s SharedGalleryList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", s.NextLink)
+ populate(objectMap, "value", s.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryList.
+func (s *SharedGalleryList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &s.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &s.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharedGalleryOSDiskImage.
+func (s SharedGalleryOSDiskImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskSizeGB", s.DiskSizeGB)
+ populate(objectMap, "hostCaching", s.HostCaching)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryOSDiskImage.
+func (s *SharedGalleryOSDiskImage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &s.DiskSizeGB)
+ delete(rawMsg, key)
+ case "hostCaching":
+ err = unpopulate(val, "HostCaching", &s.HostCaching)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharedGalleryProperties.
+func (s SharedGalleryProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "artifactTags", s.ArtifactTags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharedGalleryProperties.
+func (s *SharedGalleryProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "artifactTags":
+ err = unpopulate(val, "ArtifactTags", &s.ArtifactTags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharingProfile.
+func (s SharingProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "communityGalleryInfo", s.CommunityGalleryInfo)
+ populate(objectMap, "groups", s.Groups)
+ populate(objectMap, "permissions", s.Permissions)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharingProfile.
+func (s *SharingProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "communityGalleryInfo":
+ err = unpopulate(val, "CommunityGalleryInfo", &s.CommunityGalleryInfo)
+ delete(rawMsg, key)
+ case "groups":
+ err = unpopulate(val, "Groups", &s.Groups)
+ delete(rawMsg, key)
+ case "permissions":
+ err = unpopulate(val, "Permissions", &s.Permissions)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharingProfileGroup.
+func (s SharingProfileGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "ids", s.IDs)
+ populate(objectMap, "type", s.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharingProfileGroup.
+func (s *SharingProfileGroup) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "ids":
+ err = unpopulate(val, "IDs", &s.IDs)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &s.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharingStatus.
+func (s SharingStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "aggregatedState", s.AggregatedState)
+ populate(objectMap, "summary", s.Summary)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharingStatus.
+func (s *SharingStatus) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "aggregatedState":
+ err = unpopulate(val, "AggregatedState", &s.AggregatedState)
+ delete(rawMsg, key)
+ case "summary":
+ err = unpopulate(val, "Summary", &s.Summary)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SharingUpdate.
+func (s SharingUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "groups", s.Groups)
+ populate(objectMap, "operationType", s.OperationType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SharingUpdate.
+func (s *SharingUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "groups":
+ err = unpopulate(val, "Groups", &s.Groups)
+ delete(rawMsg, key)
+ case "operationType":
+ err = unpopulate(val, "OperationType", &s.OperationType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type Snapshot.
+func (s Snapshot) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "extendedLocation", s.ExtendedLocation)
+ populate(objectMap, "id", s.ID)
+ populate(objectMap, "location", s.Location)
+ populate(objectMap, "managedBy", s.ManagedBy)
+ populate(objectMap, "name", s.Name)
+ populate(objectMap, "properties", s.Properties)
+ populate(objectMap, "sku", s.SKU)
+ populate(objectMap, "tags", s.Tags)
+ populate(objectMap, "type", s.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type Snapshot.
+func (s *Snapshot) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "extendedLocation":
+ err = unpopulate(val, "ExtendedLocation", &s.ExtendedLocation)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &s.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &s.Location)
+ delete(rawMsg, key)
+ case "managedBy":
+ err = unpopulate(val, "ManagedBy", &s.ManagedBy)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &s.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &s.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &s.SKU)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &s.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &s.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SnapshotList.
+func (s SnapshotList) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", s.NextLink)
+ populate(objectMap, "value", s.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotList.
+func (s *SnapshotList) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &s.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &s.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SnapshotProperties.
+func (s SnapshotProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "completionPercent", s.CompletionPercent)
+ populate(objectMap, "copyCompletionError", s.CopyCompletionError)
+ populate(objectMap, "creationData", s.CreationData)
+ populate(objectMap, "dataAccessAuthMode", s.DataAccessAuthMode)
+ populate(objectMap, "diskAccessId", s.DiskAccessID)
+ populate(objectMap, "diskSizeBytes", s.DiskSizeBytes)
+ populate(objectMap, "diskSizeGB", s.DiskSizeGB)
+ populate(objectMap, "diskState", s.DiskState)
+ populate(objectMap, "encryption", s.Encryption)
+ populate(objectMap, "encryptionSettingsCollection", s.EncryptionSettingsCollection)
+ populate(objectMap, "hyperVGeneration", s.HyperVGeneration)
+ populate(objectMap, "incremental", s.Incremental)
+ populate(objectMap, "incrementalSnapshotFamilyId", s.IncrementalSnapshotFamilyID)
+ populate(objectMap, "networkAccessPolicy", s.NetworkAccessPolicy)
+ populate(objectMap, "osType", s.OSType)
+ populate(objectMap, "provisioningState", s.ProvisioningState)
+ populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess)
+ populate(objectMap, "purchasePlan", s.PurchasePlan)
+ populate(objectMap, "securityProfile", s.SecurityProfile)
+ populate(objectMap, "supportedCapabilities", s.SupportedCapabilities)
+ populate(objectMap, "supportsHibernation", s.SupportsHibernation)
+ populateDateTimeRFC3339(objectMap, "timeCreated", s.TimeCreated)
+ populate(objectMap, "uniqueId", s.UniqueID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotProperties.
+func (s *SnapshotProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "completionPercent":
+ err = unpopulate(val, "CompletionPercent", &s.CompletionPercent)
+ delete(rawMsg, key)
+ case "copyCompletionError":
+ err = unpopulate(val, "CopyCompletionError", &s.CopyCompletionError)
+ delete(rawMsg, key)
+ case "creationData":
+ err = unpopulate(val, "CreationData", &s.CreationData)
+ delete(rawMsg, key)
+ case "dataAccessAuthMode":
+ err = unpopulate(val, "DataAccessAuthMode", &s.DataAccessAuthMode)
+ delete(rawMsg, key)
+ case "diskAccessId":
+ err = unpopulate(val, "DiskAccessID", &s.DiskAccessID)
+ delete(rawMsg, key)
+ case "diskSizeBytes":
+ err = unpopulate(val, "DiskSizeBytes", &s.DiskSizeBytes)
+ delete(rawMsg, key)
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &s.DiskSizeGB)
+ delete(rawMsg, key)
+ case "diskState":
+ err = unpopulate(val, "DiskState", &s.DiskState)
+ delete(rawMsg, key)
+ case "encryption":
+ err = unpopulate(val, "Encryption", &s.Encryption)
+ delete(rawMsg, key)
+ case "encryptionSettingsCollection":
+ err = unpopulate(val, "EncryptionSettingsCollection", &s.EncryptionSettingsCollection)
+ delete(rawMsg, key)
+ case "hyperVGeneration":
+ err = unpopulate(val, "HyperVGeneration", &s.HyperVGeneration)
+ delete(rawMsg, key)
+ case "incremental":
+ err = unpopulate(val, "Incremental", &s.Incremental)
+ delete(rawMsg, key)
+ case "incrementalSnapshotFamilyId":
+ err = unpopulate(val, "IncrementalSnapshotFamilyID", &s.IncrementalSnapshotFamilyID)
+ delete(rawMsg, key)
+ case "networkAccessPolicy":
+ err = unpopulate(val, "NetworkAccessPolicy", &s.NetworkAccessPolicy)
+ delete(rawMsg, key)
+ case "osType":
+ err = unpopulate(val, "OSType", &s.OSType)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &s.ProvisioningState)
+ delete(rawMsg, key)
+ case "publicNetworkAccess":
+ err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess)
+ delete(rawMsg, key)
+ case "purchasePlan":
+ err = unpopulate(val, "PurchasePlan", &s.PurchasePlan)
+ delete(rawMsg, key)
+ case "securityProfile":
+ err = unpopulate(val, "SecurityProfile", &s.SecurityProfile)
+ delete(rawMsg, key)
+ case "supportedCapabilities":
+ err = unpopulate(val, "SupportedCapabilities", &s.SupportedCapabilities)
+ delete(rawMsg, key)
+ case "supportsHibernation":
+ err = unpopulate(val, "SupportsHibernation", &s.SupportsHibernation)
+ delete(rawMsg, key)
+ case "timeCreated":
+ err = unpopulateDateTimeRFC3339(val, "TimeCreated", &s.TimeCreated)
+ delete(rawMsg, key)
+ case "uniqueId":
+ err = unpopulate(val, "UniqueID", &s.UniqueID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SnapshotSKU.
+func (s SnapshotSKU) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", s.Name)
+ populate(objectMap, "tier", s.Tier)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotSKU.
+func (s *SnapshotSKU) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &s.Name)
+ delete(rawMsg, key)
+ case "tier":
+ err = unpopulate(val, "Tier", &s.Tier)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SnapshotUpdate.
+func (s SnapshotUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "properties", s.Properties)
+ populate(objectMap, "sku", s.SKU)
+ populate(objectMap, "tags", s.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotUpdate.
+func (s *SnapshotUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "properties":
+ err = unpopulate(val, "Properties", &s.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &s.SKU)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &s.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SnapshotUpdateProperties.
+func (s SnapshotUpdateProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dataAccessAuthMode", s.DataAccessAuthMode)
+ populate(objectMap, "diskAccessId", s.DiskAccessID)
+ populate(objectMap, "diskSizeGB", s.DiskSizeGB)
+ populate(objectMap, "encryption", s.Encryption)
+ populate(objectMap, "encryptionSettingsCollection", s.EncryptionSettingsCollection)
+ populate(objectMap, "networkAccessPolicy", s.NetworkAccessPolicy)
+ populate(objectMap, "osType", s.OSType)
+ populate(objectMap, "publicNetworkAccess", s.PublicNetworkAccess)
+ populate(objectMap, "supportedCapabilities", s.SupportedCapabilities)
+ populate(objectMap, "supportsHibernation", s.SupportsHibernation)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SnapshotUpdateProperties.
+func (s *SnapshotUpdateProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dataAccessAuthMode":
+ err = unpopulate(val, "DataAccessAuthMode", &s.DataAccessAuthMode)
+ delete(rawMsg, key)
+ case "diskAccessId":
+ err = unpopulate(val, "DiskAccessID", &s.DiskAccessID)
+ delete(rawMsg, key)
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &s.DiskSizeGB)
+ delete(rawMsg, key)
+ case "encryption":
+ err = unpopulate(val, "Encryption", &s.Encryption)
+ delete(rawMsg, key)
+ case "encryptionSettingsCollection":
+ err = unpopulate(val, "EncryptionSettingsCollection", &s.EncryptionSettingsCollection)
+ delete(rawMsg, key)
+ case "networkAccessPolicy":
+ err = unpopulate(val, "NetworkAccessPolicy", &s.NetworkAccessPolicy)
+ delete(rawMsg, key)
+ case "osType":
+ err = unpopulate(val, "OSType", &s.OSType)
+ delete(rawMsg, key)
+ case "publicNetworkAccess":
+ err = unpopulate(val, "PublicNetworkAccess", &s.PublicNetworkAccess)
+ delete(rawMsg, key)
+ case "supportedCapabilities":
+ err = unpopulate(val, "SupportedCapabilities", &s.SupportedCapabilities)
+ delete(rawMsg, key)
+ case "supportsHibernation":
+ err = unpopulate(val, "SupportsHibernation", &s.SupportsHibernation)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SoftDeletePolicy.
+func (s SoftDeletePolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "isSoftDeleteEnabled", s.IsSoftDeleteEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SoftDeletePolicy.
+func (s *SoftDeletePolicy) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "isSoftDeleteEnabled":
+ err = unpopulate(val, "IsSoftDeleteEnabled", &s.IsSoftDeleteEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SourceVault.
+func (s SourceVault) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", s.ID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SourceVault.
+func (s *SourceVault) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &s.ID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SpotRestorePolicy.
+func (s SpotRestorePolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "enabled", s.Enabled)
+ populate(objectMap, "restoreTimeout", s.RestoreTimeout)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SpotRestorePolicy.
+func (s *SpotRestorePolicy) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "enabled":
+ err = unpopulate(val, "Enabled", &s.Enabled)
+ delete(rawMsg, key)
+ case "restoreTimeout":
+ err = unpopulate(val, "RestoreTimeout", &s.RestoreTimeout)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type StatusCodeCount.
+func (s StatusCodeCount) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "code", s.Code)
+ populate(objectMap, "count", s.Count)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type StatusCodeCount.
+func (s *StatusCodeCount) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "code":
+ err = unpopulate(val, "Code", &s.Code)
+ delete(rawMsg, key)
+ case "count":
+ err = unpopulate(val, "Count", &s.Count)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type StorageProfile.
+func (s StorageProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dataDisks", s.DataDisks)
+ populate(objectMap, "diskControllerType", s.DiskControllerType)
+ populate(objectMap, "imageReference", s.ImageReference)
+ populate(objectMap, "osDisk", s.OSDisk)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfile.
+func (s *StorageProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dataDisks":
+ err = unpopulate(val, "DataDisks", &s.DataDisks)
+ delete(rawMsg, key)
+ case "diskControllerType":
+ err = unpopulate(val, "DiskControllerType", &s.DiskControllerType)
+ delete(rawMsg, key)
+ case "imageReference":
+ err = unpopulate(val, "ImageReference", &s.ImageReference)
+ delete(rawMsg, key)
+ case "osDisk":
+ err = unpopulate(val, "OSDisk", &s.OSDisk)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SubResource.
+func (s SubResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", s.ID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SubResource.
+func (s *SubResource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &s.ID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SubResourceReadOnly.
+func (s SubResourceReadOnly) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", s.ID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SubResourceReadOnly.
+func (s *SubResourceReadOnly) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &s.ID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SubResourceWithColocationStatus.
+func (s SubResourceWithColocationStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "colocationStatus", s.ColocationStatus)
+ populate(objectMap, "id", s.ID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SubResourceWithColocationStatus.
+func (s *SubResourceWithColocationStatus) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "colocationStatus":
+ err = unpopulate(val, "ColocationStatus", &s.ColocationStatus)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &s.ID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SupportedCapabilities.
+func (s SupportedCapabilities) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "acceleratedNetwork", s.AcceleratedNetwork)
+ populate(objectMap, "architecture", s.Architecture)
+ populate(objectMap, "diskControllerTypes", s.DiskControllerTypes)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SupportedCapabilities.
+func (s *SupportedCapabilities) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "acceleratedNetwork":
+ err = unpopulate(val, "AcceleratedNetwork", &s.AcceleratedNetwork)
+ delete(rawMsg, key)
+ case "architecture":
+ err = unpopulate(val, "Architecture", &s.Architecture)
+ delete(rawMsg, key)
+ case "diskControllerTypes":
+ err = unpopulate(val, "DiskControllerTypes", &s.DiskControllerTypes)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type SystemData.
+func (s SystemData) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populateDateTimeRFC3339(objectMap, "createdAt", s.CreatedAt)
+ populateDateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
+func (s *SystemData) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "createdAt":
+ err = unpopulateDateTimeRFC3339(val, "CreatedAt", &s.CreatedAt)
+ delete(rawMsg, key)
+ case "lastModifiedAt":
+ err = unpopulateDateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", s, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type TargetRegion.
+func (t TargetRegion) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "encryption", t.Encryption)
+ populate(objectMap, "excludeFromLatest", t.ExcludeFromLatest)
+ populate(objectMap, "name", t.Name)
+ populate(objectMap, "regionalReplicaCount", t.RegionalReplicaCount)
+ populate(objectMap, "storageAccountType", t.StorageAccountType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type TargetRegion.
+func (t *TargetRegion) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", t, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "encryption":
+ err = unpopulate(val, "Encryption", &t.Encryption)
+ delete(rawMsg, key)
+ case "excludeFromLatest":
+ err = unpopulate(val, "ExcludeFromLatest", &t.ExcludeFromLatest)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &t.Name)
+ delete(rawMsg, key)
+ case "regionalReplicaCount":
+ err = unpopulate(val, "RegionalReplicaCount", &t.RegionalReplicaCount)
+ delete(rawMsg, key)
+ case "storageAccountType":
+ err = unpopulate(val, "StorageAccountType", &t.StorageAccountType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", t, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type TerminateNotificationProfile.
+func (t TerminateNotificationProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "enable", t.Enable)
+ populate(objectMap, "notBeforeTimeout", t.NotBeforeTimeout)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type TerminateNotificationProfile.
+func (t *TerminateNotificationProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", t, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "enable":
+ err = unpopulate(val, "Enable", &t.Enable)
+ delete(rawMsg, key)
+ case "notBeforeTimeout":
+ err = unpopulate(val, "NotBeforeTimeout", &t.NotBeforeTimeout)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", t, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type ThrottledRequestsInput.
+func (t ThrottledRequestsInput) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "blobContainerSasUri", t.BlobContainerSasURI)
+ populateDateTimeRFC3339(objectMap, "fromTime", t.FromTime)
+ populate(objectMap, "groupByClientApplicationId", t.GroupByClientApplicationID)
+ populate(objectMap, "groupByOperationName", t.GroupByOperationName)
+ populate(objectMap, "groupByResourceName", t.GroupByResourceName)
+ populate(objectMap, "groupByThrottlePolicy", t.GroupByThrottlePolicy)
+ populate(objectMap, "groupByUserAgent", t.GroupByUserAgent)
+ populateDateTimeRFC3339(objectMap, "toTime", t.ToTime)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type ThrottledRequestsInput.
+func (t *ThrottledRequestsInput) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", t, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "blobContainerSasUri":
+ err = unpopulate(val, "BlobContainerSasURI", &t.BlobContainerSasURI)
+ delete(rawMsg, key)
+ case "fromTime":
+ err = unpopulateDateTimeRFC3339(val, "FromTime", &t.FromTime)
+ delete(rawMsg, key)
+ case "groupByClientApplicationId":
+ err = unpopulate(val, "GroupByClientApplicationID", &t.GroupByClientApplicationID)
+ delete(rawMsg, key)
+ case "groupByOperationName":
+ err = unpopulate(val, "GroupByOperationName", &t.GroupByOperationName)
+ delete(rawMsg, key)
+ case "groupByResourceName":
+ err = unpopulate(val, "GroupByResourceName", &t.GroupByResourceName)
+ delete(rawMsg, key)
+ case "groupByThrottlePolicy":
+ err = unpopulate(val, "GroupByThrottlePolicy", &t.GroupByThrottlePolicy)
+ delete(rawMsg, key)
+ case "groupByUserAgent":
+ err = unpopulate(val, "GroupByUserAgent", &t.GroupByUserAgent)
+ delete(rawMsg, key)
+ case "toTime":
+ err = unpopulateDateTimeRFC3339(val, "ToTime", &t.ToTime)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", t, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UefiKey.
+func (u UefiKey) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "type", u.Type)
+ populate(objectMap, "value", u.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UefiKey.
+func (u *UefiKey) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "type":
+ err = unpopulate(val, "Type", &u.Type)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &u.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UefiKeySignatures.
+func (u UefiKeySignatures) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "db", u.Db)
+ populate(objectMap, "dbx", u.Dbx)
+ populate(objectMap, "kek", u.Kek)
+ populate(objectMap, "pk", u.Pk)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UefiKeySignatures.
+func (u *UefiKeySignatures) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "db":
+ err = unpopulate(val, "Db", &u.Db)
+ delete(rawMsg, key)
+ case "dbx":
+ err = unpopulate(val, "Dbx", &u.Dbx)
+ delete(rawMsg, key)
+ case "kek":
+ err = unpopulate(val, "Kek", &u.Kek)
+ delete(rawMsg, key)
+ case "pk":
+ err = unpopulate(val, "Pk", &u.Pk)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UefiSettings.
+func (u UefiSettings) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "secureBootEnabled", u.SecureBootEnabled)
+ populate(objectMap, "vTpmEnabled", u.VTpmEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UefiSettings.
+func (u *UefiSettings) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "secureBootEnabled":
+ err = unpopulate(val, "SecureBootEnabled", &u.SecureBootEnabled)
+ delete(rawMsg, key)
+ case "vTpmEnabled":
+ err = unpopulate(val, "VTpmEnabled", &u.VTpmEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UpdateDomain.
+func (u UpdateDomain) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", u.ID)
+ populate(objectMap, "name", u.Name)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateDomain.
+func (u *UpdateDomain) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &u.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &u.Name)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UpdateDomainListResult.
+func (u UpdateDomainListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", u.NextLink)
+ populate(objectMap, "value", u.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateDomainListResult.
+func (u *UpdateDomainListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &u.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &u.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UpdateResource.
+func (u UpdateResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "tags", u.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateResource.
+func (u *UpdateResource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "tags":
+ err = unpopulate(val, "Tags", &u.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UpdateResourceDefinition.
+func (u UpdateResourceDefinition) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", u.ID)
+ populate(objectMap, "name", u.Name)
+ populate(objectMap, "tags", u.Tags)
+ populate(objectMap, "type", u.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateResourceDefinition.
+func (u *UpdateResourceDefinition) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &u.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &u.Name)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &u.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &u.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UpgradeOperationHistoricalStatusInfo.
+func (u UpgradeOperationHistoricalStatusInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "location", u.Location)
+ populate(objectMap, "properties", u.Properties)
+ populate(objectMap, "type", u.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UpgradeOperationHistoricalStatusInfo.
+func (u *UpgradeOperationHistoricalStatusInfo) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "location":
+ err = unpopulate(val, "Location", &u.Location)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &u.Properties)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &u.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UpgradeOperationHistoricalStatusInfoProperties.
+func (u UpgradeOperationHistoricalStatusInfoProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "error", u.Error)
+ populate(objectMap, "progress", u.Progress)
+ populate(objectMap, "rollbackInfo", u.RollbackInfo)
+ populate(objectMap, "runningStatus", u.RunningStatus)
+ populate(objectMap, "startedBy", u.StartedBy)
+ populate(objectMap, "targetImageReference", u.TargetImageReference)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UpgradeOperationHistoricalStatusInfoProperties.
+func (u *UpgradeOperationHistoricalStatusInfoProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "error":
+ err = unpopulate(val, "Error", &u.Error)
+ delete(rawMsg, key)
+ case "progress":
+ err = unpopulate(val, "Progress", &u.Progress)
+ delete(rawMsg, key)
+ case "rollbackInfo":
+ err = unpopulate(val, "RollbackInfo", &u.RollbackInfo)
+ delete(rawMsg, key)
+ case "runningStatus":
+ err = unpopulate(val, "RunningStatus", &u.RunningStatus)
+ delete(rawMsg, key)
+ case "startedBy":
+ err = unpopulate(val, "StartedBy", &u.StartedBy)
+ delete(rawMsg, key)
+ case "targetImageReference":
+ err = unpopulate(val, "TargetImageReference", &u.TargetImageReference)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UpgradeOperationHistoryStatus.
+func (u UpgradeOperationHistoryStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "code", u.Code)
+ populateDateTimeRFC3339(objectMap, "endTime", u.EndTime)
+ populateDateTimeRFC3339(objectMap, "startTime", u.StartTime)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UpgradeOperationHistoryStatus.
+func (u *UpgradeOperationHistoryStatus) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "code":
+ err = unpopulate(val, "Code", &u.Code)
+ delete(rawMsg, key)
+ case "endTime":
+ err = unpopulateDateTimeRFC3339(val, "EndTime", &u.EndTime)
+ delete(rawMsg, key)
+ case "startTime":
+ err = unpopulateDateTimeRFC3339(val, "StartTime", &u.StartTime)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UpgradePolicy.
+func (u UpgradePolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "automaticOSUpgradePolicy", u.AutomaticOSUpgradePolicy)
+ populate(objectMap, "mode", u.Mode)
+ populate(objectMap, "rollingUpgradePolicy", u.RollingUpgradePolicy)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UpgradePolicy.
+func (u *UpgradePolicy) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "automaticOSUpgradePolicy":
+ err = unpopulate(val, "AutomaticOSUpgradePolicy", &u.AutomaticOSUpgradePolicy)
+ delete(rawMsg, key)
+ case "mode":
+ err = unpopulate(val, "Mode", &u.Mode)
+ delete(rawMsg, key)
+ case "rollingUpgradePolicy":
+ err = unpopulate(val, "RollingUpgradePolicy", &u.RollingUpgradePolicy)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type Usage.
+func (u Usage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "currentValue", u.CurrentValue)
+ populate(objectMap, "limit", u.Limit)
+ populate(objectMap, "name", u.Name)
+ objectMap["unit"] = "Count"
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type Usage.
+func (u *Usage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "currentValue":
+ err = unpopulate(val, "CurrentValue", &u.CurrentValue)
+ delete(rawMsg, key)
+ case "limit":
+ err = unpopulate(val, "Limit", &u.Limit)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &u.Name)
+ delete(rawMsg, key)
+ case "unit":
+ err = unpopulate(val, "Unit", &u.Unit)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UsageName.
+func (u UsageName) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "localizedValue", u.LocalizedValue)
+ populate(objectMap, "value", u.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UsageName.
+func (u *UsageName) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "localizedValue":
+ err = unpopulate(val, "LocalizedValue", &u.LocalizedValue)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &u.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UserArtifactManage.
+func (u UserArtifactManage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "install", u.Install)
+ populate(objectMap, "remove", u.Remove)
+ populate(objectMap, "update", u.Update)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UserArtifactManage.
+func (u *UserArtifactManage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "install":
+ err = unpopulate(val, "Install", &u.Install)
+ delete(rawMsg, key)
+ case "remove":
+ err = unpopulate(val, "Remove", &u.Remove)
+ delete(rawMsg, key)
+ case "update":
+ err = unpopulate(val, "Update", &u.Update)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UserArtifactSettings.
+func (u UserArtifactSettings) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "configFileName", u.ConfigFileName)
+ populate(objectMap, "packageFileName", u.PackageFileName)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UserArtifactSettings.
+func (u *UserArtifactSettings) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "configFileName":
+ err = unpopulate(val, "ConfigFileName", &u.ConfigFileName)
+ delete(rawMsg, key)
+ case "packageFileName":
+ err = unpopulate(val, "PackageFileName", &u.PackageFileName)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UserArtifactSource.
+func (u UserArtifactSource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "defaultConfigurationLink", u.DefaultConfigurationLink)
+ populate(objectMap, "mediaLink", u.MediaLink)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UserArtifactSource.
+func (u *UserArtifactSource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "defaultConfigurationLink":
+ err = unpopulate(val, "DefaultConfigurationLink", &u.DefaultConfigurationLink)
+ delete(rawMsg, key)
+ case "mediaLink":
+ err = unpopulate(val, "MediaLink", &u.MediaLink)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentitiesValue.
+func (u UserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "clientId", u.ClientID)
+ populate(objectMap, "principalId", u.PrincipalID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentitiesValue.
+func (u *UserAssignedIdentitiesValue) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "clientId":
+ err = unpopulate(val, "ClientID", &u.ClientID)
+ delete(rawMsg, key)
+ case "principalId":
+ err = unpopulate(val, "PrincipalID", &u.PrincipalID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UserInitiatedReboot.
+func (u UserInitiatedReboot) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "automaticallyApprove", u.AutomaticallyApprove)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UserInitiatedReboot.
+func (u *UserInitiatedReboot) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "automaticallyApprove":
+ err = unpopulate(val, "AutomaticallyApprove", &u.AutomaticallyApprove)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type UserInitiatedRedeploy.
+func (u UserInitiatedRedeploy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "automaticallyApprove", u.AutomaticallyApprove)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type UserInitiatedRedeploy.
+func (u *UserInitiatedRedeploy) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "automaticallyApprove":
+ err = unpopulate(val, "AutomaticallyApprove", &u.AutomaticallyApprove)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", u, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VMDiskSecurityProfile.
+func (v VMDiskSecurityProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskEncryptionSet", v.DiskEncryptionSet)
+ populate(objectMap, "securityEncryptionType", v.SecurityEncryptionType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VMDiskSecurityProfile.
+func (v *VMDiskSecurityProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskEncryptionSet":
+ err = unpopulate(val, "DiskEncryptionSet", &v.DiskEncryptionSet)
+ delete(rawMsg, key)
+ case "securityEncryptionType":
+ err = unpopulate(val, "SecurityEncryptionType", &v.SecurityEncryptionType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VMGalleryApplication.
+func (v VMGalleryApplication) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "configurationReference", v.ConfigurationReference)
+ populate(objectMap, "enableAutomaticUpgrade", v.EnableAutomaticUpgrade)
+ populate(objectMap, "order", v.Order)
+ populate(objectMap, "packageReferenceId", v.PackageReferenceID)
+ populate(objectMap, "tags", v.Tags)
+ populate(objectMap, "treatFailureAsDeploymentFailure", v.TreatFailureAsDeploymentFailure)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VMGalleryApplication.
+func (v *VMGalleryApplication) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "configurationReference":
+ err = unpopulate(val, "ConfigurationReference", &v.ConfigurationReference)
+ delete(rawMsg, key)
+ case "enableAutomaticUpgrade":
+ err = unpopulate(val, "EnableAutomaticUpgrade", &v.EnableAutomaticUpgrade)
+ delete(rawMsg, key)
+ case "order":
+ err = unpopulate(val, "Order", &v.Order)
+ delete(rawMsg, key)
+ case "packageReferenceId":
+ err = unpopulate(val, "PackageReferenceID", &v.PackageReferenceID)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &v.Tags)
+ delete(rawMsg, key)
+ case "treatFailureAsDeploymentFailure":
+ err = unpopulate(val, "TreatFailureAsDeploymentFailure", &v.TreatFailureAsDeploymentFailure)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VMImagesInEdgeZoneListResult.
+func (v VMImagesInEdgeZoneListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", v.NextLink)
+ populate(objectMap, "value", v.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VMImagesInEdgeZoneListResult.
+func (v *VMImagesInEdgeZoneListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &v.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &v.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VMScaleSetConvertToSinglePlacementGroupInput.
+func (v VMScaleSetConvertToSinglePlacementGroupInput) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "activePlacementGroupId", v.ActivePlacementGroupID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VMScaleSetConvertToSinglePlacementGroupInput.
+func (v *VMScaleSetConvertToSinglePlacementGroupInput) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "activePlacementGroupId":
+ err = unpopulate(val, "ActivePlacementGroupID", &v.ActivePlacementGroupID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VMSizeProperties.
+func (v VMSizeProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "vCPUsAvailable", v.VCPUsAvailable)
+ populate(objectMap, "vCPUsPerCore", v.VCPUsPerCore)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VMSizeProperties.
+func (v *VMSizeProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "vCPUsAvailable":
+ err = unpopulate(val, "VCPUsAvailable", &v.VCPUsAvailable)
+ delete(rawMsg, key)
+ case "vCPUsPerCore":
+ err = unpopulate(val, "VCPUsPerCore", &v.VCPUsPerCore)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VaultCertificate.
+func (v VaultCertificate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "certificateStore", v.CertificateStore)
+ populate(objectMap, "certificateUrl", v.CertificateURL)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VaultCertificate.
+func (v *VaultCertificate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "certificateStore":
+ err = unpopulate(val, "CertificateStore", &v.CertificateStore)
+ delete(rawMsg, key)
+ case "certificateUrl":
+ err = unpopulate(val, "CertificateURL", &v.CertificateURL)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VaultSecretGroup.
+func (v VaultSecretGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "sourceVault", v.SourceVault)
+ populate(objectMap, "vaultCertificates", v.VaultCertificates)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VaultSecretGroup.
+func (v *VaultSecretGroup) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "sourceVault":
+ err = unpopulate(val, "SourceVault", &v.SourceVault)
+ delete(rawMsg, key)
+ case "vaultCertificates":
+ err = unpopulate(val, "VaultCertificates", &v.VaultCertificates)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualHardDisk.
+func (v VirtualHardDisk) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "uri", v.URI)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualHardDisk.
+func (v *VirtualHardDisk) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "uri":
+ err = unpopulate(val, "URI", &v.URI)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachine.
+func (v VirtualMachine) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "etag", v.Etag)
+ populate(objectMap, "extendedLocation", v.ExtendedLocation)
+ populate(objectMap, "id", v.ID)
+ populate(objectMap, "identity", v.Identity)
+ populate(objectMap, "location", v.Location)
+ populate(objectMap, "managedBy", v.ManagedBy)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "plan", v.Plan)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "resources", v.Resources)
+ populate(objectMap, "tags", v.Tags)
+ populate(objectMap, "type", v.Type)
+ populate(objectMap, "zones", v.Zones)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachine.
+func (v *VirtualMachine) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "etag":
+ err = unpopulate(val, "Etag", &v.Etag)
+ delete(rawMsg, key)
+ case "extendedLocation":
+ err = unpopulate(val, "ExtendedLocation", &v.ExtendedLocation)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &v.ID)
+ delete(rawMsg, key)
+ case "identity":
+ err = unpopulate(val, "Identity", &v.Identity)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &v.Location)
+ delete(rawMsg, key)
+ case "managedBy":
+ err = unpopulate(val, "ManagedBy", &v.ManagedBy)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "plan":
+ err = unpopulate(val, "Plan", &v.Plan)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "resources":
+ err = unpopulate(val, "Resources", &v.Resources)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &v.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ case "zones":
+ err = unpopulate(val, "Zones", &v.Zones)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineAgentInstanceView.
+func (v VirtualMachineAgentInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "extensionHandlers", v.ExtensionHandlers)
+ populate(objectMap, "statuses", v.Statuses)
+ populate(objectMap, "vmAgentVersion", v.VMAgentVersion)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineAgentInstanceView.
+func (v *VirtualMachineAgentInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "extensionHandlers":
+ err = unpopulate(val, "ExtensionHandlers", &v.ExtensionHandlers)
+ delete(rawMsg, key)
+ case "statuses":
+ err = unpopulate(val, "Statuses", &v.Statuses)
+ delete(rawMsg, key)
+ case "vmAgentVersion":
+ err = unpopulate(val, "VMAgentVersion", &v.VMAgentVersion)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineAssessPatchesResult.
+func (v VirtualMachineAssessPatchesResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "assessmentActivityId", v.AssessmentActivityID)
+ populate(objectMap, "availablePatches", v.AvailablePatches)
+ populate(objectMap, "criticalAndSecurityPatchCount", v.CriticalAndSecurityPatchCount)
+ populate(objectMap, "error", v.Error)
+ populate(objectMap, "otherPatchCount", v.OtherPatchCount)
+ populate(objectMap, "rebootPending", v.RebootPending)
+ populateDateTimeRFC3339(objectMap, "startDateTime", v.StartDateTime)
+ populate(objectMap, "status", v.Status)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineAssessPatchesResult.
+func (v *VirtualMachineAssessPatchesResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "assessmentActivityId":
+ err = unpopulate(val, "AssessmentActivityID", &v.AssessmentActivityID)
+ delete(rawMsg, key)
+ case "availablePatches":
+ err = unpopulate(val, "AvailablePatches", &v.AvailablePatches)
+ delete(rawMsg, key)
+ case "criticalAndSecurityPatchCount":
+ err = unpopulate(val, "CriticalAndSecurityPatchCount", &v.CriticalAndSecurityPatchCount)
+ delete(rawMsg, key)
+ case "error":
+ err = unpopulate(val, "Error", &v.Error)
+ delete(rawMsg, key)
+ case "otherPatchCount":
+ err = unpopulate(val, "OtherPatchCount", &v.OtherPatchCount)
+ delete(rawMsg, key)
+ case "rebootPending":
+ err = unpopulate(val, "RebootPending", &v.RebootPending)
+ delete(rawMsg, key)
+ case "startDateTime":
+ err = unpopulateDateTimeRFC3339(val, "StartDateTime", &v.StartDateTime)
+ delete(rawMsg, key)
+ case "status":
+ err = unpopulate(val, "Status", &v.Status)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineCaptureParameters.
+func (v VirtualMachineCaptureParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "destinationContainerName", v.DestinationContainerName)
+ populate(objectMap, "overwriteVhds", v.OverwriteVhds)
+ populate(objectMap, "vhdPrefix", v.VhdPrefix)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineCaptureParameters.
+func (v *VirtualMachineCaptureParameters) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "destinationContainerName":
+ err = unpopulate(val, "DestinationContainerName", &v.DestinationContainerName)
+ delete(rawMsg, key)
+ case "overwriteVhds":
+ err = unpopulate(val, "OverwriteVhds", &v.OverwriteVhds)
+ delete(rawMsg, key)
+ case "vhdPrefix":
+ err = unpopulate(val, "VhdPrefix", &v.VhdPrefix)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineCaptureResult.
+func (v VirtualMachineCaptureResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "contentVersion", v.ContentVersion)
+ populate(objectMap, "id", v.ID)
+ populateAny(objectMap, "parameters", v.Parameters)
+ populate(objectMap, "resources", v.Resources)
+ populate(objectMap, "$schema", v.Schema)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineCaptureResult.
+func (v *VirtualMachineCaptureResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "contentVersion":
+ err = unpopulate(val, "ContentVersion", &v.ContentVersion)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &v.ID)
+ delete(rawMsg, key)
+ case "parameters":
+ err = unpopulate(val, "Parameters", &v.Parameters)
+ delete(rawMsg, key)
+ case "resources":
+ err = unpopulate(val, "Resources", &v.Resources)
+ delete(rawMsg, key)
+ case "$schema":
+ err = unpopulate(val, "Schema", &v.Schema)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtension.
+func (v VirtualMachineExtension) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", v.ID)
+ populate(objectMap, "location", v.Location)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "tags", v.Tags)
+ populate(objectMap, "type", v.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineExtension.
+func (v *VirtualMachineExtension) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &v.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &v.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &v.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionHandlerInstanceView.
+func (v VirtualMachineExtensionHandlerInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "status", v.Status)
+ populate(objectMap, "type", v.Type)
+ populate(objectMap, "typeHandlerVersion", v.TypeHandlerVersion)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineExtensionHandlerInstanceView.
+func (v *VirtualMachineExtensionHandlerInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "status":
+ err = unpopulate(val, "Status", &v.Status)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ case "typeHandlerVersion":
+ err = unpopulate(val, "TypeHandlerVersion", &v.TypeHandlerVersion)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionImage.
+func (v VirtualMachineExtensionImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", v.ID)
+ populate(objectMap, "location", v.Location)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "tags", v.Tags)
+ populate(objectMap, "type", v.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineExtensionImage.
+func (v *VirtualMachineExtensionImage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &v.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &v.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &v.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionImageProperties.
+func (v VirtualMachineExtensionImageProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "computeRole", v.ComputeRole)
+ populate(objectMap, "handlerSchema", v.HandlerSchema)
+ populate(objectMap, "operatingSystem", v.OperatingSystem)
+ populate(objectMap, "supportsMultipleExtensions", v.SupportsMultipleExtensions)
+ populate(objectMap, "vmScaleSetEnabled", v.VMScaleSetEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineExtensionImageProperties.
+func (v *VirtualMachineExtensionImageProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "computeRole":
+ err = unpopulate(val, "ComputeRole", &v.ComputeRole)
+ delete(rawMsg, key)
+ case "handlerSchema":
+ err = unpopulate(val, "HandlerSchema", &v.HandlerSchema)
+ delete(rawMsg, key)
+ case "operatingSystem":
+ err = unpopulate(val, "OperatingSystem", &v.OperatingSystem)
+ delete(rawMsg, key)
+ case "supportsMultipleExtensions":
+ err = unpopulate(val, "SupportsMultipleExtensions", &v.SupportsMultipleExtensions)
+ delete(rawMsg, key)
+ case "vmScaleSetEnabled":
+ err = unpopulate(val, "VMScaleSetEnabled", &v.VMScaleSetEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionInstanceView.
+func (v VirtualMachineExtensionInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "statuses", v.Statuses)
+ populate(objectMap, "substatuses", v.Substatuses)
+ populate(objectMap, "type", v.Type)
+ populate(objectMap, "typeHandlerVersion", v.TypeHandlerVersion)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineExtensionInstanceView.
+func (v *VirtualMachineExtensionInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "statuses":
+ err = unpopulate(val, "Statuses", &v.Statuses)
+ delete(rawMsg, key)
+ case "substatuses":
+ err = unpopulate(val, "Substatuses", &v.Substatuses)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ case "typeHandlerVersion":
+ err = unpopulate(val, "TypeHandlerVersion", &v.TypeHandlerVersion)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionProperties.
+func (v VirtualMachineExtensionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "autoUpgradeMinorVersion", v.AutoUpgradeMinorVersion)
+ populate(objectMap, "enableAutomaticUpgrade", v.EnableAutomaticUpgrade)
+ populate(objectMap, "forceUpdateTag", v.ForceUpdateTag)
+ populate(objectMap, "instanceView", v.InstanceView)
+ populateAny(objectMap, "protectedSettings", v.ProtectedSettings)
+ populate(objectMap, "protectedSettingsFromKeyVault", v.ProtectedSettingsFromKeyVault)
+ populate(objectMap, "provisionAfterExtensions", v.ProvisionAfterExtensions)
+ populate(objectMap, "provisioningState", v.ProvisioningState)
+ populate(objectMap, "publisher", v.Publisher)
+ populateAny(objectMap, "settings", v.Settings)
+ populate(objectMap, "suppressFailures", v.SuppressFailures)
+ populate(objectMap, "type", v.Type)
+ populate(objectMap, "typeHandlerVersion", v.TypeHandlerVersion)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineExtensionProperties.
+func (v *VirtualMachineExtensionProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "autoUpgradeMinorVersion":
+ err = unpopulate(val, "AutoUpgradeMinorVersion", &v.AutoUpgradeMinorVersion)
+ delete(rawMsg, key)
+ case "enableAutomaticUpgrade":
+ err = unpopulate(val, "EnableAutomaticUpgrade", &v.EnableAutomaticUpgrade)
+ delete(rawMsg, key)
+ case "forceUpdateTag":
+ err = unpopulate(val, "ForceUpdateTag", &v.ForceUpdateTag)
+ delete(rawMsg, key)
+ case "instanceView":
+ err = unpopulate(val, "InstanceView", &v.InstanceView)
+ delete(rawMsg, key)
+ case "protectedSettings":
+ err = unpopulate(val, "ProtectedSettings", &v.ProtectedSettings)
+ delete(rawMsg, key)
+ case "protectedSettingsFromKeyVault":
+ err = unpopulate(val, "ProtectedSettingsFromKeyVault", &v.ProtectedSettingsFromKeyVault)
+ delete(rawMsg, key)
+ case "provisionAfterExtensions":
+ err = unpopulate(val, "ProvisionAfterExtensions", &v.ProvisionAfterExtensions)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &v.ProvisioningState)
+ delete(rawMsg, key)
+ case "publisher":
+ err = unpopulate(val, "Publisher", &v.Publisher)
+ delete(rawMsg, key)
+ case "settings":
+ err = unpopulate(val, "Settings", &v.Settings)
+ delete(rawMsg, key)
+ case "suppressFailures":
+ err = unpopulate(val, "SuppressFailures", &v.SuppressFailures)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ case "typeHandlerVersion":
+ err = unpopulate(val, "TypeHandlerVersion", &v.TypeHandlerVersion)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionUpdate.
+func (v VirtualMachineExtensionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "tags", v.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineExtensionUpdate.
+func (v *VirtualMachineExtensionUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &v.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionUpdateProperties.
+func (v VirtualMachineExtensionUpdateProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "autoUpgradeMinorVersion", v.AutoUpgradeMinorVersion)
+ populate(objectMap, "enableAutomaticUpgrade", v.EnableAutomaticUpgrade)
+ populate(objectMap, "forceUpdateTag", v.ForceUpdateTag)
+ populateAny(objectMap, "protectedSettings", v.ProtectedSettings)
+ populate(objectMap, "protectedSettingsFromKeyVault", v.ProtectedSettingsFromKeyVault)
+ populate(objectMap, "publisher", v.Publisher)
+ populateAny(objectMap, "settings", v.Settings)
+ populate(objectMap, "suppressFailures", v.SuppressFailures)
+ populate(objectMap, "type", v.Type)
+ populate(objectMap, "typeHandlerVersion", v.TypeHandlerVersion)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineExtensionUpdateProperties.
+func (v *VirtualMachineExtensionUpdateProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "autoUpgradeMinorVersion":
+ err = unpopulate(val, "AutoUpgradeMinorVersion", &v.AutoUpgradeMinorVersion)
+ delete(rawMsg, key)
+ case "enableAutomaticUpgrade":
+ err = unpopulate(val, "EnableAutomaticUpgrade", &v.EnableAutomaticUpgrade)
+ delete(rawMsg, key)
+ case "forceUpdateTag":
+ err = unpopulate(val, "ForceUpdateTag", &v.ForceUpdateTag)
+ delete(rawMsg, key)
+ case "protectedSettings":
+ err = unpopulate(val, "ProtectedSettings", &v.ProtectedSettings)
+ delete(rawMsg, key)
+ case "protectedSettingsFromKeyVault":
+ err = unpopulate(val, "ProtectedSettingsFromKeyVault", &v.ProtectedSettingsFromKeyVault)
+ delete(rawMsg, key)
+ case "publisher":
+ err = unpopulate(val, "Publisher", &v.Publisher)
+ delete(rawMsg, key)
+ case "settings":
+ err = unpopulate(val, "Settings", &v.Settings)
+ delete(rawMsg, key)
+ case "suppressFailures":
+ err = unpopulate(val, "SuppressFailures", &v.SuppressFailures)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ case "typeHandlerVersion":
+ err = unpopulate(val, "TypeHandlerVersion", &v.TypeHandlerVersion)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineExtensionsListResult.
+func (v VirtualMachineExtensionsListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "value", v.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineExtensionsListResult.
+func (v *VirtualMachineExtensionsListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "value":
+ err = unpopulate(val, "Value", &v.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineHealthStatus.
+func (v VirtualMachineHealthStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "status", v.Status)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineHealthStatus.
+func (v *VirtualMachineHealthStatus) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "status":
+ err = unpopulate(val, "Status", &v.Status)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineIPTag.
+func (v VirtualMachineIPTag) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "ipTagType", v.IPTagType)
+ populate(objectMap, "tag", v.Tag)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineIPTag.
+func (v *VirtualMachineIPTag) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "ipTagType":
+ err = unpopulate(val, "IPTagType", &v.IPTagType)
+ delete(rawMsg, key)
+ case "tag":
+ err = unpopulate(val, "Tag", &v.Tag)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineIdentity.
+func (v VirtualMachineIdentity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "principalId", v.PrincipalID)
+ populate(objectMap, "tenantId", v.TenantID)
+ populate(objectMap, "type", v.Type)
+ populate(objectMap, "userAssignedIdentities", v.UserAssignedIdentities)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineIdentity.
+func (v *VirtualMachineIdentity) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "principalId":
+ err = unpopulate(val, "PrincipalID", &v.PrincipalID)
+ delete(rawMsg, key)
+ case "tenantId":
+ err = unpopulate(val, "TenantID", &v.TenantID)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ case "userAssignedIdentities":
+ err = unpopulate(val, "UserAssignedIdentities", &v.UserAssignedIdentities)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineImage.
+func (v VirtualMachineImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "extendedLocation", v.ExtendedLocation)
+ populate(objectMap, "id", v.ID)
+ populate(objectMap, "location", v.Location)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "tags", v.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineImage.
+func (v *VirtualMachineImage) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "extendedLocation":
+ err = unpopulate(val, "ExtendedLocation", &v.ExtendedLocation)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &v.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &v.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &v.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineImageFeature.
+func (v VirtualMachineImageFeature) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "value", v.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineImageFeature.
+func (v *VirtualMachineImageFeature) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &v.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineImageProperties.
+func (v VirtualMachineImageProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "architecture", v.Architecture)
+ populate(objectMap, "automaticOSUpgradeProperties", v.AutomaticOSUpgradeProperties)
+ populate(objectMap, "dataDiskImages", v.DataDiskImages)
+ populate(objectMap, "disallowed", v.Disallowed)
+ populate(objectMap, "features", v.Features)
+ populate(objectMap, "hyperVGeneration", v.HyperVGeneration)
+ populate(objectMap, "imageDeprecationStatus", v.ImageDeprecationStatus)
+ populate(objectMap, "osDiskImage", v.OSDiskImage)
+ populate(objectMap, "plan", v.Plan)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineImageProperties.
+func (v *VirtualMachineImageProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "architecture":
+ err = unpopulate(val, "Architecture", &v.Architecture)
+ delete(rawMsg, key)
+ case "automaticOSUpgradeProperties":
+ err = unpopulate(val, "AutomaticOSUpgradeProperties", &v.AutomaticOSUpgradeProperties)
+ delete(rawMsg, key)
+ case "dataDiskImages":
+ err = unpopulate(val, "DataDiskImages", &v.DataDiskImages)
+ delete(rawMsg, key)
+ case "disallowed":
+ err = unpopulate(val, "Disallowed", &v.Disallowed)
+ delete(rawMsg, key)
+ case "features":
+ err = unpopulate(val, "Features", &v.Features)
+ delete(rawMsg, key)
+ case "hyperVGeneration":
+ err = unpopulate(val, "HyperVGeneration", &v.HyperVGeneration)
+ delete(rawMsg, key)
+ case "imageDeprecationStatus":
+ err = unpopulate(val, "ImageDeprecationStatus", &v.ImageDeprecationStatus)
+ delete(rawMsg, key)
+ case "osDiskImage":
+ err = unpopulate(val, "OSDiskImage", &v.OSDiskImage)
+ delete(rawMsg, key)
+ case "plan":
+ err = unpopulate(val, "Plan", &v.Plan)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineImageResource.
+func (v VirtualMachineImageResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "extendedLocation", v.ExtendedLocation)
+ populate(objectMap, "id", v.ID)
+ populate(objectMap, "location", v.Location)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "tags", v.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineImageResource.
+func (v *VirtualMachineImageResource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "extendedLocation":
+ err = unpopulate(val, "ExtendedLocation", &v.ExtendedLocation)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &v.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &v.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &v.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstallPatchesParameters.
+func (v VirtualMachineInstallPatchesParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "linuxParameters", v.LinuxParameters)
+ populate(objectMap, "maximumDuration", v.MaximumDuration)
+ populate(objectMap, "rebootSetting", v.RebootSetting)
+ populate(objectMap, "windowsParameters", v.WindowsParameters)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstallPatchesParameters.
+func (v *VirtualMachineInstallPatchesParameters) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "linuxParameters":
+ err = unpopulate(val, "LinuxParameters", &v.LinuxParameters)
+ delete(rawMsg, key)
+ case "maximumDuration":
+ err = unpopulate(val, "MaximumDuration", &v.MaximumDuration)
+ delete(rawMsg, key)
+ case "rebootSetting":
+ err = unpopulate(val, "RebootSetting", &v.RebootSetting)
+ delete(rawMsg, key)
+ case "windowsParameters":
+ err = unpopulate(val, "WindowsParameters", &v.WindowsParameters)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstallPatchesResult.
+func (v VirtualMachineInstallPatchesResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "error", v.Error)
+ populate(objectMap, "excludedPatchCount", v.ExcludedPatchCount)
+ populate(objectMap, "failedPatchCount", v.FailedPatchCount)
+ populate(objectMap, "installationActivityId", v.InstallationActivityID)
+ populate(objectMap, "installedPatchCount", v.InstalledPatchCount)
+ populate(objectMap, "maintenanceWindowExceeded", v.MaintenanceWindowExceeded)
+ populate(objectMap, "notSelectedPatchCount", v.NotSelectedPatchCount)
+ populate(objectMap, "patches", v.Patches)
+ populate(objectMap, "pendingPatchCount", v.PendingPatchCount)
+ populate(objectMap, "rebootStatus", v.RebootStatus)
+ populateDateTimeRFC3339(objectMap, "startDateTime", v.StartDateTime)
+ populate(objectMap, "status", v.Status)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstallPatchesResult.
+func (v *VirtualMachineInstallPatchesResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "error":
+ err = unpopulate(val, "Error", &v.Error)
+ delete(rawMsg, key)
+ case "excludedPatchCount":
+ err = unpopulate(val, "ExcludedPatchCount", &v.ExcludedPatchCount)
+ delete(rawMsg, key)
+ case "failedPatchCount":
+ err = unpopulate(val, "FailedPatchCount", &v.FailedPatchCount)
+ delete(rawMsg, key)
+ case "installationActivityId":
+ err = unpopulate(val, "InstallationActivityID", &v.InstallationActivityID)
+ delete(rawMsg, key)
+ case "installedPatchCount":
+ err = unpopulate(val, "InstalledPatchCount", &v.InstalledPatchCount)
+ delete(rawMsg, key)
+ case "maintenanceWindowExceeded":
+ err = unpopulate(val, "MaintenanceWindowExceeded", &v.MaintenanceWindowExceeded)
+ delete(rawMsg, key)
+ case "notSelectedPatchCount":
+ err = unpopulate(val, "NotSelectedPatchCount", &v.NotSelectedPatchCount)
+ delete(rawMsg, key)
+ case "patches":
+ err = unpopulate(val, "Patches", &v.Patches)
+ delete(rawMsg, key)
+ case "pendingPatchCount":
+ err = unpopulate(val, "PendingPatchCount", &v.PendingPatchCount)
+ delete(rawMsg, key)
+ case "rebootStatus":
+ err = unpopulate(val, "RebootStatus", &v.RebootStatus)
+ delete(rawMsg, key)
+ case "startDateTime":
+ err = unpopulateDateTimeRFC3339(val, "StartDateTime", &v.StartDateTime)
+ delete(rawMsg, key)
+ case "status":
+ err = unpopulate(val, "Status", &v.Status)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstanceView.
+func (v VirtualMachineInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "assignedHost", v.AssignedHost)
+ populate(objectMap, "bootDiagnostics", v.BootDiagnostics)
+ populate(objectMap, "computerName", v.ComputerName)
+ populate(objectMap, "disks", v.Disks)
+ populate(objectMap, "extensions", v.Extensions)
+ populate(objectMap, "hyperVGeneration", v.HyperVGeneration)
+ populate(objectMap, "isVMInStandbyPool", v.IsVMInStandbyPool)
+ populate(objectMap, "maintenanceRedeployStatus", v.MaintenanceRedeployStatus)
+ populate(objectMap, "osName", v.OSName)
+ populate(objectMap, "osVersion", v.OSVersion)
+ populate(objectMap, "patchStatus", v.PatchStatus)
+ populate(objectMap, "platformFaultDomain", v.PlatformFaultDomain)
+ populate(objectMap, "platformUpdateDomain", v.PlatformUpdateDomain)
+ populate(objectMap, "rdpThumbPrint", v.RdpThumbPrint)
+ populate(objectMap, "statuses", v.Statuses)
+ populate(objectMap, "vmAgent", v.VMAgent)
+ populate(objectMap, "vmHealth", v.VMHealth)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstanceView.
+func (v *VirtualMachineInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "assignedHost":
+ err = unpopulate(val, "AssignedHost", &v.AssignedHost)
+ delete(rawMsg, key)
+ case "bootDiagnostics":
+ err = unpopulate(val, "BootDiagnostics", &v.BootDiagnostics)
+ delete(rawMsg, key)
+ case "computerName":
+ err = unpopulate(val, "ComputerName", &v.ComputerName)
+ delete(rawMsg, key)
+ case "disks":
+ err = unpopulate(val, "Disks", &v.Disks)
+ delete(rawMsg, key)
+ case "extensions":
+ err = unpopulate(val, "Extensions", &v.Extensions)
+ delete(rawMsg, key)
+ case "hyperVGeneration":
+ err = unpopulate(val, "HyperVGeneration", &v.HyperVGeneration)
+ delete(rawMsg, key)
+ case "isVMInStandbyPool":
+ err = unpopulate(val, "IsVMInStandbyPool", &v.IsVMInStandbyPool)
+ delete(rawMsg, key)
+ case "maintenanceRedeployStatus":
+ err = unpopulate(val, "MaintenanceRedeployStatus", &v.MaintenanceRedeployStatus)
+ delete(rawMsg, key)
+ case "osName":
+ err = unpopulate(val, "OSName", &v.OSName)
+ delete(rawMsg, key)
+ case "osVersion":
+ err = unpopulate(val, "OSVersion", &v.OSVersion)
+ delete(rawMsg, key)
+ case "patchStatus":
+ err = unpopulate(val, "PatchStatus", &v.PatchStatus)
+ delete(rawMsg, key)
+ case "platformFaultDomain":
+ err = unpopulate(val, "PlatformFaultDomain", &v.PlatformFaultDomain)
+ delete(rawMsg, key)
+ case "platformUpdateDomain":
+ err = unpopulate(val, "PlatformUpdateDomain", &v.PlatformUpdateDomain)
+ delete(rawMsg, key)
+ case "rdpThumbPrint":
+ err = unpopulate(val, "RdpThumbPrint", &v.RdpThumbPrint)
+ delete(rawMsg, key)
+ case "statuses":
+ err = unpopulate(val, "Statuses", &v.Statuses)
+ delete(rawMsg, key)
+ case "vmAgent":
+ err = unpopulate(val, "VMAgent", &v.VMAgent)
+ delete(rawMsg, key)
+ case "vmHealth":
+ err = unpopulate(val, "VMHealth", &v.VMHealth)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineListResult.
+func (v VirtualMachineListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", v.NextLink)
+ populate(objectMap, "value", v.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineListResult.
+func (v *VirtualMachineListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &v.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &v.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineNetworkInterfaceConfiguration.
+func (v VirtualMachineNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineNetworkInterfaceConfiguration.
+func (v *VirtualMachineNetworkInterfaceConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineNetworkInterfaceConfigurationProperties.
+func (v VirtualMachineNetworkInterfaceConfigurationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "auxiliaryMode", v.AuxiliaryMode)
+ populate(objectMap, "auxiliarySku", v.AuxiliarySKU)
+ populate(objectMap, "dnsSettings", v.DNSSettings)
+ populate(objectMap, "deleteOption", v.DeleteOption)
+ populate(objectMap, "disableTcpStateTracking", v.DisableTCPStateTracking)
+ populate(objectMap, "dscpConfiguration", v.DscpConfiguration)
+ populate(objectMap, "enableAcceleratedNetworking", v.EnableAcceleratedNetworking)
+ populate(objectMap, "enableFpga", v.EnableFpga)
+ populate(objectMap, "enableIPForwarding", v.EnableIPForwarding)
+ populate(objectMap, "ipConfigurations", v.IPConfigurations)
+ populate(objectMap, "networkSecurityGroup", v.NetworkSecurityGroup)
+ populate(objectMap, "primary", v.Primary)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineNetworkInterfaceConfigurationProperties.
+func (v *VirtualMachineNetworkInterfaceConfigurationProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "auxiliaryMode":
+ err = unpopulate(val, "AuxiliaryMode", &v.AuxiliaryMode)
+ delete(rawMsg, key)
+ case "auxiliarySku":
+ err = unpopulate(val, "AuxiliarySKU", &v.AuxiliarySKU)
+ delete(rawMsg, key)
+ case "dnsSettings":
+ err = unpopulate(val, "DNSSettings", &v.DNSSettings)
+ delete(rawMsg, key)
+ case "deleteOption":
+ err = unpopulate(val, "DeleteOption", &v.DeleteOption)
+ delete(rawMsg, key)
+ case "disableTcpStateTracking":
+ err = unpopulate(val, "DisableTCPStateTracking", &v.DisableTCPStateTracking)
+ delete(rawMsg, key)
+ case "dscpConfiguration":
+ err = unpopulate(val, "DscpConfiguration", &v.DscpConfiguration)
+ delete(rawMsg, key)
+ case "enableAcceleratedNetworking":
+ err = unpopulate(val, "EnableAcceleratedNetworking", &v.EnableAcceleratedNetworking)
+ delete(rawMsg, key)
+ case "enableFpga":
+ err = unpopulate(val, "EnableFpga", &v.EnableFpga)
+ delete(rawMsg, key)
+ case "enableIPForwarding":
+ err = unpopulate(val, "EnableIPForwarding", &v.EnableIPForwarding)
+ delete(rawMsg, key)
+ case "ipConfigurations":
+ err = unpopulate(val, "IPConfigurations", &v.IPConfigurations)
+ delete(rawMsg, key)
+ case "networkSecurityGroup":
+ err = unpopulate(val, "NetworkSecurityGroup", &v.NetworkSecurityGroup)
+ delete(rawMsg, key)
+ case "primary":
+ err = unpopulate(val, "Primary", &v.Primary)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineNetworkInterfaceDNSSettingsConfiguration.
+func (v VirtualMachineNetworkInterfaceDNSSettingsConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dnsServers", v.DNSServers)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineNetworkInterfaceDNSSettingsConfiguration.
+func (v *VirtualMachineNetworkInterfaceDNSSettingsConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dnsServers":
+ err = unpopulate(val, "DNSServers", &v.DNSServers)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineNetworkInterfaceIPConfiguration.
+func (v VirtualMachineNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineNetworkInterfaceIPConfiguration.
+func (v *VirtualMachineNetworkInterfaceIPConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineNetworkInterfaceIPConfigurationProperties.
+func (v VirtualMachineNetworkInterfaceIPConfigurationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "applicationGatewayBackendAddressPools", v.ApplicationGatewayBackendAddressPools)
+ populate(objectMap, "applicationSecurityGroups", v.ApplicationSecurityGroups)
+ populate(objectMap, "loadBalancerBackendAddressPools", v.LoadBalancerBackendAddressPools)
+ populate(objectMap, "primary", v.Primary)
+ populate(objectMap, "privateIPAddressVersion", v.PrivateIPAddressVersion)
+ populate(objectMap, "publicIPAddressConfiguration", v.PublicIPAddressConfiguration)
+ populate(objectMap, "subnet", v.Subnet)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineNetworkInterfaceIPConfigurationProperties.
+func (v *VirtualMachineNetworkInterfaceIPConfigurationProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "applicationGatewayBackendAddressPools":
+ err = unpopulate(val, "ApplicationGatewayBackendAddressPools", &v.ApplicationGatewayBackendAddressPools)
+ delete(rawMsg, key)
+ case "applicationSecurityGroups":
+ err = unpopulate(val, "ApplicationSecurityGroups", &v.ApplicationSecurityGroups)
+ delete(rawMsg, key)
+ case "loadBalancerBackendAddressPools":
+ err = unpopulate(val, "LoadBalancerBackendAddressPools", &v.LoadBalancerBackendAddressPools)
+ delete(rawMsg, key)
+ case "primary":
+ err = unpopulate(val, "Primary", &v.Primary)
+ delete(rawMsg, key)
+ case "privateIPAddressVersion":
+ err = unpopulate(val, "PrivateIPAddressVersion", &v.PrivateIPAddressVersion)
+ delete(rawMsg, key)
+ case "publicIPAddressConfiguration":
+ err = unpopulate(val, "PublicIPAddressConfiguration", &v.PublicIPAddressConfiguration)
+ delete(rawMsg, key)
+ case "subnet":
+ err = unpopulate(val, "Subnet", &v.Subnet)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachinePatchStatus.
+func (v VirtualMachinePatchStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "availablePatchSummary", v.AvailablePatchSummary)
+ populate(objectMap, "configurationStatuses", v.ConfigurationStatuses)
+ populate(objectMap, "lastPatchInstallationSummary", v.LastPatchInstallationSummary)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachinePatchStatus.
+func (v *VirtualMachinePatchStatus) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "availablePatchSummary":
+ err = unpopulate(val, "AvailablePatchSummary", &v.AvailablePatchSummary)
+ delete(rawMsg, key)
+ case "configurationStatuses":
+ err = unpopulate(val, "ConfigurationStatuses", &v.ConfigurationStatuses)
+ delete(rawMsg, key)
+ case "lastPatchInstallationSummary":
+ err = unpopulate(val, "LastPatchInstallationSummary", &v.LastPatchInstallationSummary)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineProperties.
+func (v VirtualMachineProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "additionalCapabilities", v.AdditionalCapabilities)
+ populate(objectMap, "applicationProfile", v.ApplicationProfile)
+ populate(objectMap, "availabilitySet", v.AvailabilitySet)
+ populate(objectMap, "billingProfile", v.BillingProfile)
+ populate(objectMap, "capacityReservation", v.CapacityReservation)
+ populate(objectMap, "diagnosticsProfile", v.DiagnosticsProfile)
+ populate(objectMap, "evictionPolicy", v.EvictionPolicy)
+ populate(objectMap, "extensionsTimeBudget", v.ExtensionsTimeBudget)
+ populate(objectMap, "hardwareProfile", v.HardwareProfile)
+ populate(objectMap, "host", v.Host)
+ populate(objectMap, "hostGroup", v.HostGroup)
+ populate(objectMap, "instanceView", v.InstanceView)
+ populate(objectMap, "licenseType", v.LicenseType)
+ populate(objectMap, "networkProfile", v.NetworkProfile)
+ populate(objectMap, "osProfile", v.OSProfile)
+ populate(objectMap, "platformFaultDomain", v.PlatformFaultDomain)
+ populate(objectMap, "priority", v.Priority)
+ populate(objectMap, "provisioningState", v.ProvisioningState)
+ populate(objectMap, "proximityPlacementGroup", v.ProximityPlacementGroup)
+ populate(objectMap, "scheduledEventsPolicy", v.ScheduledEventsPolicy)
+ populate(objectMap, "scheduledEventsProfile", v.ScheduledEventsProfile)
+ populate(objectMap, "securityProfile", v.SecurityProfile)
+ populate(objectMap, "storageProfile", v.StorageProfile)
+ populateDateTimeRFC3339(objectMap, "timeCreated", v.TimeCreated)
+ populate(objectMap, "userData", v.UserData)
+ populate(objectMap, "vmId", v.VMID)
+ populate(objectMap, "virtualMachineScaleSet", v.VirtualMachineScaleSet)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineProperties.
+func (v *VirtualMachineProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "additionalCapabilities":
+ err = unpopulate(val, "AdditionalCapabilities", &v.AdditionalCapabilities)
+ delete(rawMsg, key)
+ case "applicationProfile":
+ err = unpopulate(val, "ApplicationProfile", &v.ApplicationProfile)
+ delete(rawMsg, key)
+ case "availabilitySet":
+ err = unpopulate(val, "AvailabilitySet", &v.AvailabilitySet)
+ delete(rawMsg, key)
+ case "billingProfile":
+ err = unpopulate(val, "BillingProfile", &v.BillingProfile)
+ delete(rawMsg, key)
+ case "capacityReservation":
+ err = unpopulate(val, "CapacityReservation", &v.CapacityReservation)
+ delete(rawMsg, key)
+ case "diagnosticsProfile":
+ err = unpopulate(val, "DiagnosticsProfile", &v.DiagnosticsProfile)
+ delete(rawMsg, key)
+ case "evictionPolicy":
+ err = unpopulate(val, "EvictionPolicy", &v.EvictionPolicy)
+ delete(rawMsg, key)
+ case "extensionsTimeBudget":
+ err = unpopulate(val, "ExtensionsTimeBudget", &v.ExtensionsTimeBudget)
+ delete(rawMsg, key)
+ case "hardwareProfile":
+ err = unpopulate(val, "HardwareProfile", &v.HardwareProfile)
+ delete(rawMsg, key)
+ case "host":
+ err = unpopulate(val, "Host", &v.Host)
+ delete(rawMsg, key)
+ case "hostGroup":
+ err = unpopulate(val, "HostGroup", &v.HostGroup)
+ delete(rawMsg, key)
+ case "instanceView":
+ err = unpopulate(val, "InstanceView", &v.InstanceView)
+ delete(rawMsg, key)
+ case "licenseType":
+ err = unpopulate(val, "LicenseType", &v.LicenseType)
+ delete(rawMsg, key)
+ case "networkProfile":
+ err = unpopulate(val, "NetworkProfile", &v.NetworkProfile)
+ delete(rawMsg, key)
+ case "osProfile":
+ err = unpopulate(val, "OSProfile", &v.OSProfile)
+ delete(rawMsg, key)
+ case "platformFaultDomain":
+ err = unpopulate(val, "PlatformFaultDomain", &v.PlatformFaultDomain)
+ delete(rawMsg, key)
+ case "priority":
+ err = unpopulate(val, "Priority", &v.Priority)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &v.ProvisioningState)
+ delete(rawMsg, key)
+ case "proximityPlacementGroup":
+ err = unpopulate(val, "ProximityPlacementGroup", &v.ProximityPlacementGroup)
+ delete(rawMsg, key)
+ case "scheduledEventsPolicy":
+ err = unpopulate(val, "ScheduledEventsPolicy", &v.ScheduledEventsPolicy)
+ delete(rawMsg, key)
+ case "scheduledEventsProfile":
+ err = unpopulate(val, "ScheduledEventsProfile", &v.ScheduledEventsProfile)
+ delete(rawMsg, key)
+ case "securityProfile":
+ err = unpopulate(val, "SecurityProfile", &v.SecurityProfile)
+ delete(rawMsg, key)
+ case "storageProfile":
+ err = unpopulate(val, "StorageProfile", &v.StorageProfile)
+ delete(rawMsg, key)
+ case "timeCreated":
+ err = unpopulateDateTimeRFC3339(val, "TimeCreated", &v.TimeCreated)
+ delete(rawMsg, key)
+ case "userData":
+ err = unpopulate(val, "UserData", &v.UserData)
+ delete(rawMsg, key)
+ case "vmId":
+ err = unpopulate(val, "VMID", &v.VMID)
+ delete(rawMsg, key)
+ case "virtualMachineScaleSet":
+ err = unpopulate(val, "VirtualMachineScaleSet", &v.VirtualMachineScaleSet)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachinePublicIPAddressConfiguration.
+func (v VirtualMachinePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "sku", v.SKU)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachinePublicIPAddressConfiguration.
+func (v *VirtualMachinePublicIPAddressConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &v.SKU)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachinePublicIPAddressConfigurationProperties.
+func (v VirtualMachinePublicIPAddressConfigurationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dnsSettings", v.DNSSettings)
+ populate(objectMap, "deleteOption", v.DeleteOption)
+ populate(objectMap, "ipTags", v.IPTags)
+ populate(objectMap, "idleTimeoutInMinutes", v.IdleTimeoutInMinutes)
+ populate(objectMap, "publicIPAddressVersion", v.PublicIPAddressVersion)
+ populate(objectMap, "publicIPAllocationMethod", v.PublicIPAllocationMethod)
+ populate(objectMap, "publicIPPrefix", v.PublicIPPrefix)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachinePublicIPAddressConfigurationProperties.
+func (v *VirtualMachinePublicIPAddressConfigurationProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dnsSettings":
+ err = unpopulate(val, "DNSSettings", &v.DNSSettings)
+ delete(rawMsg, key)
+ case "deleteOption":
+ err = unpopulate(val, "DeleteOption", &v.DeleteOption)
+ delete(rawMsg, key)
+ case "ipTags":
+ err = unpopulate(val, "IPTags", &v.IPTags)
+ delete(rawMsg, key)
+ case "idleTimeoutInMinutes":
+ err = unpopulate(val, "IdleTimeoutInMinutes", &v.IdleTimeoutInMinutes)
+ delete(rawMsg, key)
+ case "publicIPAddressVersion":
+ err = unpopulate(val, "PublicIPAddressVersion", &v.PublicIPAddressVersion)
+ delete(rawMsg, key)
+ case "publicIPAllocationMethod":
+ err = unpopulate(val, "PublicIPAllocationMethod", &v.PublicIPAllocationMethod)
+ delete(rawMsg, key)
+ case "publicIPPrefix":
+ err = unpopulate(val, "PublicIPPrefix", &v.PublicIPPrefix)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachinePublicIPAddressDNSSettingsConfiguration.
+func (v VirtualMachinePublicIPAddressDNSSettingsConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "domainNameLabel", v.DomainNameLabel)
+ populate(objectMap, "domainNameLabelScope", v.DomainNameLabelScope)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachinePublicIPAddressDNSSettingsConfiguration.
+func (v *VirtualMachinePublicIPAddressDNSSettingsConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "domainNameLabel":
+ err = unpopulate(val, "DomainNameLabel", &v.DomainNameLabel)
+ delete(rawMsg, key)
+ case "domainNameLabelScope":
+ err = unpopulate(val, "DomainNameLabelScope", &v.DomainNameLabelScope)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineReimageParameters.
+func (v VirtualMachineReimageParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "exactVersion", v.ExactVersion)
+ populate(objectMap, "osProfile", v.OSProfile)
+ populate(objectMap, "tempDisk", v.TempDisk)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineReimageParameters.
+func (v *VirtualMachineReimageParameters) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "exactVersion":
+ err = unpopulate(val, "ExactVersion", &v.ExactVersion)
+ delete(rawMsg, key)
+ case "osProfile":
+ err = unpopulate(val, "OSProfile", &v.OSProfile)
+ delete(rawMsg, key)
+ case "tempDisk":
+ err = unpopulate(val, "TempDisk", &v.TempDisk)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommand.
+func (v VirtualMachineRunCommand) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", v.ID)
+ populate(objectMap, "location", v.Location)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "tags", v.Tags)
+ populate(objectMap, "type", v.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineRunCommand.
+func (v *VirtualMachineRunCommand) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &v.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &v.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &v.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommandInstanceView.
+func (v VirtualMachineRunCommandInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populateDateTimeRFC3339(objectMap, "endTime", v.EndTime)
+ populate(objectMap, "error", v.Error)
+ populate(objectMap, "executionMessage", v.ExecutionMessage)
+ populate(objectMap, "executionState", v.ExecutionState)
+ populate(objectMap, "exitCode", v.ExitCode)
+ populate(objectMap, "output", v.Output)
+ populateDateTimeRFC3339(objectMap, "startTime", v.StartTime)
+ populate(objectMap, "statuses", v.Statuses)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineRunCommandInstanceView.
+func (v *VirtualMachineRunCommandInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "endTime":
+ err = unpopulateDateTimeRFC3339(val, "EndTime", &v.EndTime)
+ delete(rawMsg, key)
+ case "error":
+ err = unpopulate(val, "Error", &v.Error)
+ delete(rawMsg, key)
+ case "executionMessage":
+ err = unpopulate(val, "ExecutionMessage", &v.ExecutionMessage)
+ delete(rawMsg, key)
+ case "executionState":
+ err = unpopulate(val, "ExecutionState", &v.ExecutionState)
+ delete(rawMsg, key)
+ case "exitCode":
+ err = unpopulate(val, "ExitCode", &v.ExitCode)
+ delete(rawMsg, key)
+ case "output":
+ err = unpopulate(val, "Output", &v.Output)
+ delete(rawMsg, key)
+ case "startTime":
+ err = unpopulateDateTimeRFC3339(val, "StartTime", &v.StartTime)
+ delete(rawMsg, key)
+ case "statuses":
+ err = unpopulate(val, "Statuses", &v.Statuses)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommandProperties.
+func (v VirtualMachineRunCommandProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "asyncExecution", v.AsyncExecution)
+ populate(objectMap, "errorBlobManagedIdentity", v.ErrorBlobManagedIdentity)
+ populate(objectMap, "errorBlobUri", v.ErrorBlobURI)
+ populate(objectMap, "instanceView", v.InstanceView)
+ populate(objectMap, "outputBlobManagedIdentity", v.OutputBlobManagedIdentity)
+ populate(objectMap, "outputBlobUri", v.OutputBlobURI)
+ populate(objectMap, "parameters", v.Parameters)
+ populate(objectMap, "protectedParameters", v.ProtectedParameters)
+ populate(objectMap, "provisioningState", v.ProvisioningState)
+ populate(objectMap, "runAsPassword", v.RunAsPassword)
+ populate(objectMap, "runAsUser", v.RunAsUser)
+ populate(objectMap, "source", v.Source)
+ populate(objectMap, "timeoutInSeconds", v.TimeoutInSeconds)
+ populate(objectMap, "treatFailureAsDeploymentFailure", v.TreatFailureAsDeploymentFailure)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineRunCommandProperties.
+func (v *VirtualMachineRunCommandProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "asyncExecution":
+ err = unpopulate(val, "AsyncExecution", &v.AsyncExecution)
+ delete(rawMsg, key)
+ case "errorBlobManagedIdentity":
+ err = unpopulate(val, "ErrorBlobManagedIdentity", &v.ErrorBlobManagedIdentity)
+ delete(rawMsg, key)
+ case "errorBlobUri":
+ err = unpopulate(val, "ErrorBlobURI", &v.ErrorBlobURI)
+ delete(rawMsg, key)
+ case "instanceView":
+ err = unpopulate(val, "InstanceView", &v.InstanceView)
+ delete(rawMsg, key)
+ case "outputBlobManagedIdentity":
+ err = unpopulate(val, "OutputBlobManagedIdentity", &v.OutputBlobManagedIdentity)
+ delete(rawMsg, key)
+ case "outputBlobUri":
+ err = unpopulate(val, "OutputBlobURI", &v.OutputBlobURI)
+ delete(rawMsg, key)
+ case "parameters":
+ err = unpopulate(val, "Parameters", &v.Parameters)
+ delete(rawMsg, key)
+ case "protectedParameters":
+ err = unpopulate(val, "ProtectedParameters", &v.ProtectedParameters)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &v.ProvisioningState)
+ delete(rawMsg, key)
+ case "runAsPassword":
+ err = unpopulate(val, "RunAsPassword", &v.RunAsPassword)
+ delete(rawMsg, key)
+ case "runAsUser":
+ err = unpopulate(val, "RunAsUser", &v.RunAsUser)
+ delete(rawMsg, key)
+ case "source":
+ err = unpopulate(val, "Source", &v.Source)
+ delete(rawMsg, key)
+ case "timeoutInSeconds":
+ err = unpopulate(val, "TimeoutInSeconds", &v.TimeoutInSeconds)
+ delete(rawMsg, key)
+ case "treatFailureAsDeploymentFailure":
+ err = unpopulate(val, "TreatFailureAsDeploymentFailure", &v.TreatFailureAsDeploymentFailure)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommandScriptSource.
+func (v VirtualMachineRunCommandScriptSource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "commandId", v.CommandID)
+ populate(objectMap, "script", v.Script)
+ populate(objectMap, "scriptUri", v.ScriptURI)
+ populate(objectMap, "scriptUriManagedIdentity", v.ScriptURIManagedIdentity)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineRunCommandScriptSource.
+func (v *VirtualMachineRunCommandScriptSource) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "commandId":
+ err = unpopulate(val, "CommandID", &v.CommandID)
+ delete(rawMsg, key)
+ case "script":
+ err = unpopulate(val, "Script", &v.Script)
+ delete(rawMsg, key)
+ case "scriptUri":
+ err = unpopulate(val, "ScriptURI", &v.ScriptURI)
+ delete(rawMsg, key)
+ case "scriptUriManagedIdentity":
+ err = unpopulate(val, "ScriptURIManagedIdentity", &v.ScriptURIManagedIdentity)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommandUpdate.
+func (v VirtualMachineRunCommandUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "tags", v.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineRunCommandUpdate.
+func (v *VirtualMachineRunCommandUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &v.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineRunCommandsListResult.
+func (v VirtualMachineRunCommandsListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", v.NextLink)
+ populate(objectMap, "value", v.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineRunCommandsListResult.
+func (v *VirtualMachineRunCommandsListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &v.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &v.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSet.
+func (v VirtualMachineScaleSet) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "etag", v.Etag)
+ populate(objectMap, "extendedLocation", v.ExtendedLocation)
+ populate(objectMap, "id", v.ID)
+ populate(objectMap, "identity", v.Identity)
+ populate(objectMap, "location", v.Location)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "plan", v.Plan)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "sku", v.SKU)
+ populate(objectMap, "tags", v.Tags)
+ populate(objectMap, "type", v.Type)
+ populate(objectMap, "zones", v.Zones)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSet.
+func (v *VirtualMachineScaleSet) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "etag":
+ err = unpopulate(val, "Etag", &v.Etag)
+ delete(rawMsg, key)
+ case "extendedLocation":
+ err = unpopulate(val, "ExtendedLocation", &v.ExtendedLocation)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &v.ID)
+ delete(rawMsg, key)
+ case "identity":
+ err = unpopulate(val, "Identity", &v.Identity)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &v.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "plan":
+ err = unpopulate(val, "Plan", &v.Plan)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &v.SKU)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &v.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ case "zones":
+ err = unpopulate(val, "Zones", &v.Zones)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetDataDisk.
+func (v VirtualMachineScaleSetDataDisk) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "caching", v.Caching)
+ populate(objectMap, "createOption", v.CreateOption)
+ populate(objectMap, "deleteOption", v.DeleteOption)
+ populate(objectMap, "diskIOPSReadWrite", v.DiskIOPSReadWrite)
+ populate(objectMap, "diskMBpsReadWrite", v.DiskMBpsReadWrite)
+ populate(objectMap, "diskSizeGB", v.DiskSizeGB)
+ populate(objectMap, "lun", v.Lun)
+ populate(objectMap, "managedDisk", v.ManagedDisk)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "writeAcceleratorEnabled", v.WriteAcceleratorEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetDataDisk.
+func (v *VirtualMachineScaleSetDataDisk) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "caching":
+ err = unpopulate(val, "Caching", &v.Caching)
+ delete(rawMsg, key)
+ case "createOption":
+ err = unpopulate(val, "CreateOption", &v.CreateOption)
+ delete(rawMsg, key)
+ case "deleteOption":
+ err = unpopulate(val, "DeleteOption", &v.DeleteOption)
+ delete(rawMsg, key)
+ case "diskIOPSReadWrite":
+ err = unpopulate(val, "DiskIOPSReadWrite", &v.DiskIOPSReadWrite)
+ delete(rawMsg, key)
+ case "diskMBpsReadWrite":
+ err = unpopulate(val, "DiskMBpsReadWrite", &v.DiskMBpsReadWrite)
+ delete(rawMsg, key)
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &v.DiskSizeGB)
+ delete(rawMsg, key)
+ case "lun":
+ err = unpopulate(val, "Lun", &v.Lun)
+ delete(rawMsg, key)
+ case "managedDisk":
+ err = unpopulate(val, "ManagedDisk", &v.ManagedDisk)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "writeAcceleratorEnabled":
+ err = unpopulate(val, "WriteAcceleratorEnabled", &v.WriteAcceleratorEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetExtension.
+func (v VirtualMachineScaleSetExtension) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", v.ID)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "type", v.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetExtension.
+func (v *VirtualMachineScaleSetExtension) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &v.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetExtensionListResult.
+func (v VirtualMachineScaleSetExtensionListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", v.NextLink)
+ populate(objectMap, "value", v.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetExtensionListResult.
+func (v *VirtualMachineScaleSetExtensionListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &v.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &v.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetExtensionProfile.
+func (v VirtualMachineScaleSetExtensionProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "extensions", v.Extensions)
+ populate(objectMap, "extensionsTimeBudget", v.ExtensionsTimeBudget)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetExtensionProfile.
+func (v *VirtualMachineScaleSetExtensionProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "extensions":
+ err = unpopulate(val, "Extensions", &v.Extensions)
+ delete(rawMsg, key)
+ case "extensionsTimeBudget":
+ err = unpopulate(val, "ExtensionsTimeBudget", &v.ExtensionsTimeBudget)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetExtensionProperties.
+func (v VirtualMachineScaleSetExtensionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "autoUpgradeMinorVersion", v.AutoUpgradeMinorVersion)
+ populate(objectMap, "enableAutomaticUpgrade", v.EnableAutomaticUpgrade)
+ populate(objectMap, "forceUpdateTag", v.ForceUpdateTag)
+ populateAny(objectMap, "protectedSettings", v.ProtectedSettings)
+ populate(objectMap, "protectedSettingsFromKeyVault", v.ProtectedSettingsFromKeyVault)
+ populate(objectMap, "provisionAfterExtensions", v.ProvisionAfterExtensions)
+ populate(objectMap, "provisioningState", v.ProvisioningState)
+ populate(objectMap, "publisher", v.Publisher)
+ populateAny(objectMap, "settings", v.Settings)
+ populate(objectMap, "suppressFailures", v.SuppressFailures)
+ populate(objectMap, "type", v.Type)
+ populate(objectMap, "typeHandlerVersion", v.TypeHandlerVersion)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetExtensionProperties.
+func (v *VirtualMachineScaleSetExtensionProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "autoUpgradeMinorVersion":
+ err = unpopulate(val, "AutoUpgradeMinorVersion", &v.AutoUpgradeMinorVersion)
+ delete(rawMsg, key)
+ case "enableAutomaticUpgrade":
+ err = unpopulate(val, "EnableAutomaticUpgrade", &v.EnableAutomaticUpgrade)
+ delete(rawMsg, key)
+ case "forceUpdateTag":
+ err = unpopulate(val, "ForceUpdateTag", &v.ForceUpdateTag)
+ delete(rawMsg, key)
+ case "protectedSettings":
+ err = unpopulate(val, "ProtectedSettings", &v.ProtectedSettings)
+ delete(rawMsg, key)
+ case "protectedSettingsFromKeyVault":
+ err = unpopulate(val, "ProtectedSettingsFromKeyVault", &v.ProtectedSettingsFromKeyVault)
+ delete(rawMsg, key)
+ case "provisionAfterExtensions":
+ err = unpopulate(val, "ProvisionAfterExtensions", &v.ProvisionAfterExtensions)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &v.ProvisioningState)
+ delete(rawMsg, key)
+ case "publisher":
+ err = unpopulate(val, "Publisher", &v.Publisher)
+ delete(rawMsg, key)
+ case "settings":
+ err = unpopulate(val, "Settings", &v.Settings)
+ delete(rawMsg, key)
+ case "suppressFailures":
+ err = unpopulate(val, "SuppressFailures", &v.SuppressFailures)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ case "typeHandlerVersion":
+ err = unpopulate(val, "TypeHandlerVersion", &v.TypeHandlerVersion)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetExtensionUpdate.
+func (v VirtualMachineScaleSetExtensionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", v.ID)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "type", v.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetExtensionUpdate.
+func (v *VirtualMachineScaleSetExtensionUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &v.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetHardwareProfile.
+func (v VirtualMachineScaleSetHardwareProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "vmSizeProperties", v.VMSizeProperties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetHardwareProfile.
+func (v *VirtualMachineScaleSetHardwareProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "vmSizeProperties":
+ err = unpopulate(val, "VMSizeProperties", &v.VMSizeProperties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetIPConfiguration.
+func (v VirtualMachineScaleSetIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetIPConfiguration.
+func (v *VirtualMachineScaleSetIPConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetIPConfigurationProperties.
+func (v VirtualMachineScaleSetIPConfigurationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "applicationGatewayBackendAddressPools", v.ApplicationGatewayBackendAddressPools)
+ populate(objectMap, "applicationSecurityGroups", v.ApplicationSecurityGroups)
+ populate(objectMap, "loadBalancerBackendAddressPools", v.LoadBalancerBackendAddressPools)
+ populate(objectMap, "loadBalancerInboundNatPools", v.LoadBalancerInboundNatPools)
+ populate(objectMap, "primary", v.Primary)
+ populate(objectMap, "privateIPAddressVersion", v.PrivateIPAddressVersion)
+ populate(objectMap, "publicIPAddressConfiguration", v.PublicIPAddressConfiguration)
+ populate(objectMap, "subnet", v.Subnet)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetIPConfigurationProperties.
+func (v *VirtualMachineScaleSetIPConfigurationProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "applicationGatewayBackendAddressPools":
+ err = unpopulate(val, "ApplicationGatewayBackendAddressPools", &v.ApplicationGatewayBackendAddressPools)
+ delete(rawMsg, key)
+ case "applicationSecurityGroups":
+ err = unpopulate(val, "ApplicationSecurityGroups", &v.ApplicationSecurityGroups)
+ delete(rawMsg, key)
+ case "loadBalancerBackendAddressPools":
+ err = unpopulate(val, "LoadBalancerBackendAddressPools", &v.LoadBalancerBackendAddressPools)
+ delete(rawMsg, key)
+ case "loadBalancerInboundNatPools":
+ err = unpopulate(val, "LoadBalancerInboundNatPools", &v.LoadBalancerInboundNatPools)
+ delete(rawMsg, key)
+ case "primary":
+ err = unpopulate(val, "Primary", &v.Primary)
+ delete(rawMsg, key)
+ case "privateIPAddressVersion":
+ err = unpopulate(val, "PrivateIPAddressVersion", &v.PrivateIPAddressVersion)
+ delete(rawMsg, key)
+ case "publicIPAddressConfiguration":
+ err = unpopulate(val, "PublicIPAddressConfiguration", &v.PublicIPAddressConfiguration)
+ delete(rawMsg, key)
+ case "subnet":
+ err = unpopulate(val, "Subnet", &v.Subnet)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetIPTag.
+func (v VirtualMachineScaleSetIPTag) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "ipTagType", v.IPTagType)
+ populate(objectMap, "tag", v.Tag)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetIPTag.
+func (v *VirtualMachineScaleSetIPTag) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "ipTagType":
+ err = unpopulate(val, "IPTagType", &v.IPTagType)
+ delete(rawMsg, key)
+ case "tag":
+ err = unpopulate(val, "Tag", &v.Tag)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetIdentity.
+func (v VirtualMachineScaleSetIdentity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "principalId", v.PrincipalID)
+ populate(objectMap, "tenantId", v.TenantID)
+ populate(objectMap, "type", v.Type)
+ populate(objectMap, "userAssignedIdentities", v.UserAssignedIdentities)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetIdentity.
+func (v *VirtualMachineScaleSetIdentity) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "principalId":
+ err = unpopulate(val, "PrincipalID", &v.PrincipalID)
+ delete(rawMsg, key)
+ case "tenantId":
+ err = unpopulate(val, "TenantID", &v.TenantID)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ case "userAssignedIdentities":
+ err = unpopulate(val, "UserAssignedIdentities", &v.UserAssignedIdentities)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetInstanceView.
+func (v VirtualMachineScaleSetInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "extensions", v.Extensions)
+ populate(objectMap, "orchestrationServices", v.OrchestrationServices)
+ populate(objectMap, "statuses", v.Statuses)
+ populate(objectMap, "virtualMachine", v.VirtualMachine)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetInstanceView.
+func (v *VirtualMachineScaleSetInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "extensions":
+ err = unpopulate(val, "Extensions", &v.Extensions)
+ delete(rawMsg, key)
+ case "orchestrationServices":
+ err = unpopulate(val, "OrchestrationServices", &v.OrchestrationServices)
+ delete(rawMsg, key)
+ case "statuses":
+ err = unpopulate(val, "Statuses", &v.Statuses)
+ delete(rawMsg, key)
+ case "virtualMachine":
+ err = unpopulate(val, "VirtualMachine", &v.VirtualMachine)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetInstanceViewStatusesSummary.
+func (v VirtualMachineScaleSetInstanceViewStatusesSummary) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "statusesSummary", v.StatusesSummary)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetInstanceViewStatusesSummary.
+func (v *VirtualMachineScaleSetInstanceViewStatusesSummary) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "statusesSummary":
+ err = unpopulate(val, "StatusesSummary", &v.StatusesSummary)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetListOSUpgradeHistory.
+func (v VirtualMachineScaleSetListOSUpgradeHistory) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", v.NextLink)
+ populate(objectMap, "value", v.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetListOSUpgradeHistory.
+func (v *VirtualMachineScaleSetListOSUpgradeHistory) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &v.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &v.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetListResult.
+func (v VirtualMachineScaleSetListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", v.NextLink)
+ populate(objectMap, "value", v.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetListResult.
+func (v *VirtualMachineScaleSetListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &v.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &v.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetListSKUsResult.
+func (v VirtualMachineScaleSetListSKUsResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", v.NextLink)
+ populate(objectMap, "value", v.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetListSKUsResult.
+func (v *VirtualMachineScaleSetListSKUsResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &v.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &v.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetListWithLinkResult.
+func (v VirtualMachineScaleSetListWithLinkResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", v.NextLink)
+ populate(objectMap, "value", v.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetListWithLinkResult.
+func (v *VirtualMachineScaleSetListWithLinkResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &v.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &v.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetManagedDiskParameters.
+func (v VirtualMachineScaleSetManagedDiskParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "diskEncryptionSet", v.DiskEncryptionSet)
+ populate(objectMap, "securityProfile", v.SecurityProfile)
+ populate(objectMap, "storageAccountType", v.StorageAccountType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetManagedDiskParameters.
+func (v *VirtualMachineScaleSetManagedDiskParameters) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "diskEncryptionSet":
+ err = unpopulate(val, "DiskEncryptionSet", &v.DiskEncryptionSet)
+ delete(rawMsg, key)
+ case "securityProfile":
+ err = unpopulate(val, "SecurityProfile", &v.SecurityProfile)
+ delete(rawMsg, key)
+ case "storageAccountType":
+ err = unpopulate(val, "StorageAccountType", &v.StorageAccountType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetNetworkConfiguration.
+func (v VirtualMachineScaleSetNetworkConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetNetworkConfiguration.
+func (v *VirtualMachineScaleSetNetworkConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetNetworkConfigurationDNSSettings.
+func (v VirtualMachineScaleSetNetworkConfigurationDNSSettings) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dnsServers", v.DNSServers)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetNetworkConfigurationDNSSettings.
+func (v *VirtualMachineScaleSetNetworkConfigurationDNSSettings) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dnsServers":
+ err = unpopulate(val, "DNSServers", &v.DNSServers)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetNetworkConfigurationProperties.
+func (v VirtualMachineScaleSetNetworkConfigurationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "auxiliaryMode", v.AuxiliaryMode)
+ populate(objectMap, "auxiliarySku", v.AuxiliarySKU)
+ populate(objectMap, "dnsSettings", v.DNSSettings)
+ populate(objectMap, "deleteOption", v.DeleteOption)
+ populate(objectMap, "disableTcpStateTracking", v.DisableTCPStateTracking)
+ populate(objectMap, "enableAcceleratedNetworking", v.EnableAcceleratedNetworking)
+ populate(objectMap, "enableFpga", v.EnableFpga)
+ populate(objectMap, "enableIPForwarding", v.EnableIPForwarding)
+ populate(objectMap, "ipConfigurations", v.IPConfigurations)
+ populate(objectMap, "networkSecurityGroup", v.NetworkSecurityGroup)
+ populate(objectMap, "primary", v.Primary)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetNetworkConfigurationProperties.
+func (v *VirtualMachineScaleSetNetworkConfigurationProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "auxiliaryMode":
+ err = unpopulate(val, "AuxiliaryMode", &v.AuxiliaryMode)
+ delete(rawMsg, key)
+ case "auxiliarySku":
+ err = unpopulate(val, "AuxiliarySKU", &v.AuxiliarySKU)
+ delete(rawMsg, key)
+ case "dnsSettings":
+ err = unpopulate(val, "DNSSettings", &v.DNSSettings)
+ delete(rawMsg, key)
+ case "deleteOption":
+ err = unpopulate(val, "DeleteOption", &v.DeleteOption)
+ delete(rawMsg, key)
+ case "disableTcpStateTracking":
+ err = unpopulate(val, "DisableTCPStateTracking", &v.DisableTCPStateTracking)
+ delete(rawMsg, key)
+ case "enableAcceleratedNetworking":
+ err = unpopulate(val, "EnableAcceleratedNetworking", &v.EnableAcceleratedNetworking)
+ delete(rawMsg, key)
+ case "enableFpga":
+ err = unpopulate(val, "EnableFpga", &v.EnableFpga)
+ delete(rawMsg, key)
+ case "enableIPForwarding":
+ err = unpopulate(val, "EnableIPForwarding", &v.EnableIPForwarding)
+ delete(rawMsg, key)
+ case "ipConfigurations":
+ err = unpopulate(val, "IPConfigurations", &v.IPConfigurations)
+ delete(rawMsg, key)
+ case "networkSecurityGroup":
+ err = unpopulate(val, "NetworkSecurityGroup", &v.NetworkSecurityGroup)
+ delete(rawMsg, key)
+ case "primary":
+ err = unpopulate(val, "Primary", &v.Primary)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetNetworkProfile.
+func (v VirtualMachineScaleSetNetworkProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "healthProbe", v.HealthProbe)
+ populate(objectMap, "networkApiVersion", v.NetworkAPIVersion)
+ populate(objectMap, "networkInterfaceConfigurations", v.NetworkInterfaceConfigurations)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetNetworkProfile.
+func (v *VirtualMachineScaleSetNetworkProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "healthProbe":
+ err = unpopulate(val, "HealthProbe", &v.HealthProbe)
+ delete(rawMsg, key)
+ case "networkApiVersion":
+ err = unpopulate(val, "NetworkAPIVersion", &v.NetworkAPIVersion)
+ delete(rawMsg, key)
+ case "networkInterfaceConfigurations":
+ err = unpopulate(val, "NetworkInterfaceConfigurations", &v.NetworkInterfaceConfigurations)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetOSDisk.
+func (v VirtualMachineScaleSetOSDisk) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "caching", v.Caching)
+ populate(objectMap, "createOption", v.CreateOption)
+ populate(objectMap, "deleteOption", v.DeleteOption)
+ populate(objectMap, "diffDiskSettings", v.DiffDiskSettings)
+ populate(objectMap, "diskSizeGB", v.DiskSizeGB)
+ populate(objectMap, "image", v.Image)
+ populate(objectMap, "managedDisk", v.ManagedDisk)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "osType", v.OSType)
+ populate(objectMap, "vhdContainers", v.VhdContainers)
+ populate(objectMap, "writeAcceleratorEnabled", v.WriteAcceleratorEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetOSDisk.
+func (v *VirtualMachineScaleSetOSDisk) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "caching":
+ err = unpopulate(val, "Caching", &v.Caching)
+ delete(rawMsg, key)
+ case "createOption":
+ err = unpopulate(val, "CreateOption", &v.CreateOption)
+ delete(rawMsg, key)
+ case "deleteOption":
+ err = unpopulate(val, "DeleteOption", &v.DeleteOption)
+ delete(rawMsg, key)
+ case "diffDiskSettings":
+ err = unpopulate(val, "DiffDiskSettings", &v.DiffDiskSettings)
+ delete(rawMsg, key)
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &v.DiskSizeGB)
+ delete(rawMsg, key)
+ case "image":
+ err = unpopulate(val, "Image", &v.Image)
+ delete(rawMsg, key)
+ case "managedDisk":
+ err = unpopulate(val, "ManagedDisk", &v.ManagedDisk)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "osType":
+ err = unpopulate(val, "OSType", &v.OSType)
+ delete(rawMsg, key)
+ case "vhdContainers":
+ err = unpopulate(val, "VhdContainers", &v.VhdContainers)
+ delete(rawMsg, key)
+ case "writeAcceleratorEnabled":
+ err = unpopulate(val, "WriteAcceleratorEnabled", &v.WriteAcceleratorEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetOSProfile.
+func (v VirtualMachineScaleSetOSProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "adminPassword", v.AdminPassword)
+ populate(objectMap, "adminUsername", v.AdminUsername)
+ populate(objectMap, "allowExtensionOperations", v.AllowExtensionOperations)
+ populate(objectMap, "computerNamePrefix", v.ComputerNamePrefix)
+ populate(objectMap, "customData", v.CustomData)
+ populate(objectMap, "linuxConfiguration", v.LinuxConfiguration)
+ populate(objectMap, "requireGuestProvisionSignal", v.RequireGuestProvisionSignal)
+ populate(objectMap, "secrets", v.Secrets)
+ populate(objectMap, "windowsConfiguration", v.WindowsConfiguration)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetOSProfile.
+func (v *VirtualMachineScaleSetOSProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "adminPassword":
+ err = unpopulate(val, "AdminPassword", &v.AdminPassword)
+ delete(rawMsg, key)
+ case "adminUsername":
+ err = unpopulate(val, "AdminUsername", &v.AdminUsername)
+ delete(rawMsg, key)
+ case "allowExtensionOperations":
+ err = unpopulate(val, "AllowExtensionOperations", &v.AllowExtensionOperations)
+ delete(rawMsg, key)
+ case "computerNamePrefix":
+ err = unpopulate(val, "ComputerNamePrefix", &v.ComputerNamePrefix)
+ delete(rawMsg, key)
+ case "customData":
+ err = unpopulate(val, "CustomData", &v.CustomData)
+ delete(rawMsg, key)
+ case "linuxConfiguration":
+ err = unpopulate(val, "LinuxConfiguration", &v.LinuxConfiguration)
+ delete(rawMsg, key)
+ case "requireGuestProvisionSignal":
+ err = unpopulate(val, "RequireGuestProvisionSignal", &v.RequireGuestProvisionSignal)
+ delete(rawMsg, key)
+ case "secrets":
+ err = unpopulate(val, "Secrets", &v.Secrets)
+ delete(rawMsg, key)
+ case "windowsConfiguration":
+ err = unpopulate(val, "WindowsConfiguration", &v.WindowsConfiguration)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetProperties.
+func (v VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "additionalCapabilities", v.AdditionalCapabilities)
+ populate(objectMap, "automaticRepairsPolicy", v.AutomaticRepairsPolicy)
+ populate(objectMap, "constrainedMaximumCapacity", v.ConstrainedMaximumCapacity)
+ populate(objectMap, "doNotRunExtensionsOnOverprovisionedVMs", v.DoNotRunExtensionsOnOverprovisionedVMs)
+ populate(objectMap, "hostGroup", v.HostGroup)
+ populate(objectMap, "orchestrationMode", v.OrchestrationMode)
+ populate(objectMap, "overprovision", v.Overprovision)
+ populate(objectMap, "platformFaultDomainCount", v.PlatformFaultDomainCount)
+ populate(objectMap, "priorityMixPolicy", v.PriorityMixPolicy)
+ populate(objectMap, "provisioningState", v.ProvisioningState)
+ populate(objectMap, "proximityPlacementGroup", v.ProximityPlacementGroup)
+ populate(objectMap, "resiliencyPolicy", v.ResiliencyPolicy)
+ populate(objectMap, "scaleInPolicy", v.ScaleInPolicy)
+ populate(objectMap, "scheduledEventsPolicy", v.ScheduledEventsPolicy)
+ populate(objectMap, "singlePlacementGroup", v.SinglePlacementGroup)
+ populate(objectMap, "spotRestorePolicy", v.SpotRestorePolicy)
+ populateDateTimeRFC3339(objectMap, "timeCreated", v.TimeCreated)
+ populate(objectMap, "uniqueId", v.UniqueID)
+ populate(objectMap, "upgradePolicy", v.UpgradePolicy)
+ populate(objectMap, "virtualMachineProfile", v.VirtualMachineProfile)
+ populate(objectMap, "zoneBalance", v.ZoneBalance)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetProperties.
+func (v *VirtualMachineScaleSetProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "additionalCapabilities":
+ err = unpopulate(val, "AdditionalCapabilities", &v.AdditionalCapabilities)
+ delete(rawMsg, key)
+ case "automaticRepairsPolicy":
+ err = unpopulate(val, "AutomaticRepairsPolicy", &v.AutomaticRepairsPolicy)
+ delete(rawMsg, key)
+ case "constrainedMaximumCapacity":
+ err = unpopulate(val, "ConstrainedMaximumCapacity", &v.ConstrainedMaximumCapacity)
+ delete(rawMsg, key)
+ case "doNotRunExtensionsOnOverprovisionedVMs":
+ err = unpopulate(val, "DoNotRunExtensionsOnOverprovisionedVMs", &v.DoNotRunExtensionsOnOverprovisionedVMs)
+ delete(rawMsg, key)
+ case "hostGroup":
+ err = unpopulate(val, "HostGroup", &v.HostGroup)
+ delete(rawMsg, key)
+ case "orchestrationMode":
+ err = unpopulate(val, "OrchestrationMode", &v.OrchestrationMode)
+ delete(rawMsg, key)
+ case "overprovision":
+ err = unpopulate(val, "Overprovision", &v.Overprovision)
+ delete(rawMsg, key)
+ case "platformFaultDomainCount":
+ err = unpopulate(val, "PlatformFaultDomainCount", &v.PlatformFaultDomainCount)
+ delete(rawMsg, key)
+ case "priorityMixPolicy":
+ err = unpopulate(val, "PriorityMixPolicy", &v.PriorityMixPolicy)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &v.ProvisioningState)
+ delete(rawMsg, key)
+ case "proximityPlacementGroup":
+ err = unpopulate(val, "ProximityPlacementGroup", &v.ProximityPlacementGroup)
+ delete(rawMsg, key)
+ case "resiliencyPolicy":
+ err = unpopulate(val, "ResiliencyPolicy", &v.ResiliencyPolicy)
+ delete(rawMsg, key)
+ case "scaleInPolicy":
+ err = unpopulate(val, "ScaleInPolicy", &v.ScaleInPolicy)
+ delete(rawMsg, key)
+ case "scheduledEventsPolicy":
+ err = unpopulate(val, "ScheduledEventsPolicy", &v.ScheduledEventsPolicy)
+ delete(rawMsg, key)
+ case "singlePlacementGroup":
+ err = unpopulate(val, "SinglePlacementGroup", &v.SinglePlacementGroup)
+ delete(rawMsg, key)
+ case "spotRestorePolicy":
+ err = unpopulate(val, "SpotRestorePolicy", &v.SpotRestorePolicy)
+ delete(rawMsg, key)
+ case "timeCreated":
+ err = unpopulateDateTimeRFC3339(val, "TimeCreated", &v.TimeCreated)
+ delete(rawMsg, key)
+ case "uniqueId":
+ err = unpopulate(val, "UniqueID", &v.UniqueID)
+ delete(rawMsg, key)
+ case "upgradePolicy":
+ err = unpopulate(val, "UpgradePolicy", &v.UpgradePolicy)
+ delete(rawMsg, key)
+ case "virtualMachineProfile":
+ err = unpopulate(val, "VirtualMachineProfile", &v.VirtualMachineProfile)
+ delete(rawMsg, key)
+ case "zoneBalance":
+ err = unpopulate(val, "ZoneBalance", &v.ZoneBalance)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetPublicIPAddressConfiguration.
+func (v VirtualMachineScaleSetPublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "sku", v.SKU)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetPublicIPAddressConfiguration.
+func (v *VirtualMachineScaleSetPublicIPAddressConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &v.SKU)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings.
+func (v VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "domainNameLabel", v.DomainNameLabel)
+ populate(objectMap, "domainNameLabelScope", v.DomainNameLabelScope)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings.
+func (v *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "domainNameLabel":
+ err = unpopulate(val, "DomainNameLabel", &v.DomainNameLabel)
+ delete(rawMsg, key)
+ case "domainNameLabelScope":
+ err = unpopulate(val, "DomainNameLabelScope", &v.DomainNameLabelScope)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetPublicIPAddressConfigurationProperties.
+func (v VirtualMachineScaleSetPublicIPAddressConfigurationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dnsSettings", v.DNSSettings)
+ populate(objectMap, "deleteOption", v.DeleteOption)
+ populate(objectMap, "ipTags", v.IPTags)
+ populate(objectMap, "idleTimeoutInMinutes", v.IdleTimeoutInMinutes)
+ populate(objectMap, "publicIPAddressVersion", v.PublicIPAddressVersion)
+ populate(objectMap, "publicIPPrefix", v.PublicIPPrefix)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetPublicIPAddressConfigurationProperties.
+func (v *VirtualMachineScaleSetPublicIPAddressConfigurationProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dnsSettings":
+ err = unpopulate(val, "DNSSettings", &v.DNSSettings)
+ delete(rawMsg, key)
+ case "deleteOption":
+ err = unpopulate(val, "DeleteOption", &v.DeleteOption)
+ delete(rawMsg, key)
+ case "ipTags":
+ err = unpopulate(val, "IPTags", &v.IPTags)
+ delete(rawMsg, key)
+ case "idleTimeoutInMinutes":
+ err = unpopulate(val, "IdleTimeoutInMinutes", &v.IdleTimeoutInMinutes)
+ delete(rawMsg, key)
+ case "publicIPAddressVersion":
+ err = unpopulate(val, "PublicIPAddressVersion", &v.PublicIPAddressVersion)
+ delete(rawMsg, key)
+ case "publicIPPrefix":
+ err = unpopulate(val, "PublicIPPrefix", &v.PublicIPPrefix)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetReimageParameters.
+func (v VirtualMachineScaleSetReimageParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "exactVersion", v.ExactVersion)
+ populate(objectMap, "forceUpdateOSDiskForEphemeral", v.ForceUpdateOSDiskForEphemeral)
+ populate(objectMap, "instanceIds", v.InstanceIDs)
+ populate(objectMap, "osProfile", v.OSProfile)
+ populate(objectMap, "tempDisk", v.TempDisk)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetReimageParameters.
+func (v *VirtualMachineScaleSetReimageParameters) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "exactVersion":
+ err = unpopulate(val, "ExactVersion", &v.ExactVersion)
+ delete(rawMsg, key)
+ case "forceUpdateOSDiskForEphemeral":
+ err = unpopulate(val, "ForceUpdateOSDiskForEphemeral", &v.ForceUpdateOSDiskForEphemeral)
+ delete(rawMsg, key)
+ case "instanceIds":
+ err = unpopulate(val, "InstanceIDs", &v.InstanceIDs)
+ delete(rawMsg, key)
+ case "osProfile":
+ err = unpopulate(val, "OSProfile", &v.OSProfile)
+ delete(rawMsg, key)
+ case "tempDisk":
+ err = unpopulate(val, "TempDisk", &v.TempDisk)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetSKU.
+func (v VirtualMachineScaleSetSKU) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "capacity", v.Capacity)
+ populate(objectMap, "resourceType", v.ResourceType)
+ populate(objectMap, "sku", v.SKU)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetSKU.
+func (v *VirtualMachineScaleSetSKU) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "capacity":
+ err = unpopulate(val, "Capacity", &v.Capacity)
+ delete(rawMsg, key)
+ case "resourceType":
+ err = unpopulate(val, "ResourceType", &v.ResourceType)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &v.SKU)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetSKUCapacity.
+func (v VirtualMachineScaleSetSKUCapacity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "defaultCapacity", v.DefaultCapacity)
+ populate(objectMap, "maximum", v.Maximum)
+ populate(objectMap, "minimum", v.Minimum)
+ populate(objectMap, "scaleType", v.ScaleType)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetSKUCapacity.
+func (v *VirtualMachineScaleSetSKUCapacity) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "defaultCapacity":
+ err = unpopulate(val, "DefaultCapacity", &v.DefaultCapacity)
+ delete(rawMsg, key)
+ case "maximum":
+ err = unpopulate(val, "Maximum", &v.Maximum)
+ delete(rawMsg, key)
+ case "minimum":
+ err = unpopulate(val, "Minimum", &v.Minimum)
+ delete(rawMsg, key)
+ case "scaleType":
+ err = unpopulate(val, "ScaleType", &v.ScaleType)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetStorageProfile.
+func (v VirtualMachineScaleSetStorageProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dataDisks", v.DataDisks)
+ populate(objectMap, "diskControllerType", v.DiskControllerType)
+ populate(objectMap, "imageReference", v.ImageReference)
+ populate(objectMap, "osDisk", v.OSDisk)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetStorageProfile.
+func (v *VirtualMachineScaleSetStorageProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dataDisks":
+ err = unpopulate(val, "DataDisks", &v.DataDisks)
+ delete(rawMsg, key)
+ case "diskControllerType":
+ err = unpopulate(val, "DiskControllerType", &v.DiskControllerType)
+ delete(rawMsg, key)
+ case "imageReference":
+ err = unpopulate(val, "ImageReference", &v.ImageReference)
+ delete(rawMsg, key)
+ case "osDisk":
+ err = unpopulate(val, "OSDisk", &v.OSDisk)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdate.
+func (v VirtualMachineScaleSetUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "identity", v.Identity)
+ populate(objectMap, "plan", v.Plan)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "sku", v.SKU)
+ populate(objectMap, "tags", v.Tags)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetUpdate.
+func (v *VirtualMachineScaleSetUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "identity":
+ err = unpopulate(val, "Identity", &v.Identity)
+ delete(rawMsg, key)
+ case "plan":
+ err = unpopulate(val, "Plan", &v.Plan)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &v.SKU)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &v.Tags)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateIPConfiguration.
+func (v VirtualMachineScaleSetUpdateIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetUpdateIPConfiguration.
+func (v *VirtualMachineScaleSetUpdateIPConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateIPConfigurationProperties.
+func (v VirtualMachineScaleSetUpdateIPConfigurationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "applicationGatewayBackendAddressPools", v.ApplicationGatewayBackendAddressPools)
+ populate(objectMap, "applicationSecurityGroups", v.ApplicationSecurityGroups)
+ populate(objectMap, "loadBalancerBackendAddressPools", v.LoadBalancerBackendAddressPools)
+ populate(objectMap, "loadBalancerInboundNatPools", v.LoadBalancerInboundNatPools)
+ populate(objectMap, "primary", v.Primary)
+ populate(objectMap, "privateIPAddressVersion", v.PrivateIPAddressVersion)
+ populate(objectMap, "publicIPAddressConfiguration", v.PublicIPAddressConfiguration)
+ populate(objectMap, "subnet", v.Subnet)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetUpdateIPConfigurationProperties.
+func (v *VirtualMachineScaleSetUpdateIPConfigurationProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "applicationGatewayBackendAddressPools":
+ err = unpopulate(val, "ApplicationGatewayBackendAddressPools", &v.ApplicationGatewayBackendAddressPools)
+ delete(rawMsg, key)
+ case "applicationSecurityGroups":
+ err = unpopulate(val, "ApplicationSecurityGroups", &v.ApplicationSecurityGroups)
+ delete(rawMsg, key)
+ case "loadBalancerBackendAddressPools":
+ err = unpopulate(val, "LoadBalancerBackendAddressPools", &v.LoadBalancerBackendAddressPools)
+ delete(rawMsg, key)
+ case "loadBalancerInboundNatPools":
+ err = unpopulate(val, "LoadBalancerInboundNatPools", &v.LoadBalancerInboundNatPools)
+ delete(rawMsg, key)
+ case "primary":
+ err = unpopulate(val, "Primary", &v.Primary)
+ delete(rawMsg, key)
+ case "privateIPAddressVersion":
+ err = unpopulate(val, "PrivateIPAddressVersion", &v.PrivateIPAddressVersion)
+ delete(rawMsg, key)
+ case "publicIPAddressConfiguration":
+ err = unpopulate(val, "PublicIPAddressConfiguration", &v.PublicIPAddressConfiguration)
+ delete(rawMsg, key)
+ case "subnet":
+ err = unpopulate(val, "Subnet", &v.Subnet)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateNetworkConfiguration.
+func (v VirtualMachineScaleSetUpdateNetworkConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetUpdateNetworkConfiguration.
+func (v *VirtualMachineScaleSetUpdateNetworkConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateNetworkConfigurationProperties.
+func (v VirtualMachineScaleSetUpdateNetworkConfigurationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "auxiliaryMode", v.AuxiliaryMode)
+ populate(objectMap, "auxiliarySku", v.AuxiliarySKU)
+ populate(objectMap, "dnsSettings", v.DNSSettings)
+ populate(objectMap, "deleteOption", v.DeleteOption)
+ populate(objectMap, "disableTcpStateTracking", v.DisableTCPStateTracking)
+ populate(objectMap, "enableAcceleratedNetworking", v.EnableAcceleratedNetworking)
+ populate(objectMap, "enableFpga", v.EnableFpga)
+ populate(objectMap, "enableIPForwarding", v.EnableIPForwarding)
+ populate(objectMap, "ipConfigurations", v.IPConfigurations)
+ populate(objectMap, "networkSecurityGroup", v.NetworkSecurityGroup)
+ populate(objectMap, "primary", v.Primary)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetUpdateNetworkConfigurationProperties.
+func (v *VirtualMachineScaleSetUpdateNetworkConfigurationProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "auxiliaryMode":
+ err = unpopulate(val, "AuxiliaryMode", &v.AuxiliaryMode)
+ delete(rawMsg, key)
+ case "auxiliarySku":
+ err = unpopulate(val, "AuxiliarySKU", &v.AuxiliarySKU)
+ delete(rawMsg, key)
+ case "dnsSettings":
+ err = unpopulate(val, "DNSSettings", &v.DNSSettings)
+ delete(rawMsg, key)
+ case "deleteOption":
+ err = unpopulate(val, "DeleteOption", &v.DeleteOption)
+ delete(rawMsg, key)
+ case "disableTcpStateTracking":
+ err = unpopulate(val, "DisableTCPStateTracking", &v.DisableTCPStateTracking)
+ delete(rawMsg, key)
+ case "enableAcceleratedNetworking":
+ err = unpopulate(val, "EnableAcceleratedNetworking", &v.EnableAcceleratedNetworking)
+ delete(rawMsg, key)
+ case "enableFpga":
+ err = unpopulate(val, "EnableFpga", &v.EnableFpga)
+ delete(rawMsg, key)
+ case "enableIPForwarding":
+ err = unpopulate(val, "EnableIPForwarding", &v.EnableIPForwarding)
+ delete(rawMsg, key)
+ case "ipConfigurations":
+ err = unpopulate(val, "IPConfigurations", &v.IPConfigurations)
+ delete(rawMsg, key)
+ case "networkSecurityGroup":
+ err = unpopulate(val, "NetworkSecurityGroup", &v.NetworkSecurityGroup)
+ delete(rawMsg, key)
+ case "primary":
+ err = unpopulate(val, "Primary", &v.Primary)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateNetworkProfile.
+func (v VirtualMachineScaleSetUpdateNetworkProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "healthProbe", v.HealthProbe)
+ populate(objectMap, "networkApiVersion", v.NetworkAPIVersion)
+ populate(objectMap, "networkInterfaceConfigurations", v.NetworkInterfaceConfigurations)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetUpdateNetworkProfile.
+func (v *VirtualMachineScaleSetUpdateNetworkProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "healthProbe":
+ err = unpopulate(val, "HealthProbe", &v.HealthProbe)
+ delete(rawMsg, key)
+ case "networkApiVersion":
+ err = unpopulate(val, "NetworkAPIVersion", &v.NetworkAPIVersion)
+ delete(rawMsg, key)
+ case "networkInterfaceConfigurations":
+ err = unpopulate(val, "NetworkInterfaceConfigurations", &v.NetworkInterfaceConfigurations)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateOSDisk.
+func (v VirtualMachineScaleSetUpdateOSDisk) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "caching", v.Caching)
+ populate(objectMap, "deleteOption", v.DeleteOption)
+ populate(objectMap, "diffDiskSettings", v.DiffDiskSettings)
+ populate(objectMap, "diskSizeGB", v.DiskSizeGB)
+ populate(objectMap, "image", v.Image)
+ populate(objectMap, "managedDisk", v.ManagedDisk)
+ populate(objectMap, "vhdContainers", v.VhdContainers)
+ populate(objectMap, "writeAcceleratorEnabled", v.WriteAcceleratorEnabled)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetUpdateOSDisk.
+func (v *VirtualMachineScaleSetUpdateOSDisk) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "caching":
+ err = unpopulate(val, "Caching", &v.Caching)
+ delete(rawMsg, key)
+ case "deleteOption":
+ err = unpopulate(val, "DeleteOption", &v.DeleteOption)
+ delete(rawMsg, key)
+ case "diffDiskSettings":
+ err = unpopulate(val, "DiffDiskSettings", &v.DiffDiskSettings)
+ delete(rawMsg, key)
+ case "diskSizeGB":
+ err = unpopulate(val, "DiskSizeGB", &v.DiskSizeGB)
+ delete(rawMsg, key)
+ case "image":
+ err = unpopulate(val, "Image", &v.Image)
+ delete(rawMsg, key)
+ case "managedDisk":
+ err = unpopulate(val, "ManagedDisk", &v.ManagedDisk)
+ delete(rawMsg, key)
+ case "vhdContainers":
+ err = unpopulate(val, "VhdContainers", &v.VhdContainers)
+ delete(rawMsg, key)
+ case "writeAcceleratorEnabled":
+ err = unpopulate(val, "WriteAcceleratorEnabled", &v.WriteAcceleratorEnabled)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateOSProfile.
+func (v VirtualMachineScaleSetUpdateOSProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "customData", v.CustomData)
+ populate(objectMap, "linuxConfiguration", v.LinuxConfiguration)
+ populate(objectMap, "secrets", v.Secrets)
+ populate(objectMap, "windowsConfiguration", v.WindowsConfiguration)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetUpdateOSProfile.
+func (v *VirtualMachineScaleSetUpdateOSProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "customData":
+ err = unpopulate(val, "CustomData", &v.CustomData)
+ delete(rawMsg, key)
+ case "linuxConfiguration":
+ err = unpopulate(val, "LinuxConfiguration", &v.LinuxConfiguration)
+ delete(rawMsg, key)
+ case "secrets":
+ err = unpopulate(val, "Secrets", &v.Secrets)
+ delete(rawMsg, key)
+ case "windowsConfiguration":
+ err = unpopulate(val, "WindowsConfiguration", &v.WindowsConfiguration)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateProperties.
+func (v VirtualMachineScaleSetUpdateProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "additionalCapabilities", v.AdditionalCapabilities)
+ populate(objectMap, "automaticRepairsPolicy", v.AutomaticRepairsPolicy)
+ populate(objectMap, "doNotRunExtensionsOnOverprovisionedVMs", v.DoNotRunExtensionsOnOverprovisionedVMs)
+ populate(objectMap, "overprovision", v.Overprovision)
+ populate(objectMap, "priorityMixPolicy", v.PriorityMixPolicy)
+ populate(objectMap, "proximityPlacementGroup", v.ProximityPlacementGroup)
+ populate(objectMap, "resiliencyPolicy", v.ResiliencyPolicy)
+ populate(objectMap, "scaleInPolicy", v.ScaleInPolicy)
+ populate(objectMap, "singlePlacementGroup", v.SinglePlacementGroup)
+ populate(objectMap, "spotRestorePolicy", v.SpotRestorePolicy)
+ populate(objectMap, "upgradePolicy", v.UpgradePolicy)
+ populate(objectMap, "virtualMachineProfile", v.VirtualMachineProfile)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetUpdateProperties.
+func (v *VirtualMachineScaleSetUpdateProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "additionalCapabilities":
+ err = unpopulate(val, "AdditionalCapabilities", &v.AdditionalCapabilities)
+ delete(rawMsg, key)
+ case "automaticRepairsPolicy":
+ err = unpopulate(val, "AutomaticRepairsPolicy", &v.AutomaticRepairsPolicy)
+ delete(rawMsg, key)
+ case "doNotRunExtensionsOnOverprovisionedVMs":
+ err = unpopulate(val, "DoNotRunExtensionsOnOverprovisionedVMs", &v.DoNotRunExtensionsOnOverprovisionedVMs)
+ delete(rawMsg, key)
+ case "overprovision":
+ err = unpopulate(val, "Overprovision", &v.Overprovision)
+ delete(rawMsg, key)
+ case "priorityMixPolicy":
+ err = unpopulate(val, "PriorityMixPolicy", &v.PriorityMixPolicy)
+ delete(rawMsg, key)
+ case "proximityPlacementGroup":
+ err = unpopulate(val, "ProximityPlacementGroup", &v.ProximityPlacementGroup)
+ delete(rawMsg, key)
+ case "resiliencyPolicy":
+ err = unpopulate(val, "ResiliencyPolicy", &v.ResiliencyPolicy)
+ delete(rawMsg, key)
+ case "scaleInPolicy":
+ err = unpopulate(val, "ScaleInPolicy", &v.ScaleInPolicy)
+ delete(rawMsg, key)
+ case "singlePlacementGroup":
+ err = unpopulate(val, "SinglePlacementGroup", &v.SinglePlacementGroup)
+ delete(rawMsg, key)
+ case "spotRestorePolicy":
+ err = unpopulate(val, "SpotRestorePolicy", &v.SpotRestorePolicy)
+ delete(rawMsg, key)
+ case "upgradePolicy":
+ err = unpopulate(val, "UpgradePolicy", &v.UpgradePolicy)
+ delete(rawMsg, key)
+ case "virtualMachineProfile":
+ err = unpopulate(val, "VirtualMachineProfile", &v.VirtualMachineProfile)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.
+func (v VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.
+func (v *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties.
+func (v VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dnsSettings", v.DNSSettings)
+ populate(objectMap, "deleteOption", v.DeleteOption)
+ populate(objectMap, "idleTimeoutInMinutes", v.IdleTimeoutInMinutes)
+ populate(objectMap, "publicIPPrefix", v.PublicIPPrefix)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties.
+func (v *VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dnsSettings":
+ err = unpopulate(val, "DNSSettings", &v.DNSSettings)
+ delete(rawMsg, key)
+ case "deleteOption":
+ err = unpopulate(val, "DeleteOption", &v.DeleteOption)
+ delete(rawMsg, key)
+ case "idleTimeoutInMinutes":
+ err = unpopulate(val, "IdleTimeoutInMinutes", &v.IdleTimeoutInMinutes)
+ delete(rawMsg, key)
+ case "publicIPPrefix":
+ err = unpopulate(val, "PublicIPPrefix", &v.PublicIPPrefix)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateStorageProfile.
+func (v VirtualMachineScaleSetUpdateStorageProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "dataDisks", v.DataDisks)
+ populate(objectMap, "diskControllerType", v.DiskControllerType)
+ populate(objectMap, "imageReference", v.ImageReference)
+ populate(objectMap, "osDisk", v.OSDisk)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetUpdateStorageProfile.
+func (v *VirtualMachineScaleSetUpdateStorageProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "dataDisks":
+ err = unpopulate(val, "DataDisks", &v.DataDisks)
+ delete(rawMsg, key)
+ case "diskControllerType":
+ err = unpopulate(val, "DiskControllerType", &v.DiskControllerType)
+ delete(rawMsg, key)
+ case "imageReference":
+ err = unpopulate(val, "ImageReference", &v.ImageReference)
+ delete(rawMsg, key)
+ case "osDisk":
+ err = unpopulate(val, "OSDisk", &v.OSDisk)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetUpdateVMProfile.
+func (v VirtualMachineScaleSetUpdateVMProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "billingProfile", v.BillingProfile)
+ populate(objectMap, "diagnosticsProfile", v.DiagnosticsProfile)
+ populate(objectMap, "extensionProfile", v.ExtensionProfile)
+ populate(objectMap, "hardwareProfile", v.HardwareProfile)
+ populate(objectMap, "licenseType", v.LicenseType)
+ populate(objectMap, "networkProfile", v.NetworkProfile)
+ populate(objectMap, "osProfile", v.OSProfile)
+ populate(objectMap, "scheduledEventsProfile", v.ScheduledEventsProfile)
+ populate(objectMap, "securityPostureReference", v.SecurityPostureReference)
+ populate(objectMap, "securityProfile", v.SecurityProfile)
+ populate(objectMap, "storageProfile", v.StorageProfile)
+ populate(objectMap, "userData", v.UserData)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetUpdateVMProfile.
+func (v *VirtualMachineScaleSetUpdateVMProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "billingProfile":
+ err = unpopulate(val, "BillingProfile", &v.BillingProfile)
+ delete(rawMsg, key)
+ case "diagnosticsProfile":
+ err = unpopulate(val, "DiagnosticsProfile", &v.DiagnosticsProfile)
+ delete(rawMsg, key)
+ case "extensionProfile":
+ err = unpopulate(val, "ExtensionProfile", &v.ExtensionProfile)
+ delete(rawMsg, key)
+ case "hardwareProfile":
+ err = unpopulate(val, "HardwareProfile", &v.HardwareProfile)
+ delete(rawMsg, key)
+ case "licenseType":
+ err = unpopulate(val, "LicenseType", &v.LicenseType)
+ delete(rawMsg, key)
+ case "networkProfile":
+ err = unpopulate(val, "NetworkProfile", &v.NetworkProfile)
+ delete(rawMsg, key)
+ case "osProfile":
+ err = unpopulate(val, "OSProfile", &v.OSProfile)
+ delete(rawMsg, key)
+ case "scheduledEventsProfile":
+ err = unpopulate(val, "ScheduledEventsProfile", &v.ScheduledEventsProfile)
+ delete(rawMsg, key)
+ case "securityPostureReference":
+ err = unpopulate(val, "SecurityPostureReference", &v.SecurityPostureReference)
+ delete(rawMsg, key)
+ case "securityProfile":
+ err = unpopulate(val, "SecurityProfile", &v.SecurityProfile)
+ delete(rawMsg, key)
+ case "storageProfile":
+ err = unpopulate(val, "StorageProfile", &v.StorageProfile)
+ delete(rawMsg, key)
+ case "userData":
+ err = unpopulate(val, "UserData", &v.UserData)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVM.
+func (v VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "etag", v.Etag)
+ populate(objectMap, "id", v.ID)
+ populate(objectMap, "identity", v.Identity)
+ populate(objectMap, "instanceId", v.InstanceID)
+ populate(objectMap, "location", v.Location)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "plan", v.Plan)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "resources", v.Resources)
+ populate(objectMap, "sku", v.SKU)
+ populate(objectMap, "tags", v.Tags)
+ populate(objectMap, "type", v.Type)
+ populate(objectMap, "zones", v.Zones)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetVM.
+func (v *VirtualMachineScaleSetVM) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "etag":
+ err = unpopulate(val, "Etag", &v.Etag)
+ delete(rawMsg, key)
+ case "id":
+ err = unpopulate(val, "ID", &v.ID)
+ delete(rawMsg, key)
+ case "identity":
+ err = unpopulate(val, "Identity", &v.Identity)
+ delete(rawMsg, key)
+ case "instanceId":
+ err = unpopulate(val, "InstanceID", &v.InstanceID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &v.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "plan":
+ err = unpopulate(val, "Plan", &v.Plan)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "resources":
+ err = unpopulate(val, "Resources", &v.Resources)
+ delete(rawMsg, key)
+ case "sku":
+ err = unpopulate(val, "SKU", &v.SKU)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &v.Tags)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ case "zones":
+ err = unpopulate(val, "Zones", &v.Zones)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMExtension.
+func (v VirtualMachineScaleSetVMExtension) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", v.ID)
+ populate(objectMap, "location", v.Location)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "type", v.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetVMExtension.
+func (v *VirtualMachineScaleSetVMExtension) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &v.ID)
+ delete(rawMsg, key)
+ case "location":
+ err = unpopulate(val, "Location", &v.Location)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMExtensionUpdate.
+func (v VirtualMachineScaleSetVMExtensionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "id", v.ID)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "type", v.Type)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetVMExtensionUpdate.
+func (v *VirtualMachineScaleSetVMExtensionUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "id":
+ err = unpopulate(val, "ID", &v.ID)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "type":
+ err = unpopulate(val, "Type", &v.Type)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMExtensionsListResult.
+func (v VirtualMachineScaleSetVMExtensionsListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "value", v.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetVMExtensionsListResult.
+func (v *VirtualMachineScaleSetVMExtensionsListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "value":
+ err = unpopulate(val, "Value", &v.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMExtensionsSummary.
+func (v VirtualMachineScaleSetVMExtensionsSummary) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "statusesSummary", v.StatusesSummary)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetVMExtensionsSummary.
+func (v *VirtualMachineScaleSetVMExtensionsSummary) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "statusesSummary":
+ err = unpopulate(val, "StatusesSummary", &v.StatusesSummary)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMInstanceIDs.
+func (v VirtualMachineScaleSetVMInstanceIDs) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "instanceIds", v.InstanceIDs)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetVMInstanceIDs.
+func (v *VirtualMachineScaleSetVMInstanceIDs) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "instanceIds":
+ err = unpopulate(val, "InstanceIDs", &v.InstanceIDs)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMInstanceRequiredIDs.
+func (v VirtualMachineScaleSetVMInstanceRequiredIDs) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "instanceIds", v.InstanceIDs)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetVMInstanceRequiredIDs.
+func (v *VirtualMachineScaleSetVMInstanceRequiredIDs) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "instanceIds":
+ err = unpopulate(val, "InstanceIDs", &v.InstanceIDs)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMInstanceView.
+func (v VirtualMachineScaleSetVMInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "assignedHost", v.AssignedHost)
+ populate(objectMap, "bootDiagnostics", v.BootDiagnostics)
+ populate(objectMap, "computerName", v.ComputerName)
+ populate(objectMap, "disks", v.Disks)
+ populate(objectMap, "extensions", v.Extensions)
+ populate(objectMap, "hyperVGeneration", v.HyperVGeneration)
+ populate(objectMap, "maintenanceRedeployStatus", v.MaintenanceRedeployStatus)
+ populate(objectMap, "osName", v.OSName)
+ populate(objectMap, "osVersion", v.OSVersion)
+ populate(objectMap, "placementGroupId", v.PlacementGroupID)
+ populate(objectMap, "platformFaultDomain", v.PlatformFaultDomain)
+ populate(objectMap, "platformUpdateDomain", v.PlatformUpdateDomain)
+ populate(objectMap, "rdpThumbPrint", v.RdpThumbPrint)
+ populate(objectMap, "statuses", v.Statuses)
+ populate(objectMap, "vmAgent", v.VMAgent)
+ populate(objectMap, "vmHealth", v.VMHealth)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetVMInstanceView.
+func (v *VirtualMachineScaleSetVMInstanceView) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "assignedHost":
+ err = unpopulate(val, "AssignedHost", &v.AssignedHost)
+ delete(rawMsg, key)
+ case "bootDiagnostics":
+ err = unpopulate(val, "BootDiagnostics", &v.BootDiagnostics)
+ delete(rawMsg, key)
+ case "computerName":
+ err = unpopulate(val, "ComputerName", &v.ComputerName)
+ delete(rawMsg, key)
+ case "disks":
+ err = unpopulate(val, "Disks", &v.Disks)
+ delete(rawMsg, key)
+ case "extensions":
+ err = unpopulate(val, "Extensions", &v.Extensions)
+ delete(rawMsg, key)
+ case "hyperVGeneration":
+ err = unpopulate(val, "HyperVGeneration", &v.HyperVGeneration)
+ delete(rawMsg, key)
+ case "maintenanceRedeployStatus":
+ err = unpopulate(val, "MaintenanceRedeployStatus", &v.MaintenanceRedeployStatus)
+ delete(rawMsg, key)
+ case "osName":
+ err = unpopulate(val, "OSName", &v.OSName)
+ delete(rawMsg, key)
+ case "osVersion":
+ err = unpopulate(val, "OSVersion", &v.OSVersion)
+ delete(rawMsg, key)
+ case "placementGroupId":
+ err = unpopulate(val, "PlacementGroupID", &v.PlacementGroupID)
+ delete(rawMsg, key)
+ case "platformFaultDomain":
+ err = unpopulate(val, "PlatformFaultDomain", &v.PlatformFaultDomain)
+ delete(rawMsg, key)
+ case "platformUpdateDomain":
+ err = unpopulate(val, "PlatformUpdateDomain", &v.PlatformUpdateDomain)
+ delete(rawMsg, key)
+ case "rdpThumbPrint":
+ err = unpopulate(val, "RdpThumbPrint", &v.RdpThumbPrint)
+ delete(rawMsg, key)
+ case "statuses":
+ err = unpopulate(val, "Statuses", &v.Statuses)
+ delete(rawMsg, key)
+ case "vmAgent":
+ err = unpopulate(val, "VMAgent", &v.VMAgent)
+ delete(rawMsg, key)
+ case "vmHealth":
+ err = unpopulate(val, "VMHealth", &v.VMHealth)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMListResult.
+func (v VirtualMachineScaleSetVMListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "nextLink", v.NextLink)
+ populate(objectMap, "value", v.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetVMListResult.
+func (v *VirtualMachineScaleSetVMListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "nextLink":
+ err = unpopulate(val, "NextLink", &v.NextLink)
+ delete(rawMsg, key)
+ case "value":
+ err = unpopulate(val, "Value", &v.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMNetworkProfileConfiguration.
+func (v VirtualMachineScaleSetVMNetworkProfileConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "networkInterfaceConfigurations", v.NetworkInterfaceConfigurations)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetVMNetworkProfileConfiguration.
+func (v *VirtualMachineScaleSetVMNetworkProfileConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "networkInterfaceConfigurations":
+ err = unpopulate(val, "NetworkInterfaceConfigurations", &v.NetworkInterfaceConfigurations)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMProfile.
+func (v VirtualMachineScaleSetVMProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "applicationProfile", v.ApplicationProfile)
+ populate(objectMap, "billingProfile", v.BillingProfile)
+ populate(objectMap, "capacityReservation", v.CapacityReservation)
+ populate(objectMap, "diagnosticsProfile", v.DiagnosticsProfile)
+ populate(objectMap, "evictionPolicy", v.EvictionPolicy)
+ populate(objectMap, "extensionProfile", v.ExtensionProfile)
+ populate(objectMap, "hardwareProfile", v.HardwareProfile)
+ populate(objectMap, "licenseType", v.LicenseType)
+ populate(objectMap, "networkProfile", v.NetworkProfile)
+ populate(objectMap, "osProfile", v.OSProfile)
+ populate(objectMap, "priority", v.Priority)
+ populate(objectMap, "scheduledEventsProfile", v.ScheduledEventsProfile)
+ populate(objectMap, "securityPostureReference", v.SecurityPostureReference)
+ populate(objectMap, "securityProfile", v.SecurityProfile)
+ populate(objectMap, "serviceArtifactReference", v.ServiceArtifactReference)
+ populate(objectMap, "storageProfile", v.StorageProfile)
+ populateDateTimeRFC3339(objectMap, "timeCreated", v.TimeCreated)
+ populate(objectMap, "userData", v.UserData)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetVMProfile.
+func (v *VirtualMachineScaleSetVMProfile) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "applicationProfile":
+ err = unpopulate(val, "ApplicationProfile", &v.ApplicationProfile)
+ delete(rawMsg, key)
+ case "billingProfile":
+ err = unpopulate(val, "BillingProfile", &v.BillingProfile)
+ delete(rawMsg, key)
+ case "capacityReservation":
+ err = unpopulate(val, "CapacityReservation", &v.CapacityReservation)
+ delete(rawMsg, key)
+ case "diagnosticsProfile":
+ err = unpopulate(val, "DiagnosticsProfile", &v.DiagnosticsProfile)
+ delete(rawMsg, key)
+ case "evictionPolicy":
+ err = unpopulate(val, "EvictionPolicy", &v.EvictionPolicy)
+ delete(rawMsg, key)
+ case "extensionProfile":
+ err = unpopulate(val, "ExtensionProfile", &v.ExtensionProfile)
+ delete(rawMsg, key)
+ case "hardwareProfile":
+ err = unpopulate(val, "HardwareProfile", &v.HardwareProfile)
+ delete(rawMsg, key)
+ case "licenseType":
+ err = unpopulate(val, "LicenseType", &v.LicenseType)
+ delete(rawMsg, key)
+ case "networkProfile":
+ err = unpopulate(val, "NetworkProfile", &v.NetworkProfile)
+ delete(rawMsg, key)
+ case "osProfile":
+ err = unpopulate(val, "OSProfile", &v.OSProfile)
+ delete(rawMsg, key)
+ case "priority":
+ err = unpopulate(val, "Priority", &v.Priority)
+ delete(rawMsg, key)
+ case "scheduledEventsProfile":
+ err = unpopulate(val, "ScheduledEventsProfile", &v.ScheduledEventsProfile)
+ delete(rawMsg, key)
+ case "securityPostureReference":
+ err = unpopulate(val, "SecurityPostureReference", &v.SecurityPostureReference)
+ delete(rawMsg, key)
+ case "securityProfile":
+ err = unpopulate(val, "SecurityProfile", &v.SecurityProfile)
+ delete(rawMsg, key)
+ case "serviceArtifactReference":
+ err = unpopulate(val, "ServiceArtifactReference", &v.ServiceArtifactReference)
+ delete(rawMsg, key)
+ case "storageProfile":
+ err = unpopulate(val, "StorageProfile", &v.StorageProfile)
+ delete(rawMsg, key)
+ case "timeCreated":
+ err = unpopulateDateTimeRFC3339(val, "TimeCreated", &v.TimeCreated)
+ delete(rawMsg, key)
+ case "userData":
+ err = unpopulate(val, "UserData", &v.UserData)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMProperties.
+func (v VirtualMachineScaleSetVMProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "additionalCapabilities", v.AdditionalCapabilities)
+ populate(objectMap, "availabilitySet", v.AvailabilitySet)
+ populate(objectMap, "diagnosticsProfile", v.DiagnosticsProfile)
+ populate(objectMap, "hardwareProfile", v.HardwareProfile)
+ populate(objectMap, "instanceView", v.InstanceView)
+ populate(objectMap, "latestModelApplied", v.LatestModelApplied)
+ populate(objectMap, "licenseType", v.LicenseType)
+ populate(objectMap, "modelDefinitionApplied", v.ModelDefinitionApplied)
+ populate(objectMap, "networkProfile", v.NetworkProfile)
+ populate(objectMap, "networkProfileConfiguration", v.NetworkProfileConfiguration)
+ populate(objectMap, "osProfile", v.OSProfile)
+ populate(objectMap, "protectionPolicy", v.ProtectionPolicy)
+ populate(objectMap, "provisioningState", v.ProvisioningState)
+ populate(objectMap, "securityProfile", v.SecurityProfile)
+ populate(objectMap, "storageProfile", v.StorageProfile)
+ populateDateTimeRFC3339(objectMap, "timeCreated", v.TimeCreated)
+ populate(objectMap, "userData", v.UserData)
+ populate(objectMap, "vmId", v.VMID)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetVMProperties.
+func (v *VirtualMachineScaleSetVMProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "additionalCapabilities":
+ err = unpopulate(val, "AdditionalCapabilities", &v.AdditionalCapabilities)
+ delete(rawMsg, key)
+ case "availabilitySet":
+ err = unpopulate(val, "AvailabilitySet", &v.AvailabilitySet)
+ delete(rawMsg, key)
+ case "diagnosticsProfile":
+ err = unpopulate(val, "DiagnosticsProfile", &v.DiagnosticsProfile)
+ delete(rawMsg, key)
+ case "hardwareProfile":
+ err = unpopulate(val, "HardwareProfile", &v.HardwareProfile)
+ delete(rawMsg, key)
+ case "instanceView":
+ err = unpopulate(val, "InstanceView", &v.InstanceView)
+ delete(rawMsg, key)
+ case "latestModelApplied":
+ err = unpopulate(val, "LatestModelApplied", &v.LatestModelApplied)
+ delete(rawMsg, key)
+ case "licenseType":
+ err = unpopulate(val, "LicenseType", &v.LicenseType)
+ delete(rawMsg, key)
+ case "modelDefinitionApplied":
+ err = unpopulate(val, "ModelDefinitionApplied", &v.ModelDefinitionApplied)
+ delete(rawMsg, key)
+ case "networkProfile":
+ err = unpopulate(val, "NetworkProfile", &v.NetworkProfile)
+ delete(rawMsg, key)
+ case "networkProfileConfiguration":
+ err = unpopulate(val, "NetworkProfileConfiguration", &v.NetworkProfileConfiguration)
+ delete(rawMsg, key)
+ case "osProfile":
+ err = unpopulate(val, "OSProfile", &v.OSProfile)
+ delete(rawMsg, key)
+ case "protectionPolicy":
+ err = unpopulate(val, "ProtectionPolicy", &v.ProtectionPolicy)
+ delete(rawMsg, key)
+ case "provisioningState":
+ err = unpopulate(val, "ProvisioningState", &v.ProvisioningState)
+ delete(rawMsg, key)
+ case "securityProfile":
+ err = unpopulate(val, "SecurityProfile", &v.SecurityProfile)
+ delete(rawMsg, key)
+ case "storageProfile":
+ err = unpopulate(val, "StorageProfile", &v.StorageProfile)
+ delete(rawMsg, key)
+ case "timeCreated":
+ err = unpopulateDateTimeRFC3339(val, "TimeCreated", &v.TimeCreated)
+ delete(rawMsg, key)
+ case "userData":
+ err = unpopulate(val, "UserData", &v.UserData)
+ delete(rawMsg, key)
+ case "vmId":
+ err = unpopulate(val, "VMID", &v.VMID)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMProtectionPolicy.
+func (v VirtualMachineScaleSetVMProtectionPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "protectFromScaleIn", v.ProtectFromScaleIn)
+ populate(objectMap, "protectFromScaleSetActions", v.ProtectFromScaleSetActions)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetVMProtectionPolicy.
+func (v *VirtualMachineScaleSetVMProtectionPolicy) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "protectFromScaleIn":
+ err = unpopulate(val, "ProtectFromScaleIn", &v.ProtectFromScaleIn)
+ delete(rawMsg, key)
+ case "protectFromScaleSetActions":
+ err = unpopulate(val, "ProtectFromScaleSetActions", &v.ProtectFromScaleSetActions)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineScaleSetVMReimageParameters.
+func (v VirtualMachineScaleSetVMReimageParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "exactVersion", v.ExactVersion)
+ populate(objectMap, "forceUpdateOSDiskForEphemeral", v.ForceUpdateOSDiskForEphemeral)
+ populate(objectMap, "osProfile", v.OSProfile)
+ populate(objectMap, "tempDisk", v.TempDisk)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineScaleSetVMReimageParameters.
+func (v *VirtualMachineScaleSetVMReimageParameters) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "exactVersion":
+ err = unpopulate(val, "ExactVersion", &v.ExactVersion)
+ delete(rawMsg, key)
+ case "forceUpdateOSDiskForEphemeral":
+ err = unpopulate(val, "ForceUpdateOSDiskForEphemeral", &v.ForceUpdateOSDiskForEphemeral)
+ delete(rawMsg, key)
+ case "osProfile":
+ err = unpopulate(val, "OSProfile", &v.OSProfile)
+ delete(rawMsg, key)
+ case "tempDisk":
+ err = unpopulate(val, "TempDisk", &v.TempDisk)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineSize.
+func (v VirtualMachineSize) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "maxDataDiskCount", v.MaxDataDiskCount)
+ populate(objectMap, "memoryInMB", v.MemoryInMB)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "numberOfCores", v.NumberOfCores)
+ populate(objectMap, "osDiskSizeInMB", v.OSDiskSizeInMB)
+ populate(objectMap, "resourceDiskSizeInMB", v.ResourceDiskSizeInMB)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineSize.
+func (v *VirtualMachineSize) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "maxDataDiskCount":
+ err = unpopulate(val, "MaxDataDiskCount", &v.MaxDataDiskCount)
+ delete(rawMsg, key)
+ case "memoryInMB":
+ err = unpopulate(val, "MemoryInMB", &v.MemoryInMB)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "numberOfCores":
+ err = unpopulate(val, "NumberOfCores", &v.NumberOfCores)
+ delete(rawMsg, key)
+ case "osDiskSizeInMB":
+ err = unpopulate(val, "OSDiskSizeInMB", &v.OSDiskSizeInMB)
+ delete(rawMsg, key)
+ case "resourceDiskSizeInMB":
+ err = unpopulate(val, "ResourceDiskSizeInMB", &v.ResourceDiskSizeInMB)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineSizeListResult.
+func (v VirtualMachineSizeListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "value", v.Value)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineSizeListResult.
+func (v *VirtualMachineSizeListResult) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "value":
+ err = unpopulate(val, "Value", &v.Value)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineSoftwarePatchProperties.
+func (v VirtualMachineSoftwarePatchProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "activityId", v.ActivityID)
+ populate(objectMap, "assessmentState", v.AssessmentState)
+ populate(objectMap, "classifications", v.Classifications)
+ populate(objectMap, "kbId", v.KbID)
+ populateDateTimeRFC3339(objectMap, "lastModifiedDateTime", v.LastModifiedDateTime)
+ populate(objectMap, "name", v.Name)
+ populate(objectMap, "patchId", v.PatchID)
+ populateDateTimeRFC3339(objectMap, "publishedDate", v.PublishedDate)
+ populate(objectMap, "rebootBehavior", v.RebootBehavior)
+ populate(objectMap, "version", v.Version)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineSoftwarePatchProperties.
+func (v *VirtualMachineSoftwarePatchProperties) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "activityId":
+ err = unpopulate(val, "ActivityID", &v.ActivityID)
+ delete(rawMsg, key)
+ case "assessmentState":
+ err = unpopulate(val, "AssessmentState", &v.AssessmentState)
+ delete(rawMsg, key)
+ case "classifications":
+ err = unpopulate(val, "Classifications", &v.Classifications)
+ delete(rawMsg, key)
+ case "kbId":
+ err = unpopulate(val, "KbID", &v.KbID)
+ delete(rawMsg, key)
+ case "lastModifiedDateTime":
+ err = unpopulateDateTimeRFC3339(val, "LastModifiedDateTime", &v.LastModifiedDateTime)
+ delete(rawMsg, key)
+ case "name":
+ err = unpopulate(val, "Name", &v.Name)
+ delete(rawMsg, key)
+ case "patchId":
+ err = unpopulate(val, "PatchID", &v.PatchID)
+ delete(rawMsg, key)
+ case "publishedDate":
+ err = unpopulateDateTimeRFC3339(val, "PublishedDate", &v.PublishedDate)
+ delete(rawMsg, key)
+ case "rebootBehavior":
+ err = unpopulate(val, "RebootBehavior", &v.RebootBehavior)
+ delete(rawMsg, key)
+ case "version":
+ err = unpopulate(val, "Version", &v.Version)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineStatusCodeCount.
+func (v VirtualMachineStatusCodeCount) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "code", v.Code)
+ populate(objectMap, "count", v.Count)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineStatusCodeCount.
+func (v *VirtualMachineStatusCodeCount) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "code":
+ err = unpopulate(val, "Code", &v.Code)
+ delete(rawMsg, key)
+ case "count":
+ err = unpopulate(val, "Count", &v.Count)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type VirtualMachineUpdate.
+func (v VirtualMachineUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "identity", v.Identity)
+ populate(objectMap, "plan", v.Plan)
+ populate(objectMap, "properties", v.Properties)
+ populate(objectMap, "tags", v.Tags)
+ populate(objectMap, "zones", v.Zones)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineUpdate.
+func (v *VirtualMachineUpdate) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "identity":
+ err = unpopulate(val, "Identity", &v.Identity)
+ delete(rawMsg, key)
+ case "plan":
+ err = unpopulate(val, "Plan", &v.Plan)
+ delete(rawMsg, key)
+ case "properties":
+ err = unpopulate(val, "Properties", &v.Properties)
+ delete(rawMsg, key)
+ case "tags":
+ err = unpopulate(val, "Tags", &v.Tags)
+ delete(rawMsg, key)
+ case "zones":
+ err = unpopulate(val, "Zones", &v.Zones)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", v, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type WinRMConfiguration.
+func (w WinRMConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "listeners", w.Listeners)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type WinRMConfiguration.
+func (w *WinRMConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", w, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "listeners":
+ err = unpopulate(val, "Listeners", &w.Listeners)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", w, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type WinRMListener.
+func (w WinRMListener) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "certificateUrl", w.CertificateURL)
+ populate(objectMap, "protocol", w.Protocol)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type WinRMListener.
+func (w *WinRMListener) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", w, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "certificateUrl":
+ err = unpopulate(val, "CertificateURL", &w.CertificateURL)
+ delete(rawMsg, key)
+ case "protocol":
+ err = unpopulate(val, "Protocol", &w.Protocol)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", w, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type WindowsConfiguration.
+func (w WindowsConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "additionalUnattendContent", w.AdditionalUnattendContent)
+ populate(objectMap, "enableAutomaticUpdates", w.EnableAutomaticUpdates)
+ populate(objectMap, "enableVMAgentPlatformUpdates", w.EnableVMAgentPlatformUpdates)
+ populate(objectMap, "patchSettings", w.PatchSettings)
+ populate(objectMap, "provisionVMAgent", w.ProvisionVMAgent)
+ populate(objectMap, "timeZone", w.TimeZone)
+ populate(objectMap, "winRM", w.WinRM)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type WindowsConfiguration.
+func (w *WindowsConfiguration) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", w, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "additionalUnattendContent":
+ err = unpopulate(val, "AdditionalUnattendContent", &w.AdditionalUnattendContent)
+ delete(rawMsg, key)
+ case "enableAutomaticUpdates":
+ err = unpopulate(val, "EnableAutomaticUpdates", &w.EnableAutomaticUpdates)
+ delete(rawMsg, key)
+ case "enableVMAgentPlatformUpdates":
+ err = unpopulate(val, "EnableVMAgentPlatformUpdates", &w.EnableVMAgentPlatformUpdates)
+ delete(rawMsg, key)
+ case "patchSettings":
+ err = unpopulate(val, "PatchSettings", &w.PatchSettings)
+ delete(rawMsg, key)
+ case "provisionVMAgent":
+ err = unpopulate(val, "ProvisionVMAgent", &w.ProvisionVMAgent)
+ delete(rawMsg, key)
+ case "timeZone":
+ err = unpopulate(val, "TimeZone", &w.TimeZone)
+ delete(rawMsg, key)
+ case "winRM":
+ err = unpopulate(val, "WinRM", &w.WinRM)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", w, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type WindowsParameters.
+func (w WindowsParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "classificationsToInclude", w.ClassificationsToInclude)
+ populate(objectMap, "excludeKbsRequiringReboot", w.ExcludeKbsRequiringReboot)
+ populate(objectMap, "kbNumbersToExclude", w.KbNumbersToExclude)
+ populate(objectMap, "kbNumbersToInclude", w.KbNumbersToInclude)
+ populateDateTimeRFC3339(objectMap, "maxPatchPublishDate", w.MaxPatchPublishDate)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type WindowsParameters.
+func (w *WindowsParameters) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", w, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "classificationsToInclude":
+ err = unpopulate(val, "ClassificationsToInclude", &w.ClassificationsToInclude)
+ delete(rawMsg, key)
+ case "excludeKbsRequiringReboot":
+ err = unpopulate(val, "ExcludeKbsRequiringReboot", &w.ExcludeKbsRequiringReboot)
+ delete(rawMsg, key)
+ case "kbNumbersToExclude":
+ err = unpopulate(val, "KbNumbersToExclude", &w.KbNumbersToExclude)
+ delete(rawMsg, key)
+ case "kbNumbersToInclude":
+ err = unpopulate(val, "KbNumbersToInclude", &w.KbNumbersToInclude)
+ delete(rawMsg, key)
+ case "maxPatchPublishDate":
+ err = unpopulateDateTimeRFC3339(val, "MaxPatchPublishDate", &w.MaxPatchPublishDate)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", w, err)
+ }
+ }
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaller interface for type WindowsVMGuestPatchAutomaticByPlatformSettings.
+func (w WindowsVMGuestPatchAutomaticByPlatformSettings) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]any)
+ populate(objectMap, "bypassPlatformSafetyChecksOnUserSchedule", w.BypassPlatformSafetyChecksOnUserSchedule)
+ populate(objectMap, "rebootSetting", w.RebootSetting)
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface for type WindowsVMGuestPatchAutomaticByPlatformSettings.
+func (w *WindowsVMGuestPatchAutomaticByPlatformSettings) UnmarshalJSON(data []byte) error {
+ var rawMsg map[string]json.RawMessage
+ if err := json.Unmarshal(data, &rawMsg); err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", w, err)
+ }
+ for key, val := range rawMsg {
+ var err error
+ switch key {
+ case "bypassPlatformSafetyChecksOnUserSchedule":
+ err = unpopulate(val, "BypassPlatformSafetyChecksOnUserSchedule", &w.BypassPlatformSafetyChecksOnUserSchedule)
+ delete(rawMsg, key)
+ case "rebootSetting":
+ err = unpopulate(val, "RebootSetting", &w.RebootSetting)
+ delete(rawMsg, key)
+ }
+ if err != nil {
+ return fmt.Errorf("unmarshalling type %T: %v", w, err)
+ }
+ }
+ return nil
+}
+
+func populate(m map[string]any, k string, v any) {
+ if v == nil {
+ return
+ } else if azcore.IsNullValue(v) {
+ m[k] = nil
+ } else if !reflect.ValueOf(v).IsNil() {
+ m[k] = v
+ }
+}
+
+func populateAny(m map[string]any, k string, v any) {
+ if v == nil {
+ return
+ } else if azcore.IsNullValue(v) {
+ m[k] = nil
+ } else {
+ m[k] = v
+ }
+}
+
+func unpopulate(data json.RawMessage, fn string, v any) error {
+ if data == nil || string(data) == "null" {
+ return nil
+ }
+ if err := json.Unmarshal(data, v); err != nil {
+ return fmt.Errorf("struct field %s: %v", fn, err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/operations_client.go
new file mode 100644
index 000000000..7c438a561
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/operations_client.go
@@ -0,0 +1,89 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+)
+
+// OperationsClient contains the methods for the Operations group.
+// Don't use this type directly, use NewOperationsClient() instead.
+type OperationsClient struct {
+ internal *arm.Client
+}
+
+// NewOperationsClient creates a new instance of OperationsClient with the specified values.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &OperationsClient{
+ internal: cl,
+ }
+ return client, nil
+}
+
+// NewListPager - Gets a list of compute operations.
+//
+// Generated from API version 2024-03-01
+// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
+func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{
+ More: func(page OperationsClientListResponse) bool {
+ return false
+ },
+ Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationsClient.NewListPager")
+ req, err := client.listCreateRequest(ctx, options)
+ if err != nil {
+ return OperationsClientListResponse{}, err
+ }
+ resp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return OperationsClientListResponse{}, err
+ }
+ if !runtime.HasStatusCode(resp, http.StatusOK) {
+ return OperationsClientListResponse{}, runtime.NewResponseError(resp)
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) {
+ urlPath := "/providers/Microsoft.Compute/operations"
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) {
+ result := OperationsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil {
+ return OperationsClientListResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/options.go
new file mode 100644
index 000000000..c94e80f30
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/options.go
@@ -0,0 +1,1986 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+// AvailabilitySetsClientCreateOrUpdateOptions contains the optional parameters for the AvailabilitySetsClient.CreateOrUpdate
+// method.
+type AvailabilitySetsClientCreateOrUpdateOptions struct {
+ // placeholder for future optional parameters
+}
+
+// AvailabilitySetsClientDeleteOptions contains the optional parameters for the AvailabilitySetsClient.Delete method.
+type AvailabilitySetsClientDeleteOptions struct {
+ // placeholder for future optional parameters
+}
+
+// AvailabilitySetsClientGetOptions contains the optional parameters for the AvailabilitySetsClient.Get method.
+type AvailabilitySetsClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// AvailabilitySetsClientListAvailableSizesOptions contains the optional parameters for the AvailabilitySetsClient.NewListAvailableSizesPager
+// method.
+type AvailabilitySetsClientListAvailableSizesOptions struct {
+ // placeholder for future optional parameters
+}
+
+// AvailabilitySetsClientListBySubscriptionOptions contains the optional parameters for the AvailabilitySetsClient.NewListBySubscriptionPager
+// method.
+type AvailabilitySetsClientListBySubscriptionOptions struct {
+ // The expand expression to apply to the operation. Allowed values are 'instanceView'.
+ Expand *string
+}
+
+// AvailabilitySetsClientListOptions contains the optional parameters for the AvailabilitySetsClient.NewListPager method.
+type AvailabilitySetsClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// AvailabilitySetsClientUpdateOptions contains the optional parameters for the AvailabilitySetsClient.Update method.
+type AvailabilitySetsClientUpdateOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CapacityReservationGroupsClientCreateOrUpdateOptions contains the optional parameters for the CapacityReservationGroupsClient.CreateOrUpdate
+// method.
+type CapacityReservationGroupsClientCreateOrUpdateOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CapacityReservationGroupsClientDeleteOptions contains the optional parameters for the CapacityReservationGroupsClient.Delete
+// method.
+type CapacityReservationGroupsClientDeleteOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CapacityReservationGroupsClientGetOptions contains the optional parameters for the CapacityReservationGroupsClient.Get
+// method.
+type CapacityReservationGroupsClientGetOptions struct {
+ // The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the capacity
+ // reservations under the capacity reservation group which is a snapshot of the
+ // runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations.
+ Expand *CapacityReservationGroupInstanceViewTypes
+}
+
+// CapacityReservationGroupsClientListByResourceGroupOptions contains the optional parameters for the CapacityReservationGroupsClient.NewListByResourceGroupPager
+// method.
+type CapacityReservationGroupsClientListByResourceGroupOptions struct {
+ // The expand expression to apply on the operation. Based on the expand param(s) specified we return Virtual Machine or ScaleSet
+ // VM Instance or both resource Ids which are associated to capacity
+ // reservation group in the response.
+ Expand *ExpandTypesForGetCapacityReservationGroups
+}
+
+// CapacityReservationGroupsClientListBySubscriptionOptions contains the optional parameters for the CapacityReservationGroupsClient.NewListBySubscriptionPager
+// method.
+type CapacityReservationGroupsClientListBySubscriptionOptions struct {
+ // The expand expression to apply on the operation. Based on the expand param(s) specified we return Virtual Machine or ScaleSet
+ // VM Instance or both resource Ids which are associated to capacity
+ // reservation group in the response.
+ Expand *ExpandTypesForGetCapacityReservationGroups
+
+ // The query option to fetch Capacity Reservation Group Resource Ids.
+ // 'CreatedInSubscription' enables fetching Resource Ids for all capacity reservation group resources created in the subscription.
+ // 'SharedWithSubscription' enables fetching Resource Ids for all capacity reservation group resources shared with the subscription.
+ // 'All' enables fetching Resource Ids for all capacity reservation group resources shared with the subscription and created
+ // in the subscription.
+ ResourceIDsOnly *ResourceIDOptionsForGetCapacityReservationGroups
+}
+
+// CapacityReservationGroupsClientUpdateOptions contains the optional parameters for the CapacityReservationGroupsClient.Update
+// method.
+type CapacityReservationGroupsClientUpdateOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CapacityReservationsClientBeginCreateOrUpdateOptions contains the optional parameters for the CapacityReservationsClient.BeginCreateOrUpdate
+// method.
+type CapacityReservationsClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CapacityReservationsClientBeginDeleteOptions contains the optional parameters for the CapacityReservationsClient.BeginDelete
+// method.
+type CapacityReservationsClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CapacityReservationsClientBeginUpdateOptions contains the optional parameters for the CapacityReservationsClient.BeginUpdate
+// method.
+type CapacityReservationsClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CapacityReservationsClientGetOptions contains the optional parameters for the CapacityReservationsClient.Get method.
+type CapacityReservationsClientGetOptions struct {
+ // The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the capacity
+ // reservation that is managed by the platform and can change outside of
+ // control plane operations.
+ Expand *CapacityReservationInstanceViewTypes
+}
+
+// CapacityReservationsClientListByCapacityReservationGroupOptions contains the optional parameters for the CapacityReservationsClient.NewListByCapacityReservationGroupPager
+// method.
+type CapacityReservationsClientListByCapacityReservationGroupOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CloudServiceOperatingSystemsClientGetOSFamilyOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.GetOSFamily
+// method.
+type CloudServiceOperatingSystemsClientGetOSFamilyOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CloudServiceOperatingSystemsClientGetOSVersionOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.GetOSVersion
+// method.
+type CloudServiceOperatingSystemsClientGetOSVersionOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CloudServiceOperatingSystemsClientListOSFamiliesOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.NewListOSFamiliesPager
+// method.
+type CloudServiceOperatingSystemsClientListOSFamiliesOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CloudServiceOperatingSystemsClientListOSVersionsOptions contains the optional parameters for the CloudServiceOperatingSystemsClient.NewListOSVersionsPager
+// method.
+type CloudServiceOperatingSystemsClientListOSVersionsOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CloudServiceRoleInstancesClientBeginDeleteOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginDelete
+// method.
+type CloudServiceRoleInstancesClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CloudServiceRoleInstancesClientBeginRebuildOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginRebuild
+// method.
+type CloudServiceRoleInstancesClientBeginRebuildOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CloudServiceRoleInstancesClientBeginReimageOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginReimage
+// method.
+type CloudServiceRoleInstancesClientBeginReimageOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CloudServiceRoleInstancesClientBeginRestartOptions contains the optional parameters for the CloudServiceRoleInstancesClient.BeginRestart
+// method.
+type CloudServiceRoleInstancesClientBeginRestartOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CloudServiceRoleInstancesClientGetInstanceViewOptions contains the optional parameters for the CloudServiceRoleInstancesClient.GetInstanceView
+// method.
+type CloudServiceRoleInstancesClientGetInstanceViewOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CloudServiceRoleInstancesClientGetOptions contains the optional parameters for the CloudServiceRoleInstancesClient.Get
+// method.
+type CloudServiceRoleInstancesClientGetOptions struct {
+ // The expand expression to apply to the operation. 'UserData' is not supported for cloud services.
+ Expand *InstanceViewTypes
+}
+
+// CloudServiceRoleInstancesClientGetRemoteDesktopFileOptions contains the optional parameters for the CloudServiceRoleInstancesClient.GetRemoteDesktopFile
+// method.
+type CloudServiceRoleInstancesClientGetRemoteDesktopFileOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CloudServiceRoleInstancesClientListOptions contains the optional parameters for the CloudServiceRoleInstancesClient.NewListPager
+// method.
+type CloudServiceRoleInstancesClientListOptions struct {
+ // The expand expression to apply to the operation. 'UserData' is not supported for cloud services.
+ Expand *InstanceViewTypes
+}
+
+// CloudServiceRolesClientGetOptions contains the optional parameters for the CloudServiceRolesClient.Get method.
+type CloudServiceRolesClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CloudServiceRolesClientListOptions contains the optional parameters for the CloudServiceRolesClient.NewListPager method.
+type CloudServiceRolesClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CloudServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the CloudServicesClient.BeginCreateOrUpdate
+// method.
+type CloudServicesClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CloudServicesClientBeginDeleteInstancesOptions contains the optional parameters for the CloudServicesClient.BeginDeleteInstances
+// method.
+type CloudServicesClientBeginDeleteInstancesOptions struct {
+ // List of cloud service role instance names.
+ Parameters *RoleInstances
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CloudServicesClientBeginDeleteOptions contains the optional parameters for the CloudServicesClient.BeginDelete method.
+type CloudServicesClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CloudServicesClientBeginPowerOffOptions contains the optional parameters for the CloudServicesClient.BeginPowerOff method.
+type CloudServicesClientBeginPowerOffOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CloudServicesClientBeginRebuildOptions contains the optional parameters for the CloudServicesClient.BeginRebuild method.
+type CloudServicesClientBeginRebuildOptions struct {
+ // List of cloud service role instance names.
+ Parameters *RoleInstances
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CloudServicesClientBeginReimageOptions contains the optional parameters for the CloudServicesClient.BeginReimage method.
+type CloudServicesClientBeginReimageOptions struct {
+ // List of cloud service role instance names.
+ Parameters *RoleInstances
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CloudServicesClientBeginRestartOptions contains the optional parameters for the CloudServicesClient.BeginRestart method.
+type CloudServicesClientBeginRestartOptions struct {
+ // List of cloud service role instance names.
+ Parameters *RoleInstances
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CloudServicesClientBeginStartOptions contains the optional parameters for the CloudServicesClient.BeginStart method.
+type CloudServicesClientBeginStartOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CloudServicesClientBeginUpdateOptions contains the optional parameters for the CloudServicesClient.BeginUpdate method.
+type CloudServicesClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CloudServicesClientGetInstanceViewOptions contains the optional parameters for the CloudServicesClient.GetInstanceView
+// method.
+type CloudServicesClientGetInstanceViewOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CloudServicesClientGetOptions contains the optional parameters for the CloudServicesClient.Get method.
+type CloudServicesClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CloudServicesClientListAllOptions contains the optional parameters for the CloudServicesClient.NewListAllPager method.
+type CloudServicesClientListAllOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CloudServicesClientListOptions contains the optional parameters for the CloudServicesClient.NewListPager method.
+type CloudServicesClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CloudServicesUpdateDomainClientBeginWalkUpdateDomainOptions contains the optional parameters for the CloudServicesUpdateDomainClient.BeginWalkUpdateDomain
+// method.
+type CloudServicesUpdateDomainClientBeginWalkUpdateDomainOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// CloudServicesUpdateDomainClientGetUpdateDomainOptions contains the optional parameters for the CloudServicesUpdateDomainClient.GetUpdateDomain
+// method.
+type CloudServicesUpdateDomainClientGetUpdateDomainOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CloudServicesUpdateDomainClientListUpdateDomainsOptions contains the optional parameters for the CloudServicesUpdateDomainClient.NewListUpdateDomainsPager
+// method.
+type CloudServicesUpdateDomainClientListUpdateDomainsOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CommunityGalleriesClientGetOptions contains the optional parameters for the CommunityGalleriesClient.Get method.
+type CommunityGalleriesClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CommunityGalleryImageVersionsClientGetOptions contains the optional parameters for the CommunityGalleryImageVersionsClient.Get
+// method.
+type CommunityGalleryImageVersionsClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CommunityGalleryImageVersionsClientListOptions contains the optional parameters for the CommunityGalleryImageVersionsClient.NewListPager
+// method.
+type CommunityGalleryImageVersionsClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CommunityGalleryImagesClientGetOptions contains the optional parameters for the CommunityGalleryImagesClient.Get method.
+type CommunityGalleryImagesClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// CommunityGalleryImagesClientListOptions contains the optional parameters for the CommunityGalleryImagesClient.NewListPager
+// method.
+type CommunityGalleryImagesClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DedicatedHostGroupsClientCreateOrUpdateOptions contains the optional parameters for the DedicatedHostGroupsClient.CreateOrUpdate
+// method.
+type DedicatedHostGroupsClientCreateOrUpdateOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DedicatedHostGroupsClientDeleteOptions contains the optional parameters for the DedicatedHostGroupsClient.Delete method.
+type DedicatedHostGroupsClientDeleteOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DedicatedHostGroupsClientGetOptions contains the optional parameters for the DedicatedHostGroupsClient.Get method.
+type DedicatedHostGroupsClientGetOptions struct {
+ // The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated
+ // hosts under the dedicated host group. 'UserData' is not supported for
+ // dedicated host group.
+ Expand *InstanceViewTypes
+}
+
+// DedicatedHostGroupsClientListByResourceGroupOptions contains the optional parameters for the DedicatedHostGroupsClient.NewListByResourceGroupPager
+// method.
+type DedicatedHostGroupsClientListByResourceGroupOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DedicatedHostGroupsClientListBySubscriptionOptions contains the optional parameters for the DedicatedHostGroupsClient.NewListBySubscriptionPager
+// method.
+type DedicatedHostGroupsClientListBySubscriptionOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DedicatedHostGroupsClientUpdateOptions contains the optional parameters for the DedicatedHostGroupsClient.Update method.
+type DedicatedHostGroupsClientUpdateOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DedicatedHostsClientBeginCreateOrUpdateOptions contains the optional parameters for the DedicatedHostsClient.BeginCreateOrUpdate
+// method.
+type DedicatedHostsClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DedicatedHostsClientBeginDeleteOptions contains the optional parameters for the DedicatedHostsClient.BeginDelete method.
+type DedicatedHostsClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DedicatedHostsClientBeginRedeployOptions contains the optional parameters for the DedicatedHostsClient.BeginRedeploy method.
+type DedicatedHostsClientBeginRedeployOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DedicatedHostsClientBeginRestartOptions contains the optional parameters for the DedicatedHostsClient.BeginRestart method.
+type DedicatedHostsClientBeginRestartOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DedicatedHostsClientBeginUpdateOptions contains the optional parameters for the DedicatedHostsClient.BeginUpdate method.
+type DedicatedHostsClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DedicatedHostsClientGetOptions contains the optional parameters for the DedicatedHostsClient.Get method.
+type DedicatedHostsClientGetOptions struct {
+ // The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated
+ // host. 'UserData' is not supported for dedicated host.
+ Expand *InstanceViewTypes
+}
+
+// DedicatedHostsClientListAvailableSizesOptions contains the optional parameters for the DedicatedHostsClient.NewListAvailableSizesPager
+// method.
+type DedicatedHostsClientListAvailableSizesOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DedicatedHostsClientListByHostGroupOptions contains the optional parameters for the DedicatedHostsClient.NewListByHostGroupPager
+// method.
+type DedicatedHostsClientListByHostGroupOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DiskAccessesClientBeginCreateOrUpdateOptions contains the optional parameters for the DiskAccessesClient.BeginCreateOrUpdate
+// method.
+type DiskAccessesClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DiskAccessesClientBeginDeleteAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccessesClient.BeginDeleteAPrivateEndpointConnection
+// method.
+type DiskAccessesClientBeginDeleteAPrivateEndpointConnectionOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DiskAccessesClientBeginDeleteOptions contains the optional parameters for the DiskAccessesClient.BeginDelete method.
+type DiskAccessesClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DiskAccessesClientBeginUpdateAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccessesClient.BeginUpdateAPrivateEndpointConnection
+// method.
+type DiskAccessesClientBeginUpdateAPrivateEndpointConnectionOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DiskAccessesClientBeginUpdateOptions contains the optional parameters for the DiskAccessesClient.BeginUpdate method.
+type DiskAccessesClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DiskAccessesClientGetAPrivateEndpointConnectionOptions contains the optional parameters for the DiskAccessesClient.GetAPrivateEndpointConnection
+// method.
+type DiskAccessesClientGetAPrivateEndpointConnectionOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DiskAccessesClientGetOptions contains the optional parameters for the DiskAccessesClient.Get method.
+type DiskAccessesClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DiskAccessesClientGetPrivateLinkResourcesOptions contains the optional parameters for the DiskAccessesClient.GetPrivateLinkResources
+// method.
+type DiskAccessesClientGetPrivateLinkResourcesOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DiskAccessesClientListByResourceGroupOptions contains the optional parameters for the DiskAccessesClient.NewListByResourceGroupPager
+// method.
+type DiskAccessesClientListByResourceGroupOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DiskAccessesClientListOptions contains the optional parameters for the DiskAccessesClient.NewListPager method.
+type DiskAccessesClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DiskAccessesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the DiskAccessesClient.NewListPrivateEndpointConnectionsPager
+// method.
+type DiskAccessesClientListPrivateEndpointConnectionsOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DiskEncryptionSetsClientBeginCreateOrUpdateOptions contains the optional parameters for the DiskEncryptionSetsClient.BeginCreateOrUpdate
+// method.
+type DiskEncryptionSetsClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DiskEncryptionSetsClientBeginDeleteOptions contains the optional parameters for the DiskEncryptionSetsClient.BeginDelete
+// method.
+type DiskEncryptionSetsClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DiskEncryptionSetsClientBeginUpdateOptions contains the optional parameters for the DiskEncryptionSetsClient.BeginUpdate
+// method.
+type DiskEncryptionSetsClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DiskEncryptionSetsClientGetOptions contains the optional parameters for the DiskEncryptionSetsClient.Get method.
+type DiskEncryptionSetsClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DiskEncryptionSetsClientListAssociatedResourcesOptions contains the optional parameters for the DiskEncryptionSetsClient.NewListAssociatedResourcesPager
+// method.
+type DiskEncryptionSetsClientListAssociatedResourcesOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DiskEncryptionSetsClientListByResourceGroupOptions contains the optional parameters for the DiskEncryptionSetsClient.NewListByResourceGroupPager
+// method.
+type DiskEncryptionSetsClientListByResourceGroupOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DiskEncryptionSetsClientListOptions contains the optional parameters for the DiskEncryptionSetsClient.NewListPager method.
+type DiskEncryptionSetsClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DiskRestorePointClientBeginGrantAccessOptions contains the optional parameters for the DiskRestorePointClient.BeginGrantAccess
+// method.
+type DiskRestorePointClientBeginGrantAccessOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DiskRestorePointClientBeginRevokeAccessOptions contains the optional parameters for the DiskRestorePointClient.BeginRevokeAccess
+// method.
+type DiskRestorePointClientBeginRevokeAccessOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DiskRestorePointClientGetOptions contains the optional parameters for the DiskRestorePointClient.Get method.
+type DiskRestorePointClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DiskRestorePointClientListByRestorePointOptions contains the optional parameters for the DiskRestorePointClient.NewListByRestorePointPager
+// method.
+type DiskRestorePointClientListByRestorePointOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DisksClientBeginCreateOrUpdateOptions contains the optional parameters for the DisksClient.BeginCreateOrUpdate method.
+type DisksClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DisksClientBeginDeleteOptions contains the optional parameters for the DisksClient.BeginDelete method.
+type DisksClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DisksClientBeginGrantAccessOptions contains the optional parameters for the DisksClient.BeginGrantAccess method.
+type DisksClientBeginGrantAccessOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DisksClientBeginRevokeAccessOptions contains the optional parameters for the DisksClient.BeginRevokeAccess method.
+type DisksClientBeginRevokeAccessOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DisksClientBeginUpdateOptions contains the optional parameters for the DisksClient.BeginUpdate method.
+type DisksClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// DisksClientGetOptions contains the optional parameters for the DisksClient.Get method.
+type DisksClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DisksClientListByResourceGroupOptions contains the optional parameters for the DisksClient.NewListByResourceGroupPager
+// method.
+type DisksClientListByResourceGroupOptions struct {
+ // placeholder for future optional parameters
+}
+
+// DisksClientListOptions contains the optional parameters for the DisksClient.NewListPager method.
+type DisksClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// GalleriesClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleriesClient.BeginCreateOrUpdate
+// method.
+type GalleriesClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleriesClientBeginDeleteOptions contains the optional parameters for the GalleriesClient.BeginDelete method.
+type GalleriesClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleriesClientBeginUpdateOptions contains the optional parameters for the GalleriesClient.BeginUpdate method.
+type GalleriesClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleriesClientGetOptions contains the optional parameters for the GalleriesClient.Get method.
+type GalleriesClientGetOptions struct {
+ // The expand query option to apply on the operation.
+ Expand *GalleryExpandParams
+
+ // The select expression to apply on the operation.
+ Select *SelectPermissions
+}
+
+// GalleriesClientListByResourceGroupOptions contains the optional parameters for the GalleriesClient.NewListByResourceGroupPager
+// method.
+type GalleriesClientListByResourceGroupOptions struct {
+ // placeholder for future optional parameters
+}
+
+// GalleriesClientListOptions contains the optional parameters for the GalleriesClient.NewListPager method.
+type GalleriesClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// GalleryApplicationVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryApplicationVersionsClient.BeginCreateOrUpdate
+// method.
+type GalleryApplicationVersionsClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleryApplicationVersionsClientBeginDeleteOptions contains the optional parameters for the GalleryApplicationVersionsClient.BeginDelete
+// method.
+type GalleryApplicationVersionsClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleryApplicationVersionsClientBeginUpdateOptions contains the optional parameters for the GalleryApplicationVersionsClient.BeginUpdate
+// method.
+type GalleryApplicationVersionsClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleryApplicationVersionsClientGetOptions contains the optional parameters for the GalleryApplicationVersionsClient.Get
+// method.
+type GalleryApplicationVersionsClientGetOptions struct {
+ // The expand expression to apply on the operation.
+ Expand *ReplicationStatusTypes
+}
+
+// GalleryApplicationVersionsClientListByGalleryApplicationOptions contains the optional parameters for the GalleryApplicationVersionsClient.NewListByGalleryApplicationPager
+// method.
+type GalleryApplicationVersionsClientListByGalleryApplicationOptions struct {
+ // placeholder for future optional parameters
+}
+
+// GalleryApplicationsClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryApplicationsClient.BeginCreateOrUpdate
+// method.
+type GalleryApplicationsClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleryApplicationsClientBeginDeleteOptions contains the optional parameters for the GalleryApplicationsClient.BeginDelete
+// method.
+type GalleryApplicationsClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleryApplicationsClientBeginUpdateOptions contains the optional parameters for the GalleryApplicationsClient.BeginUpdate
+// method.
+type GalleryApplicationsClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleryApplicationsClientGetOptions contains the optional parameters for the GalleryApplicationsClient.Get method.
+type GalleryApplicationsClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// GalleryApplicationsClientListByGalleryOptions contains the optional parameters for the GalleryApplicationsClient.NewListByGalleryPager
+// method.
+type GalleryApplicationsClientListByGalleryOptions struct {
+ // placeholder for future optional parameters
+}
+
+// GalleryImageVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryImageVersionsClient.BeginCreateOrUpdate
+// method.
+type GalleryImageVersionsClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleryImageVersionsClientBeginDeleteOptions contains the optional parameters for the GalleryImageVersionsClient.BeginDelete
+// method.
+type GalleryImageVersionsClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleryImageVersionsClientBeginUpdateOptions contains the optional parameters for the GalleryImageVersionsClient.BeginUpdate
+// method.
+type GalleryImageVersionsClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleryImageVersionsClientGetOptions contains the optional parameters for the GalleryImageVersionsClient.Get method.
+type GalleryImageVersionsClientGetOptions struct {
+ // The expand expression to apply on the operation.
+ Expand *ReplicationStatusTypes
+}
+
+// GalleryImageVersionsClientListByGalleryImageOptions contains the optional parameters for the GalleryImageVersionsClient.NewListByGalleryImagePager
+// method.
+type GalleryImageVersionsClientListByGalleryImageOptions struct {
+ // placeholder for future optional parameters
+}
+
+// GalleryImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the GalleryImagesClient.BeginCreateOrUpdate
+// method.
+type GalleryImagesClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleryImagesClientBeginDeleteOptions contains the optional parameters for the GalleryImagesClient.BeginDelete method.
+type GalleryImagesClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleryImagesClientBeginUpdateOptions contains the optional parameters for the GalleryImagesClient.BeginUpdate method.
+type GalleryImagesClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// GalleryImagesClientGetOptions contains the optional parameters for the GalleryImagesClient.Get method.
+type GalleryImagesClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// GalleryImagesClientListByGalleryOptions contains the optional parameters for the GalleryImagesClient.NewListByGalleryPager
+// method.
+type GalleryImagesClientListByGalleryOptions struct {
+ // placeholder for future optional parameters
+}
+
+// GallerySharingProfileClientBeginUpdateOptions contains the optional parameters for the GallerySharingProfileClient.BeginUpdate
+// method.
+type GallerySharingProfileClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// ImagesClientBeginCreateOrUpdateOptions contains the optional parameters for the ImagesClient.BeginCreateOrUpdate method.
+type ImagesClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// ImagesClientBeginDeleteOptions contains the optional parameters for the ImagesClient.BeginDelete method.
+type ImagesClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// ImagesClientBeginUpdateOptions contains the optional parameters for the ImagesClient.BeginUpdate method.
+type ImagesClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// ImagesClientGetOptions contains the optional parameters for the ImagesClient.Get method.
+type ImagesClientGetOptions struct {
+ // The expand expression to apply on the operation.
+ Expand *string
+}
+
+// ImagesClientListByResourceGroupOptions contains the optional parameters for the ImagesClient.NewListByResourceGroupPager
+// method.
+type ImagesClientListByResourceGroupOptions struct {
+ // placeholder for future optional parameters
+}
+
+// ImagesClientListOptions contains the optional parameters for the ImagesClient.NewListPager method.
+type ImagesClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// LogAnalyticsClientBeginExportRequestRateByIntervalOptions contains the optional parameters for the LogAnalyticsClient.BeginExportRequestRateByInterval
+// method.
+type LogAnalyticsClientBeginExportRequestRateByIntervalOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// LogAnalyticsClientBeginExportThrottledRequestsOptions contains the optional parameters for the LogAnalyticsClient.BeginExportThrottledRequests
+// method.
+type LogAnalyticsClientBeginExportThrottledRequestsOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
+type OperationsClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// ProximityPlacementGroupsClientCreateOrUpdateOptions contains the optional parameters for the ProximityPlacementGroupsClient.CreateOrUpdate
+// method.
+type ProximityPlacementGroupsClientCreateOrUpdateOptions struct {
+ // placeholder for future optional parameters
+}
+
+// ProximityPlacementGroupsClientDeleteOptions contains the optional parameters for the ProximityPlacementGroupsClient.Delete
+// method.
+type ProximityPlacementGroupsClientDeleteOptions struct {
+ // placeholder for future optional parameters
+}
+
+// ProximityPlacementGroupsClientGetOptions contains the optional parameters for the ProximityPlacementGroupsClient.Get method.
+type ProximityPlacementGroupsClientGetOptions struct {
+ // includeColocationStatus=true enables fetching the colocation status of all the resources in the proximity placement group.
+ IncludeColocationStatus *string
+}
+
+// ProximityPlacementGroupsClientListByResourceGroupOptions contains the optional parameters for the ProximityPlacementGroupsClient.NewListByResourceGroupPager
+// method.
+type ProximityPlacementGroupsClientListByResourceGroupOptions struct {
+ // placeholder for future optional parameters
+}
+
+// ProximityPlacementGroupsClientListBySubscriptionOptions contains the optional parameters for the ProximityPlacementGroupsClient.NewListBySubscriptionPager
+// method.
+type ProximityPlacementGroupsClientListBySubscriptionOptions struct {
+ // placeholder for future optional parameters
+}
+
+// ProximityPlacementGroupsClientUpdateOptions contains the optional parameters for the ProximityPlacementGroupsClient.Update
+// method.
+type ProximityPlacementGroupsClientUpdateOptions struct {
+ // placeholder for future optional parameters
+}
+
+// ResourceSKUsClientListOptions contains the optional parameters for the ResourceSKUsClient.NewListPager method.
+type ResourceSKUsClientListOptions struct {
+ // The filter to apply on the operation. Only location filter is supported currently.
+ Filter *string
+
+ // To Include Extended Locations information or not in the response.
+ IncludeExtendedLocations *string
+}
+
+// RestorePointCollectionsClientBeginDeleteOptions contains the optional parameters for the RestorePointCollectionsClient.BeginDelete
+// method.
+type RestorePointCollectionsClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// RestorePointCollectionsClientCreateOrUpdateOptions contains the optional parameters for the RestorePointCollectionsClient.CreateOrUpdate
+// method.
+type RestorePointCollectionsClientCreateOrUpdateOptions struct {
+ // placeholder for future optional parameters
+}
+
+// RestorePointCollectionsClientGetOptions contains the optional parameters for the RestorePointCollectionsClient.Get method.
+type RestorePointCollectionsClientGetOptions struct {
+ // The expand expression to apply on the operation. If expand=restorePoints, server will return all contained restore points
+ // in the restorePointCollection.
+ Expand *RestorePointCollectionExpandOptions
+}
+
+// RestorePointCollectionsClientListAllOptions contains the optional parameters for the RestorePointCollectionsClient.NewListAllPager
+// method.
+type RestorePointCollectionsClientListAllOptions struct {
+ // placeholder for future optional parameters
+}
+
+// RestorePointCollectionsClientListOptions contains the optional parameters for the RestorePointCollectionsClient.NewListPager
+// method.
+type RestorePointCollectionsClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// RestorePointCollectionsClientUpdateOptions contains the optional parameters for the RestorePointCollectionsClient.Update
+// method.
+type RestorePointCollectionsClientUpdateOptions struct {
+ // placeholder for future optional parameters
+}
+
+// RestorePointsClientBeginCreateOptions contains the optional parameters for the RestorePointsClient.BeginCreate method.
+type RestorePointsClientBeginCreateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// RestorePointsClientBeginDeleteOptions contains the optional parameters for the RestorePointsClient.BeginDelete method.
+type RestorePointsClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// RestorePointsClientGetOptions contains the optional parameters for the RestorePointsClient.Get method.
+type RestorePointsClientGetOptions struct {
+ // The expand expression to apply on the operation. 'InstanceView' retrieves information about the run-time state of a restore
+ // point.
+ Expand *RestorePointExpandOptions
+}
+
+// SSHPublicKeysClientCreateOptions contains the optional parameters for the SSHPublicKeysClient.Create method.
+type SSHPublicKeysClientCreateOptions struct {
+ // placeholder for future optional parameters
+}
+
+// SSHPublicKeysClientDeleteOptions contains the optional parameters for the SSHPublicKeysClient.Delete method.
+type SSHPublicKeysClientDeleteOptions struct {
+ // placeholder for future optional parameters
+}
+
+// SSHPublicKeysClientGenerateKeyPairOptions contains the optional parameters for the SSHPublicKeysClient.GenerateKeyPair
+// method.
+type SSHPublicKeysClientGenerateKeyPairOptions struct {
+ // Parameters supplied to generate the SSH public key.
+ Parameters *SSHGenerateKeyPairInputParameters
+}
+
+// SSHPublicKeysClientGetOptions contains the optional parameters for the SSHPublicKeysClient.Get method.
+type SSHPublicKeysClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// SSHPublicKeysClientListByResourceGroupOptions contains the optional parameters for the SSHPublicKeysClient.NewListByResourceGroupPager
+// method.
+type SSHPublicKeysClientListByResourceGroupOptions struct {
+ // placeholder for future optional parameters
+}
+
+// SSHPublicKeysClientListBySubscriptionOptions contains the optional parameters for the SSHPublicKeysClient.NewListBySubscriptionPager
+// method.
+type SSHPublicKeysClientListBySubscriptionOptions struct {
+ // placeholder for future optional parameters
+}
+
+// SSHPublicKeysClientUpdateOptions contains the optional parameters for the SSHPublicKeysClient.Update method.
+type SSHPublicKeysClientUpdateOptions struct {
+ // placeholder for future optional parameters
+}
+
+// SharedGalleriesClientGetOptions contains the optional parameters for the SharedGalleriesClient.Get method.
+type SharedGalleriesClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// SharedGalleriesClientListOptions contains the optional parameters for the SharedGalleriesClient.NewListPager method.
+type SharedGalleriesClientListOptions struct {
+ // The query parameter to decide what shared galleries to fetch when doing listing operations.
+ SharedTo *SharedToValues
+}
+
+// SharedGalleryImageVersionsClientGetOptions contains the optional parameters for the SharedGalleryImageVersionsClient.Get
+// method.
+type SharedGalleryImageVersionsClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// SharedGalleryImageVersionsClientListOptions contains the optional parameters for the SharedGalleryImageVersionsClient.NewListPager
+// method.
+type SharedGalleryImageVersionsClientListOptions struct {
+ // The query parameter to decide what shared galleries to fetch when doing listing operations.
+ SharedTo *SharedToValues
+}
+
+// SharedGalleryImagesClientGetOptions contains the optional parameters for the SharedGalleryImagesClient.Get method.
+type SharedGalleryImagesClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// SharedGalleryImagesClientListOptions contains the optional parameters for the SharedGalleryImagesClient.NewListPager method.
+type SharedGalleryImagesClientListOptions struct {
+ // The query parameter to decide what shared galleries to fetch when doing listing operations.
+ SharedTo *SharedToValues
+}
+
+// SnapshotsClientBeginCreateOrUpdateOptions contains the optional parameters for the SnapshotsClient.BeginCreateOrUpdate
+// method.
+type SnapshotsClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// SnapshotsClientBeginDeleteOptions contains the optional parameters for the SnapshotsClient.BeginDelete method.
+type SnapshotsClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// SnapshotsClientBeginGrantAccessOptions contains the optional parameters for the SnapshotsClient.BeginGrantAccess method.
+type SnapshotsClientBeginGrantAccessOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// SnapshotsClientBeginRevokeAccessOptions contains the optional parameters for the SnapshotsClient.BeginRevokeAccess method.
+type SnapshotsClientBeginRevokeAccessOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// SnapshotsClientBeginUpdateOptions contains the optional parameters for the SnapshotsClient.BeginUpdate method.
+type SnapshotsClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// SnapshotsClientGetOptions contains the optional parameters for the SnapshotsClient.Get method.
+type SnapshotsClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// SnapshotsClientListByResourceGroupOptions contains the optional parameters for the SnapshotsClient.NewListByResourceGroupPager
+// method.
+type SnapshotsClientListByResourceGroupOptions struct {
+ // placeholder for future optional parameters
+}
+
+// SnapshotsClientListOptions contains the optional parameters for the SnapshotsClient.NewListPager method.
+type SnapshotsClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// UsageClientListOptions contains the optional parameters for the UsageClient.NewListPager method.
+type UsageClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineExtensionImagesClientGetOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.Get
+// method.
+type VirtualMachineExtensionImagesClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineExtensionImagesClientListTypesOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.ListTypes
+// method.
+type VirtualMachineExtensionImagesClientListTypesOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineExtensionImagesClientListVersionsOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.ListVersions
+// method.
+type VirtualMachineExtensionImagesClientListVersionsOptions struct {
+ // The filter to apply on the operation.
+ Filter *string
+ Orderby *string
+ Top *int32
+}
+
+// VirtualMachineExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineExtensionsClient.BeginCreateOrUpdate
+// method.
+type VirtualMachineExtensionsClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineExtensionsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineExtensionsClient.BeginDelete
+// method.
+type VirtualMachineExtensionsClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineExtensionsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineExtensionsClient.BeginUpdate
+// method.
+type VirtualMachineExtensionsClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineExtensionsClientGetOptions contains the optional parameters for the VirtualMachineExtensionsClient.Get method.
+type VirtualMachineExtensionsClientGetOptions struct {
+ // The expand expression to apply on the operation.
+ Expand *string
+}
+
+// VirtualMachineExtensionsClientListOptions contains the optional parameters for the VirtualMachineExtensionsClient.List
+// method.
+type VirtualMachineExtensionsClientListOptions struct {
+ // The expand expression to apply on the operation.
+ Expand *string
+}
+
+// VirtualMachineImagesClientGetOptions contains the optional parameters for the VirtualMachineImagesClient.Get method.
+type VirtualMachineImagesClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineImagesClientListByEdgeZoneOptions contains the optional parameters for the VirtualMachineImagesClient.ListByEdgeZone
+// method.
+type VirtualMachineImagesClientListByEdgeZoneOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineImagesClientListOffersOptions contains the optional parameters for the VirtualMachineImagesClient.ListOffers
+// method.
+type VirtualMachineImagesClientListOffersOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineImagesClientListOptions contains the optional parameters for the VirtualMachineImagesClient.List method.
+type VirtualMachineImagesClientListOptions struct {
+ // The expand expression to apply on the operation.
+ Expand *string
+ Orderby *string
+ Top *int32
+}
+
+// VirtualMachineImagesClientListPublishersOptions contains the optional parameters for the VirtualMachineImagesClient.ListPublishers
+// method.
+type VirtualMachineImagesClientListPublishersOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineImagesClientListSKUsOptions contains the optional parameters for the VirtualMachineImagesClient.ListSKUs
+// method.
+type VirtualMachineImagesClientListSKUsOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineImagesEdgeZoneClientGetOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.Get
+// method.
+type VirtualMachineImagesEdgeZoneClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineImagesEdgeZoneClientListOffersOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.ListOffers
+// method.
+type VirtualMachineImagesEdgeZoneClientListOffersOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineImagesEdgeZoneClientListOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.List
+// method.
+type VirtualMachineImagesEdgeZoneClientListOptions struct {
+ // The expand expression to apply on the operation.
+ Expand *string
+
+ // Specifies the order of the results returned. Formatted as an OData query.
+ Orderby *string
+
+ // An integer value specifying the number of images to return that matches supplied values.
+ Top *int32
+}
+
+// VirtualMachineImagesEdgeZoneClientListPublishersOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.ListPublishers
+// method.
+type VirtualMachineImagesEdgeZoneClientListPublishersOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineImagesEdgeZoneClientListSKUsOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.ListSKUs
+// method.
+type VirtualMachineImagesEdgeZoneClientListSKUsOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineRunCommandsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineRunCommandsClient.BeginCreateOrUpdate
+// method.
+type VirtualMachineRunCommandsClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineRunCommandsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineRunCommandsClient.BeginDelete
+// method.
+type VirtualMachineRunCommandsClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineRunCommandsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineRunCommandsClient.BeginUpdate
+// method.
+type VirtualMachineRunCommandsClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineRunCommandsClientGetByVirtualMachineOptions contains the optional parameters for the VirtualMachineRunCommandsClient.GetByVirtualMachine
+// method.
+type VirtualMachineRunCommandsClientGetByVirtualMachineOptions struct {
+ // The expand expression to apply on the operation.
+ Expand *string
+}
+
+// VirtualMachineRunCommandsClientGetOptions contains the optional parameters for the VirtualMachineRunCommandsClient.Get
+// method.
+type VirtualMachineRunCommandsClientGetOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineRunCommandsClientListByVirtualMachineOptions contains the optional parameters for the VirtualMachineRunCommandsClient.NewListByVirtualMachinePager
+// method.
+type VirtualMachineRunCommandsClientListByVirtualMachineOptions struct {
+ // The expand expression to apply on the operation.
+ Expand *string
+}
+
+// VirtualMachineRunCommandsClientListOptions contains the optional parameters for the VirtualMachineRunCommandsClient.NewListPager
+// method.
+type VirtualMachineRunCommandsClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineScaleSetExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.BeginCreateOrUpdate
+// method.
+type VirtualMachineScaleSetExtensionsClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetExtensionsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.BeginDelete
+// method.
+type VirtualMachineScaleSetExtensionsClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetExtensionsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.BeginUpdate
+// method.
+type VirtualMachineScaleSetExtensionsClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetExtensionsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.Get
+// method.
+type VirtualMachineScaleSetExtensionsClientGetOptions struct {
+ // The expand expression to apply on the operation.
+ Expand *string
+}
+
+// VirtualMachineScaleSetExtensionsClientListOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.NewListPager
+// method.
+type VirtualMachineScaleSetExtensionsClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineScaleSetRollingUpgradesClientBeginCancelOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.BeginCancel
+// method.
+type VirtualMachineScaleSetRollingUpgradesClientBeginCancelOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetRollingUpgradesClientBeginStartExtensionUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.BeginStartExtensionUpgrade
+// method.
+type VirtualMachineScaleSetRollingUpgradesClientBeginStartExtensionUpgradeOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetRollingUpgradesClientBeginStartOSUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.BeginStartOSUpgrade
+// method.
+type VirtualMachineScaleSetRollingUpgradesClientBeginStartOSUpgradeOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetRollingUpgradesClientGetLatestOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.GetLatest
+// method.
+type VirtualMachineScaleSetRollingUpgradesClientGetLatestOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineScaleSetVMExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.BeginCreateOrUpdate
+// method.
+type VirtualMachineScaleSetVMExtensionsClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMExtensionsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.BeginDelete
+// method.
+type VirtualMachineScaleSetVMExtensionsClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMExtensionsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.BeginUpdate
+// method.
+type VirtualMachineScaleSetVMExtensionsClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMExtensionsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.Get
+// method.
+type VirtualMachineScaleSetVMExtensionsClientGetOptions struct {
+ // The expand expression to apply on the operation.
+ Expand *string
+}
+
+// VirtualMachineScaleSetVMExtensionsClientListOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.List
+// method.
+type VirtualMachineScaleSetVMExtensionsClientListOptions struct {
+ // The expand expression to apply on the operation.
+ Expand *string
+}
+
+// VirtualMachineScaleSetVMRunCommandsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.BeginCreateOrUpdate
+// method.
+type VirtualMachineScaleSetVMRunCommandsClientBeginCreateOrUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMRunCommandsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.BeginDelete
+// method.
+type VirtualMachineScaleSetVMRunCommandsClientBeginDeleteOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMRunCommandsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.BeginUpdate
+// method.
+type VirtualMachineScaleSetVMRunCommandsClientBeginUpdateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMRunCommandsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.Get
+// method.
+type VirtualMachineScaleSetVMRunCommandsClientGetOptions struct {
+ // The expand expression to apply on the operation.
+ Expand *string
+}
+
+// VirtualMachineScaleSetVMRunCommandsClientListOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.NewListPager
+// method.
+type VirtualMachineScaleSetVMRunCommandsClientListOptions struct {
+ // The expand expression to apply on the operation.
+ Expand *string
+}
+
+// VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginApproveRollingUpgrade
+// method.
+type VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginAttachDetachDataDisks
+// method.
+type VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMsClientBeginDeallocateOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginDeallocate
+// method.
+type VirtualMachineScaleSetVMsClientBeginDeallocateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginDelete
+// method.
+type VirtualMachineScaleSetVMsClientBeginDeleteOptions struct {
+ // Optional parameter to force delete a virtual machine from a VM scale set. (Feature in Preview)
+ ForceDeletion *bool
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMsClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginPerformMaintenance
+// method.
+type VirtualMachineScaleSetVMsClientBeginPerformMaintenanceOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMsClientBeginPowerOffOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginPowerOff
+// method.
+type VirtualMachineScaleSetVMsClientBeginPowerOffOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+
+ // The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false
+ // indicates otherwise. Default value for this flag is false if not specified
+ SkipShutdown *bool
+}
+
+// VirtualMachineScaleSetVMsClientBeginRedeployOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginRedeploy
+// method.
+type VirtualMachineScaleSetVMsClientBeginRedeployOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMsClientBeginReimageAllOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginReimageAll
+// method.
+type VirtualMachineScaleSetVMsClientBeginReimageAllOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMsClientBeginReimageOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginReimage
+// method.
+type VirtualMachineScaleSetVMsClientBeginReimageOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+
+ // Parameters for the Reimaging Virtual machine in ScaleSet.
+ VMScaleSetVMReimageInput *VirtualMachineScaleSetVMReimageParameters
+}
+
+// VirtualMachineScaleSetVMsClientBeginRestartOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginRestart
+// method.
+type VirtualMachineScaleSetVMsClientBeginRestartOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMsClientBeginRunCommandOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginRunCommand
+// method.
+type VirtualMachineScaleSetVMsClientBeginRunCommandOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMsClientBeginStartOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginStart
+// method.
+type VirtualMachineScaleSetVMsClientBeginStartOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginUpdate
+// method.
+type VirtualMachineScaleSetVMsClientBeginUpdateOptions struct {
+ // The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value
+ // to prevent accidentally overwriting concurrent changes.
+ IfMatch *string
+
+ // Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will result
+ // in error from server as they are not supported.
+ IfNoneMatch *string
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetVMsClientGetInstanceViewOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.GetInstanceView
+// method.
+type VirtualMachineScaleSetVMsClientGetInstanceViewOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineScaleSetVMsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.Get
+// method.
+type VirtualMachineScaleSetVMsClientGetOptions struct {
+ // The expand expression to apply on the operation. 'InstanceView' will retrieve the instance view of the virtual machine.
+ // 'UserData' will retrieve the UserData of the virtual machine.
+ Expand *InstanceViewTypes
+}
+
+// VirtualMachineScaleSetVMsClientListOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.NewListPager
+// method.
+type VirtualMachineScaleSetVMsClientListOptions struct {
+ // The expand expression to apply to the operation. Allowed values are 'instanceView'.
+ Expand *string
+
+ // The filter to apply to the operation. Allowed values are 'startswith(instanceView/statuses/code, 'PowerState') eq true',
+ // 'properties/latestModelApplied eq true', 'properties/latestModelApplied eq
+ // false'.
+ Filter *string
+
+ // The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'.
+ Select *string
+}
+
+// VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.RetrieveBootDiagnosticsData
+// method.
+type VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataOptions struct {
+ // Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. Note: If not specified, SAS URIs
+ // will be generated with a default expiration duration of 120 minutes.
+ SasURIExpirationTimeInMinutes *int32
+}
+
+// VirtualMachineScaleSetVMsClientSimulateEvictionOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.SimulateEviction
+// method.
+type VirtualMachineScaleSetVMsClientSimulateEvictionOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginApproveRollingUpgrade
+// method.
+type VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+
+ // A list of virtual machine instance IDs from the VM scale set.
+ VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
+}
+
+// VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginCreateOrUpdate
+// method.
+type VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions struct {
+ // The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value
+ // to prevent accidentally overwriting concurrent changes.
+ IfMatch *string
+
+ // Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will result
+ // in error from server as they are not supported.
+ IfNoneMatch *string
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetsClientBeginDeallocateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDeallocate
+// method.
+type VirtualMachineScaleSetsClientBeginDeallocateOptions struct {
+ // Optional parameter to hibernate a virtual machine from the VM scale set. (This feature is available for VMSS with Flexible
+ // OrchestrationMode only)
+ Hibernate *bool
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+
+ // A list of virtual machine instance IDs from the VM scale set.
+ VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
+}
+
+// VirtualMachineScaleSetsClientBeginDeleteInstancesOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDeleteInstances
+// method.
+type VirtualMachineScaleSetsClientBeginDeleteInstancesOptions struct {
+ // Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview)
+ ForceDeletion *bool
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDelete
+// method.
+type VirtualMachineScaleSetsClientBeginDeleteOptions struct {
+ // Optional parameter to force delete a VM scale set. (Feature in Preview)
+ ForceDeletion *bool
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginPerformMaintenance
+// method.
+type VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+
+ // A list of virtual machine instance IDs from the VM scale set.
+ VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
+}
+
+// VirtualMachineScaleSetsClientBeginPowerOffOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginPowerOff
+// method.
+type VirtualMachineScaleSetsClientBeginPowerOffOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+
+ // The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false
+ // indicates otherwise. Default value for this flag is false if not specified
+ SkipShutdown *bool
+
+ // A list of virtual machine instance IDs from the VM scale set.
+ VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
+}
+
+// VirtualMachineScaleSetsClientBeginReapplyOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReapply
+// method.
+type VirtualMachineScaleSetsClientBeginReapplyOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetsClientBeginRedeployOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginRedeploy
+// method.
+type VirtualMachineScaleSetsClientBeginRedeployOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+
+ // A list of virtual machine instance IDs from the VM scale set.
+ VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
+}
+
+// VirtualMachineScaleSetsClientBeginReimageAllOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReimageAll
+// method.
+type VirtualMachineScaleSetsClientBeginReimageAllOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+
+ // A list of virtual machine instance IDs from the VM scale set.
+ VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
+}
+
+// VirtualMachineScaleSetsClientBeginReimageOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReimage
+// method.
+type VirtualMachineScaleSetsClientBeginReimageOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+
+ // Parameters for Reimaging VM ScaleSet.
+ VMScaleSetReimageInput *VirtualMachineScaleSetReimageParameters
+}
+
+// VirtualMachineScaleSetsClientBeginRestartOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginRestart
+// method.
+type VirtualMachineScaleSetsClientBeginRestartOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+
+ // A list of virtual machine instance IDs from the VM scale set.
+ VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
+}
+
+// VirtualMachineScaleSetsClientBeginSetOrchestrationServiceStateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginSetOrchestrationServiceState
+// method.
+type VirtualMachineScaleSetsClientBeginSetOrchestrationServiceStateOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetsClientBeginStartOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginStart
+// method.
+type VirtualMachineScaleSetsClientBeginStartOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+
+ // A list of virtual machine instance IDs from the VM scale set.
+ VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs
+}
+
+// VirtualMachineScaleSetsClientBeginUpdateInstancesOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginUpdateInstances
+// method.
+type VirtualMachineScaleSetsClientBeginUpdateInstancesOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginUpdate
+// method.
+type VirtualMachineScaleSetsClientBeginUpdateOptions struct {
+ // The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value
+ // to prevent accidentally overwriting concurrent changes.
+ IfMatch *string
+
+ // Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will result
+ // in error from server as they are not supported.
+ IfNoneMatch *string
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachineScaleSetsClientConvertToSinglePlacementGroupOptions contains the optional parameters for the VirtualMachineScaleSetsClient.ConvertToSinglePlacementGroup
+// method.
+type VirtualMachineScaleSetsClientConvertToSinglePlacementGroupOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkOptions contains the optional parameters
+// for the VirtualMachineScaleSetsClient.ForceRecoveryServiceFabricPlatformUpdateDomainWalk method.
+type VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkOptions struct {
+ // The placement group id for which the manual recovery walk is requested.
+ PlacementGroupID *string
+
+ // The zone in which the manual recovery walk is requested for cross zone virtual machine scale set
+ Zone *string
+}
+
+// VirtualMachineScaleSetsClientGetInstanceViewOptions contains the optional parameters for the VirtualMachineScaleSetsClient.GetInstanceView
+// method.
+type VirtualMachineScaleSetsClientGetInstanceViewOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineScaleSetsClientGetOSUpgradeHistoryOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewGetOSUpgradeHistoryPager
+// method.
+type VirtualMachineScaleSetsClientGetOSUpgradeHistoryOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineScaleSetsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetsClient.Get method.
+type VirtualMachineScaleSetsClientGetOptions struct {
+ // The expand expression to apply on the operation. 'UserData' retrieves the UserData property of the VM scale set that was
+ // provided by the user during the VM scale set Create/Update operation
+ Expand *ExpandTypesForGetVMScaleSets
+}
+
+// VirtualMachineScaleSetsClientListAllOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListAllPager
+// method.
+type VirtualMachineScaleSetsClientListAllOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineScaleSetsClientListByLocationOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListByLocationPager
+// method.
+type VirtualMachineScaleSetsClientListByLocationOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineScaleSetsClientListOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListPager
+// method.
+type VirtualMachineScaleSetsClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineScaleSetsClientListSKUsOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListSKUsPager
+// method.
+type VirtualMachineScaleSetsClientListSKUsOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachineSizesClientListOptions contains the optional parameters for the VirtualMachineSizesClient.NewListPager method.
+type VirtualMachineSizesClientListOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachinesClientBeginAssessPatchesOptions contains the optional parameters for the VirtualMachinesClient.BeginAssessPatches
+// method.
+type VirtualMachinesClientBeginAssessPatchesOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginAttachDetachDataDisksOptions contains the optional parameters for the VirtualMachinesClient.BeginAttachDetachDataDisks
+// method.
+type VirtualMachinesClientBeginAttachDetachDataDisksOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginCaptureOptions contains the optional parameters for the VirtualMachinesClient.BeginCapture method.
+type VirtualMachinesClientBeginCaptureOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginConvertToManagedDisksOptions contains the optional parameters for the VirtualMachinesClient.BeginConvertToManagedDisks
+// method.
+type VirtualMachinesClientBeginConvertToManagedDisksOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateOrUpdate
+// method.
+type VirtualMachinesClientBeginCreateOrUpdateOptions struct {
+ // The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value
+ // to prevent accidentally overwriting concurrent changes.
+ IfMatch *string
+
+ // Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will result
+ // in error from server as they are not supported.
+ IfNoneMatch *string
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginDeallocateOptions contains the optional parameters for the VirtualMachinesClient.BeginDeallocate
+// method.
+type VirtualMachinesClientBeginDeallocateOptions struct {
+ // Optional parameter to hibernate a virtual machine.
+ Hibernate *bool
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete method.
+type VirtualMachinesClientBeginDeleteOptions struct {
+ // Optional parameter to force delete virtual machines.
+ ForceDeletion *bool
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginInstallPatchesOptions contains the optional parameters for the VirtualMachinesClient.BeginInstallPatches
+// method.
+type VirtualMachinesClientBeginInstallPatchesOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachinesClient.BeginPerformMaintenance
+// method.
+type VirtualMachinesClientBeginPerformMaintenanceOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginPowerOffOptions contains the optional parameters for the VirtualMachinesClient.BeginPowerOff
+// method.
+type VirtualMachinesClientBeginPowerOffOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+
+ // The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false
+ // indicates otherwise. Default value for this flag is false if not specified
+ SkipShutdown *bool
+}
+
+// VirtualMachinesClientBeginReapplyOptions contains the optional parameters for the VirtualMachinesClient.BeginReapply method.
+type VirtualMachinesClientBeginReapplyOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginRedeployOptions contains the optional parameters for the VirtualMachinesClient.BeginRedeploy
+// method.
+type VirtualMachinesClientBeginRedeployOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginReimageOptions contains the optional parameters for the VirtualMachinesClient.BeginReimage method.
+type VirtualMachinesClientBeginReimageOptions struct {
+ // Parameters supplied to the Reimage Virtual Machine operation.
+ Parameters *VirtualMachineReimageParameters
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginRestartOptions contains the optional parameters for the VirtualMachinesClient.BeginRestart method.
+type VirtualMachinesClientBeginRestartOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginRunCommandOptions contains the optional parameters for the VirtualMachinesClient.BeginRunCommand
+// method.
+type VirtualMachinesClientBeginRunCommandOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart method.
+type VirtualMachinesClientBeginStartOptions struct {
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientBeginUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginUpdate method.
+type VirtualMachinesClientBeginUpdateOptions struct {
+ // The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value
+ // to prevent accidentally overwriting concurrent changes.
+ IfMatch *string
+
+ // Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will result
+ // in error from server as they are not supported.
+ IfNoneMatch *string
+
+ // Resumes the LRO from the provided token.
+ ResumeToken string
+}
+
+// VirtualMachinesClientGeneralizeOptions contains the optional parameters for the VirtualMachinesClient.Generalize method.
+type VirtualMachinesClientGeneralizeOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
+type VirtualMachinesClientGetOptions struct {
+ // The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the virtual
+ // machine that is managed by the platform and can change outside of control
+ // plane operations. 'UserData' retrieves the UserData property as part of the VM model view that was provided by the user
+ // during the VM Create/Update operation.
+ Expand *InstanceViewTypes
+}
+
+// VirtualMachinesClientInstanceViewOptions contains the optional parameters for the VirtualMachinesClient.InstanceView method.
+type VirtualMachinesClientInstanceViewOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachinesClientListAllOptions contains the optional parameters for the VirtualMachinesClient.NewListAllPager method.
+type VirtualMachinesClientListAllOptions struct {
+ // The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this
+ // can only be specified if a valid $filter option is specified
+ Expand *ExpandTypesForListVMs
+
+ // The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq
+ // /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'
+ Filter *string
+
+ // statusOnly=true enables fetching run time status of all Virtual Machines in the subscription.
+ StatusOnly *string
+}
+
+// VirtualMachinesClientListAvailableSizesOptions contains the optional parameters for the VirtualMachinesClient.NewListAvailableSizesPager
+// method.
+type VirtualMachinesClientListAvailableSizesOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachinesClientListByLocationOptions contains the optional parameters for the VirtualMachinesClient.NewListByLocationPager
+// method.
+type VirtualMachinesClientListByLocationOptions struct {
+ // placeholder for future optional parameters
+}
+
+// VirtualMachinesClientListOptions contains the optional parameters for the VirtualMachinesClient.NewListPager method.
+type VirtualMachinesClientListOptions struct {
+ // The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this
+ // can only be specified if a valid $filter option is specified
+ Expand *ExpandTypeForListVMs
+
+ // The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq
+ // /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'
+ Filter *string
+}
+
+// VirtualMachinesClientRetrieveBootDiagnosticsDataOptions contains the optional parameters for the VirtualMachinesClient.RetrieveBootDiagnosticsData
+// method.
+type VirtualMachinesClientRetrieveBootDiagnosticsDataOptions struct {
+ // Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. Note: If not specified, SAS URIs
+ // will be generated with a default expiration duration of 120 minutes.
+ SasURIExpirationTimeInMinutes *int32
+}
+
+// VirtualMachinesClientSimulateEvictionOptions contains the optional parameters for the VirtualMachinesClient.SimulateEviction
+// method.
+type VirtualMachinesClientSimulateEvictionOptions struct {
+ // placeholder for future optional parameters
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/proximityplacementgroups_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/proximityplacementgroups_client.go
new file mode 100644
index 000000000..c18659203
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/proximityplacementgroups_client.go
@@ -0,0 +1,421 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// ProximityPlacementGroupsClient contains the methods for the ProximityPlacementGroups group.
+// Don't use this type directly, use NewProximityPlacementGroupsClient() instead.
+type ProximityPlacementGroupsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewProximityPlacementGroupsClient creates a new instance of ProximityPlacementGroupsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewProximityPlacementGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProximityPlacementGroupsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &ProximityPlacementGroupsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// CreateOrUpdate - Create or update a proximity placement group.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - proximityPlacementGroupName - The name of the proximity placement group.
+// - parameters - Parameters supplied to the Create Proximity Placement Group operation.
+// - options - ProximityPlacementGroupsClientCreateOrUpdateOptions contains the optional parameters for the ProximityPlacementGroupsClient.CreateOrUpdate
+// method.
+func (client *ProximityPlacementGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroup, options *ProximityPlacementGroupsClientCreateOrUpdateOptions) (ProximityPlacementGroupsClientCreateOrUpdateResponse, error) {
+ var err error
+ const operationName = "ProximityPlacementGroupsClient.CreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, proximityPlacementGroupName, parameters, options)
+ if err != nil {
+ return ProximityPlacementGroupsClientCreateOrUpdateResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return ProximityPlacementGroupsClientCreateOrUpdateResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return ProximityPlacementGroupsClientCreateOrUpdateResponse{}, err
+ }
+ resp, err := client.createOrUpdateHandleResponse(httpResp)
+ return resp, err
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *ProximityPlacementGroupsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroup, options *ProximityPlacementGroupsClientCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if proximityPlacementGroupName == "" {
+ return nil, errors.New("parameter proximityPlacementGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{proximityPlacementGroupName}", url.PathEscape(proximityPlacementGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// createOrUpdateHandleResponse handles the CreateOrUpdate response.
+func (client *ProximityPlacementGroupsClient) createOrUpdateHandleResponse(resp *http.Response) (ProximityPlacementGroupsClientCreateOrUpdateResponse, error) {
+ result := ProximityPlacementGroupsClientCreateOrUpdateResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.ProximityPlacementGroup); err != nil {
+ return ProximityPlacementGroupsClientCreateOrUpdateResponse{}, err
+ }
+ return result, nil
+}
+
+// Delete - Delete a proximity placement group.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - proximityPlacementGroupName - The name of the proximity placement group.
+// - options - ProximityPlacementGroupsClientDeleteOptions contains the optional parameters for the ProximityPlacementGroupsClient.Delete
+// method.
+func (client *ProximityPlacementGroupsClient) Delete(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, options *ProximityPlacementGroupsClientDeleteOptions) (ProximityPlacementGroupsClientDeleteResponse, error) {
+ var err error
+ const operationName = "ProximityPlacementGroupsClient.Delete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, proximityPlacementGroupName, options)
+ if err != nil {
+ return ProximityPlacementGroupsClientDeleteResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return ProximityPlacementGroupsClientDeleteResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return ProximityPlacementGroupsClientDeleteResponse{}, err
+ }
+ return ProximityPlacementGroupsClientDeleteResponse{}, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *ProximityPlacementGroupsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, options *ProximityPlacementGroupsClientDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if proximityPlacementGroupName == "" {
+ return nil, errors.New("parameter proximityPlacementGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{proximityPlacementGroupName}", url.PathEscape(proximityPlacementGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Retrieves information about a proximity placement group .
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - proximityPlacementGroupName - The name of the proximity placement group.
+// - options - ProximityPlacementGroupsClientGetOptions contains the optional parameters for the ProximityPlacementGroupsClient.Get
+// method.
+func (client *ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, options *ProximityPlacementGroupsClientGetOptions) (ProximityPlacementGroupsClientGetResponse, error) {
+ var err error
+ const operationName = "ProximityPlacementGroupsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, proximityPlacementGroupName, options)
+ if err != nil {
+ return ProximityPlacementGroupsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return ProximityPlacementGroupsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return ProximityPlacementGroupsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *ProximityPlacementGroupsClient) getCreateRequest(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, options *ProximityPlacementGroupsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if proximityPlacementGroupName == "" {
+ return nil, errors.New("parameter proximityPlacementGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{proximityPlacementGroupName}", url.PathEscape(proximityPlacementGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.IncludeColocationStatus != nil {
+ reqQP.Set("includeColocationStatus", *options.IncludeColocationStatus)
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *ProximityPlacementGroupsClient) getHandleResponse(resp *http.Response) (ProximityPlacementGroupsClientGetResponse, error) {
+ result := ProximityPlacementGroupsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.ProximityPlacementGroup); err != nil {
+ return ProximityPlacementGroupsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByResourceGroupPager - Lists all proximity placement groups in a resource group.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - options - ProximityPlacementGroupsClientListByResourceGroupOptions contains the optional parameters for the ProximityPlacementGroupsClient.NewListByResourceGroupPager
+// method.
+func (client *ProximityPlacementGroupsClient) NewListByResourceGroupPager(resourceGroupName string, options *ProximityPlacementGroupsClientListByResourceGroupOptions) *runtime.Pager[ProximityPlacementGroupsClientListByResourceGroupResponse] {
+ return runtime.NewPager(runtime.PagingHandler[ProximityPlacementGroupsClientListByResourceGroupResponse]{
+ More: func(page ProximityPlacementGroupsClientListByResourceGroupResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *ProximityPlacementGroupsClientListByResourceGroupResponse) (ProximityPlacementGroupsClientListByResourceGroupResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProximityPlacementGroupsClient.NewListByResourceGroupPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return ProximityPlacementGroupsClientListByResourceGroupResponse{}, err
+ }
+ return client.listByResourceGroupHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByResourceGroupCreateRequest creates the ListByResourceGroup request.
+func (client *ProximityPlacementGroupsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ProximityPlacementGroupsClientListByResourceGroupOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByResourceGroupHandleResponse handles the ListByResourceGroup response.
+func (client *ProximityPlacementGroupsClient) listByResourceGroupHandleResponse(resp *http.Response) (ProximityPlacementGroupsClientListByResourceGroupResponse, error) {
+ result := ProximityPlacementGroupsClientListByResourceGroupResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.ProximityPlacementGroupListResult); err != nil {
+ return ProximityPlacementGroupsClientListByResourceGroupResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListBySubscriptionPager - Lists all proximity placement groups in a subscription.
+//
+// Generated from API version 2024-03-01
+// - options - ProximityPlacementGroupsClientListBySubscriptionOptions contains the optional parameters for the ProximityPlacementGroupsClient.NewListBySubscriptionPager
+// method.
+func (client *ProximityPlacementGroupsClient) NewListBySubscriptionPager(options *ProximityPlacementGroupsClientListBySubscriptionOptions) *runtime.Pager[ProximityPlacementGroupsClientListBySubscriptionResponse] {
+ return runtime.NewPager(runtime.PagingHandler[ProximityPlacementGroupsClientListBySubscriptionResponse]{
+ More: func(page ProximityPlacementGroupsClientListBySubscriptionResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *ProximityPlacementGroupsClientListBySubscriptionResponse) (ProximityPlacementGroupsClientListBySubscriptionResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProximityPlacementGroupsClient.NewListBySubscriptionPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listBySubscriptionCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return ProximityPlacementGroupsClientListBySubscriptionResponse{}, err
+ }
+ return client.listBySubscriptionHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listBySubscriptionCreateRequest creates the ListBySubscription request.
+func (client *ProximityPlacementGroupsClient) listBySubscriptionCreateRequest(ctx context.Context, options *ProximityPlacementGroupsClientListBySubscriptionOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listBySubscriptionHandleResponse handles the ListBySubscription response.
+func (client *ProximityPlacementGroupsClient) listBySubscriptionHandleResponse(resp *http.Response) (ProximityPlacementGroupsClientListBySubscriptionResponse, error) {
+ result := ProximityPlacementGroupsClientListBySubscriptionResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.ProximityPlacementGroupListResult); err != nil {
+ return ProximityPlacementGroupsClientListBySubscriptionResponse{}, err
+ }
+ return result, nil
+}
+
+// Update - Update a proximity placement group.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - proximityPlacementGroupName - The name of the proximity placement group.
+// - parameters - Parameters supplied to the Update Proximity Placement Group operation.
+// - options - ProximityPlacementGroupsClientUpdateOptions contains the optional parameters for the ProximityPlacementGroupsClient.Update
+// method.
+func (client *ProximityPlacementGroupsClient) Update(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroupUpdate, options *ProximityPlacementGroupsClientUpdateOptions) (ProximityPlacementGroupsClientUpdateResponse, error) {
+ var err error
+ const operationName = "ProximityPlacementGroupsClient.Update"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, proximityPlacementGroupName, parameters, options)
+ if err != nil {
+ return ProximityPlacementGroupsClientUpdateResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return ProximityPlacementGroupsClientUpdateResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return ProximityPlacementGroupsClientUpdateResponse{}, err
+ }
+ resp, err := client.updateHandleResponse(httpResp)
+ return resp, err
+}
+
+// updateCreateRequest creates the Update request.
+func (client *ProximityPlacementGroupsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroupUpdate, options *ProximityPlacementGroupsClientUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if proximityPlacementGroupName == "" {
+ return nil, errors.New("parameter proximityPlacementGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{proximityPlacementGroupName}", url.PathEscape(proximityPlacementGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// updateHandleResponse handles the Update response.
+func (client *ProximityPlacementGroupsClient) updateHandleResponse(resp *http.Response) (ProximityPlacementGroupsClientUpdateResponse, error) {
+ result := ProximityPlacementGroupsClientUpdateResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.ProximityPlacementGroup); err != nil {
+ return ProximityPlacementGroupsClientUpdateResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/resourceskus_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/resourceskus_client.go
new file mode 100644
index 000000000..f716c1ccf
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/resourceskus_client.go
@@ -0,0 +1,105 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// ResourceSKUsClient contains the methods for the ResourceSKUs group.
+// Don't use this type directly, use NewResourceSKUsClient() instead.
+type ResourceSKUsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewResourceSKUsClient creates a new instance of ResourceSKUsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewResourceSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceSKUsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &ResourceSKUsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// NewListPager - Gets the list of Microsoft.Compute SKUs available for your Subscription.
+//
+// Generated from API version 2021-07-01
+// - options - ResourceSKUsClientListOptions contains the optional parameters for the ResourceSKUsClient.NewListPager method.
+func (client *ResourceSKUsClient) NewListPager(options *ResourceSKUsClientListOptions) *runtime.Pager[ResourceSKUsClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[ResourceSKUsClientListResponse]{
+ More: func(page ResourceSKUsClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *ResourceSKUsClientListResponse) (ResourceSKUsClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceSKUsClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return ResourceSKUsClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *ResourceSKUsClient) listCreateRequest(ctx context.Context, options *ResourceSKUsClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Filter != nil {
+ reqQP.Set("$filter", *options.Filter)
+ }
+ reqQP.Set("api-version", "2021-07-01")
+ if options != nil && options.IncludeExtendedLocations != nil {
+ reqQP.Set("includeExtendedLocations", *options.IncludeExtendedLocations)
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *ResourceSKUsClient) listHandleResponse(resp *http.Response) (ResourceSKUsClientListResponse, error) {
+ result := ResourceSKUsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.ResourceSKUsResult); err != nil {
+ return ResourceSKUsClientListResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/responses.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/responses.go
new file mode 100644
index 000000000..db4fc2bd3
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/responses.go
@@ -0,0 +1,1673 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import "io"
+
+// AvailabilitySetsClientCreateOrUpdateResponse contains the response from method AvailabilitySetsClient.CreateOrUpdate.
+type AvailabilitySetsClientCreateOrUpdateResponse struct {
+ // Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified
+ // in the same availability set are allocated to different nodes to maximize availability. For more information about availability
+ // sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For
+ // more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates).
+ // Currently, a VM can only be added to an availability set at creation time. An existing VM cannot be added to an availability
+ // set.
+ AvailabilitySet
+}
+
+// AvailabilitySetsClientDeleteResponse contains the response from method AvailabilitySetsClient.Delete.
+type AvailabilitySetsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// AvailabilitySetsClientGetResponse contains the response from method AvailabilitySetsClient.Get.
+type AvailabilitySetsClientGetResponse struct {
+ // Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified
+ // in the same availability set are allocated to different nodes to maximize availability. For more information about availability
+ // sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For
+ // more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates).
+ // Currently, a VM can only be added to an availability set at creation time. An existing VM cannot be added to an availability
+ // set.
+ AvailabilitySet
+}
+
+// AvailabilitySetsClientListAvailableSizesResponse contains the response from method AvailabilitySetsClient.NewListAvailableSizesPager.
+type AvailabilitySetsClientListAvailableSizesResponse struct {
+ // The List Virtual Machine operation response.
+ VirtualMachineSizeListResult
+}
+
+// AvailabilitySetsClientListBySubscriptionResponse contains the response from method AvailabilitySetsClient.NewListBySubscriptionPager.
+type AvailabilitySetsClientListBySubscriptionResponse struct {
+ // The List Availability Set operation response.
+ AvailabilitySetListResult
+}
+
+// AvailabilitySetsClientListResponse contains the response from method AvailabilitySetsClient.NewListPager.
+type AvailabilitySetsClientListResponse struct {
+ // The List Availability Set operation response.
+ AvailabilitySetListResult
+}
+
+// AvailabilitySetsClientUpdateResponse contains the response from method AvailabilitySetsClient.Update.
+type AvailabilitySetsClientUpdateResponse struct {
+ // Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified
+ // in the same availability set are allocated to different nodes to maximize availability. For more information about availability
+ // sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For
+ // more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates).
+ // Currently, a VM can only be added to an availability set at creation time. An existing VM cannot be added to an availability
+ // set.
+ AvailabilitySet
+}
+
+// CapacityReservationGroupsClientCreateOrUpdateResponse contains the response from method CapacityReservationGroupsClient.CreateOrUpdate.
+type CapacityReservationGroupsClientCreateOrUpdateResponse struct {
+ // Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently,
+ // a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation
+ // cannot be added or moved to another capacity reservation group.
+ CapacityReservationGroup
+}
+
+// CapacityReservationGroupsClientDeleteResponse contains the response from method CapacityReservationGroupsClient.Delete.
+type CapacityReservationGroupsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// CapacityReservationGroupsClientGetResponse contains the response from method CapacityReservationGroupsClient.Get.
+type CapacityReservationGroupsClientGetResponse struct {
+ // Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently,
+ // a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation
+ // cannot be added or moved to another capacity reservation group.
+ CapacityReservationGroup
+}
+
+// CapacityReservationGroupsClientListByResourceGroupResponse contains the response from method CapacityReservationGroupsClient.NewListByResourceGroupPager.
+type CapacityReservationGroupsClientListByResourceGroupResponse struct {
+ // The List capacity reservation group with resource group response.
+ CapacityReservationGroupListResult
+}
+
+// CapacityReservationGroupsClientListBySubscriptionResponse contains the response from method CapacityReservationGroupsClient.NewListBySubscriptionPager.
+type CapacityReservationGroupsClientListBySubscriptionResponse struct {
+ // The List capacity reservation group with resource group response.
+ CapacityReservationGroupListResult
+}
+
+// CapacityReservationGroupsClientUpdateResponse contains the response from method CapacityReservationGroupsClient.Update.
+type CapacityReservationGroupsClientUpdateResponse struct {
+ // Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently,
+ // a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation
+ // cannot be added or moved to another capacity reservation group.
+ CapacityReservationGroup
+}
+
+// CapacityReservationsClientCreateOrUpdateResponse contains the response from method CapacityReservationsClient.BeginCreateOrUpdate.
+type CapacityReservationsClientCreateOrUpdateResponse struct {
+ // Specifies information about the capacity reservation.
+ CapacityReservation
+}
+
+// CapacityReservationsClientDeleteResponse contains the response from method CapacityReservationsClient.BeginDelete.
+type CapacityReservationsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// CapacityReservationsClientGetResponse contains the response from method CapacityReservationsClient.Get.
+type CapacityReservationsClientGetResponse struct {
+ // Specifies information about the capacity reservation.
+ CapacityReservation
+}
+
+// CapacityReservationsClientListByCapacityReservationGroupResponse contains the response from method CapacityReservationsClient.NewListByCapacityReservationGroupPager.
+type CapacityReservationsClientListByCapacityReservationGroupResponse struct {
+ // The list capacity reservation operation response.
+ CapacityReservationListResult
+}
+
+// CapacityReservationsClientUpdateResponse contains the response from method CapacityReservationsClient.BeginUpdate.
+type CapacityReservationsClientUpdateResponse struct {
+ // Specifies information about the capacity reservation.
+ CapacityReservation
+}
+
+// CloudServiceOperatingSystemsClientGetOSFamilyResponse contains the response from method CloudServiceOperatingSystemsClient.GetOSFamily.
+type CloudServiceOperatingSystemsClientGetOSFamilyResponse struct {
+ // Describes a cloud service OS family.
+ OSFamily
+}
+
+// CloudServiceOperatingSystemsClientGetOSVersionResponse contains the response from method CloudServiceOperatingSystemsClient.GetOSVersion.
+type CloudServiceOperatingSystemsClientGetOSVersionResponse struct {
+ // Describes a cloud service OS version.
+ OSVersion
+}
+
+// CloudServiceOperatingSystemsClientListOSFamiliesResponse contains the response from method CloudServiceOperatingSystemsClient.NewListOSFamiliesPager.
+type CloudServiceOperatingSystemsClientListOSFamiliesResponse struct {
+ // The list operation result.
+ OSFamilyListResult
+}
+
+// CloudServiceOperatingSystemsClientListOSVersionsResponse contains the response from method CloudServiceOperatingSystemsClient.NewListOSVersionsPager.
+type CloudServiceOperatingSystemsClientListOSVersionsResponse struct {
+ // The list operation result.
+ OSVersionListResult
+}
+
+// CloudServiceRoleInstancesClientDeleteResponse contains the response from method CloudServiceRoleInstancesClient.BeginDelete.
+type CloudServiceRoleInstancesClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// CloudServiceRoleInstancesClientGetInstanceViewResponse contains the response from method CloudServiceRoleInstancesClient.GetInstanceView.
+type CloudServiceRoleInstancesClientGetInstanceViewResponse struct {
+ // The instance view of the role instance.
+ RoleInstanceView
+}
+
+// CloudServiceRoleInstancesClientGetRemoteDesktopFileResponse contains the response from method CloudServiceRoleInstancesClient.GetRemoteDesktopFile.
+type CloudServiceRoleInstancesClientGetRemoteDesktopFileResponse struct {
+ // Body contains the streaming response.
+ Body io.ReadCloser
+}
+
+// CloudServiceRoleInstancesClientGetResponse contains the response from method CloudServiceRoleInstancesClient.Get.
+type CloudServiceRoleInstancesClientGetResponse struct {
+ // Describes the cloud service role instance.
+ RoleInstance
+}
+
+// CloudServiceRoleInstancesClientListResponse contains the response from method CloudServiceRoleInstancesClient.NewListPager.
+type CloudServiceRoleInstancesClientListResponse struct {
+ // The list operation result.
+ RoleInstanceListResult
+}
+
+// CloudServiceRoleInstancesClientRebuildResponse contains the response from method CloudServiceRoleInstancesClient.BeginRebuild.
+type CloudServiceRoleInstancesClientRebuildResponse struct {
+ // placeholder for future response values
+}
+
+// CloudServiceRoleInstancesClientReimageResponse contains the response from method CloudServiceRoleInstancesClient.BeginReimage.
+type CloudServiceRoleInstancesClientReimageResponse struct {
+ // placeholder for future response values
+}
+
+// CloudServiceRoleInstancesClientRestartResponse contains the response from method CloudServiceRoleInstancesClient.BeginRestart.
+type CloudServiceRoleInstancesClientRestartResponse struct {
+ // placeholder for future response values
+}
+
+// CloudServiceRolesClientGetResponse contains the response from method CloudServiceRolesClient.Get.
+type CloudServiceRolesClientGetResponse struct {
+ // Describes a role of the cloud service.
+ CloudServiceRole
+}
+
+// CloudServiceRolesClientListResponse contains the response from method CloudServiceRolesClient.NewListPager.
+type CloudServiceRolesClientListResponse struct {
+ // The list operation result.
+ CloudServiceRoleListResult
+}
+
+// CloudServicesClientCreateOrUpdateResponse contains the response from method CloudServicesClient.BeginCreateOrUpdate.
+type CloudServicesClientCreateOrUpdateResponse struct {
+ // Describes the cloud service.
+ CloudService
+}
+
+// CloudServicesClientDeleteInstancesResponse contains the response from method CloudServicesClient.BeginDeleteInstances.
+type CloudServicesClientDeleteInstancesResponse struct {
+ // placeholder for future response values
+}
+
+// CloudServicesClientDeleteResponse contains the response from method CloudServicesClient.BeginDelete.
+type CloudServicesClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// CloudServicesClientGetInstanceViewResponse contains the response from method CloudServicesClient.GetInstanceView.
+type CloudServicesClientGetInstanceViewResponse struct {
+ // InstanceView of CloudService as a whole
+ CloudServiceInstanceView
+}
+
+// CloudServicesClientGetResponse contains the response from method CloudServicesClient.Get.
+type CloudServicesClientGetResponse struct {
+ // Describes the cloud service.
+ CloudService
+}
+
+// CloudServicesClientListAllResponse contains the response from method CloudServicesClient.NewListAllPager.
+type CloudServicesClientListAllResponse struct {
+ // The list operation result.
+ CloudServiceListResult
+}
+
+// CloudServicesClientListResponse contains the response from method CloudServicesClient.NewListPager.
+type CloudServicesClientListResponse struct {
+ // The list operation result.
+ CloudServiceListResult
+}
+
+// CloudServicesClientPowerOffResponse contains the response from method CloudServicesClient.BeginPowerOff.
+type CloudServicesClientPowerOffResponse struct {
+ // placeholder for future response values
+}
+
+// CloudServicesClientRebuildResponse contains the response from method CloudServicesClient.BeginRebuild.
+type CloudServicesClientRebuildResponse struct {
+ // placeholder for future response values
+}
+
+// CloudServicesClientReimageResponse contains the response from method CloudServicesClient.BeginReimage.
+type CloudServicesClientReimageResponse struct {
+ // placeholder for future response values
+}
+
+// CloudServicesClientRestartResponse contains the response from method CloudServicesClient.BeginRestart.
+type CloudServicesClientRestartResponse struct {
+ // placeholder for future response values
+}
+
+// CloudServicesClientStartResponse contains the response from method CloudServicesClient.BeginStart.
+type CloudServicesClientStartResponse struct {
+ // placeholder for future response values
+}
+
+// CloudServicesClientUpdateResponse contains the response from method CloudServicesClient.BeginUpdate.
+type CloudServicesClientUpdateResponse struct {
+ // Describes the cloud service.
+ CloudService
+}
+
+// CloudServicesUpdateDomainClientGetUpdateDomainResponse contains the response from method CloudServicesUpdateDomainClient.GetUpdateDomain.
+type CloudServicesUpdateDomainClientGetUpdateDomainResponse struct {
+ // Defines an update domain for the cloud service.
+ UpdateDomain
+}
+
+// CloudServicesUpdateDomainClientListUpdateDomainsResponse contains the response from method CloudServicesUpdateDomainClient.NewListUpdateDomainsPager.
+type CloudServicesUpdateDomainClientListUpdateDomainsResponse struct {
+ // The list operation result.
+ UpdateDomainListResult
+}
+
+// CloudServicesUpdateDomainClientWalkUpdateDomainResponse contains the response from method CloudServicesUpdateDomainClient.BeginWalkUpdateDomain.
+type CloudServicesUpdateDomainClientWalkUpdateDomainResponse struct {
+ // placeholder for future response values
+}
+
+// CommunityGalleriesClientGetResponse contains the response from method CommunityGalleriesClient.Get.
+type CommunityGalleriesClientGetResponse struct {
+ // Specifies information about the Community Gallery that you want to create or update.
+ CommunityGallery
+}
+
+// CommunityGalleryImageVersionsClientGetResponse contains the response from method CommunityGalleryImageVersionsClient.Get.
+type CommunityGalleryImageVersionsClientGetResponse struct {
+ // Specifies information about the gallery image version that you want to create or update.
+ CommunityGalleryImageVersion
+}
+
+// CommunityGalleryImageVersionsClientListResponse contains the response from method CommunityGalleryImageVersionsClient.NewListPager.
+type CommunityGalleryImageVersionsClientListResponse struct {
+ // The List Community Gallery Image versions operation response.
+ CommunityGalleryImageVersionList
+}
+
+// CommunityGalleryImagesClientGetResponse contains the response from method CommunityGalleryImagesClient.Get.
+type CommunityGalleryImagesClientGetResponse struct {
+ // Specifies information about the gallery image definition that you want to create or update.
+ CommunityGalleryImage
+}
+
+// CommunityGalleryImagesClientListResponse contains the response from method CommunityGalleryImagesClient.NewListPager.
+type CommunityGalleryImagesClientListResponse struct {
+ // The List Community Gallery Images operation response.
+ CommunityGalleryImageList
+}
+
+// DedicatedHostGroupsClientCreateOrUpdateResponse contains the response from method DedicatedHostGroupsClient.CreateOrUpdate.
+type DedicatedHostGroupsClientCreateOrUpdateResponse struct {
+ // Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated
+ // host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another
+ // dedicated host group.
+ DedicatedHostGroup
+}
+
+// DedicatedHostGroupsClientDeleteResponse contains the response from method DedicatedHostGroupsClient.Delete.
+type DedicatedHostGroupsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// DedicatedHostGroupsClientGetResponse contains the response from method DedicatedHostGroupsClient.Get.
+type DedicatedHostGroupsClientGetResponse struct {
+ // Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated
+ // host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another
+ // dedicated host group.
+ DedicatedHostGroup
+}
+
+// DedicatedHostGroupsClientListByResourceGroupResponse contains the response from method DedicatedHostGroupsClient.NewListByResourceGroupPager.
+type DedicatedHostGroupsClientListByResourceGroupResponse struct {
+ // The List Dedicated Host Group with resource group response.
+ DedicatedHostGroupListResult
+}
+
+// DedicatedHostGroupsClientListBySubscriptionResponse contains the response from method DedicatedHostGroupsClient.NewListBySubscriptionPager.
+type DedicatedHostGroupsClientListBySubscriptionResponse struct {
+ // The List Dedicated Host Group with resource group response.
+ DedicatedHostGroupListResult
+}
+
+// DedicatedHostGroupsClientUpdateResponse contains the response from method DedicatedHostGroupsClient.Update.
+type DedicatedHostGroupsClientUpdateResponse struct {
+ // Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated
+ // host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another
+ // dedicated host group.
+ DedicatedHostGroup
+}
+
+// DedicatedHostsClientCreateOrUpdateResponse contains the response from method DedicatedHostsClient.BeginCreateOrUpdate.
+type DedicatedHostsClientCreateOrUpdateResponse struct {
+ // Specifies information about the Dedicated host.
+ DedicatedHost
+}
+
+// DedicatedHostsClientDeleteResponse contains the response from method DedicatedHostsClient.BeginDelete.
+type DedicatedHostsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// DedicatedHostsClientGetResponse contains the response from method DedicatedHostsClient.Get.
+type DedicatedHostsClientGetResponse struct {
+ // Specifies information about the Dedicated host.
+ DedicatedHost
+}
+
+// DedicatedHostsClientListAvailableSizesResponse contains the response from method DedicatedHostsClient.NewListAvailableSizesPager.
+type DedicatedHostsClientListAvailableSizesResponse struct {
+ // The List Dedicated Host sizes operation response.
+ DedicatedHostSizeListResult
+}
+
+// DedicatedHostsClientListByHostGroupResponse contains the response from method DedicatedHostsClient.NewListByHostGroupPager.
+type DedicatedHostsClientListByHostGroupResponse struct {
+ // The list dedicated host operation response.
+ DedicatedHostListResult
+}
+
+// DedicatedHostsClientRedeployResponse contains the response from method DedicatedHostsClient.BeginRedeploy.
+type DedicatedHostsClientRedeployResponse struct {
+ // placeholder for future response values
+}
+
+// DedicatedHostsClientRestartResponse contains the response from method DedicatedHostsClient.BeginRestart.
+type DedicatedHostsClientRestartResponse struct {
+ // placeholder for future response values
+}
+
+// DedicatedHostsClientUpdateResponse contains the response from method DedicatedHostsClient.BeginUpdate.
+type DedicatedHostsClientUpdateResponse struct {
+ // Specifies information about the Dedicated host.
+ DedicatedHost
+}
+
+// DiskAccessesClientCreateOrUpdateResponse contains the response from method DiskAccessesClient.BeginCreateOrUpdate.
+type DiskAccessesClientCreateOrUpdateResponse struct {
+ // disk access resource.
+ DiskAccess
+}
+
+// DiskAccessesClientDeleteAPrivateEndpointConnectionResponse contains the response from method DiskAccessesClient.BeginDeleteAPrivateEndpointConnection.
+type DiskAccessesClientDeleteAPrivateEndpointConnectionResponse struct {
+ // placeholder for future response values
+}
+
+// DiskAccessesClientDeleteResponse contains the response from method DiskAccessesClient.BeginDelete.
+type DiskAccessesClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// DiskAccessesClientGetAPrivateEndpointConnectionResponse contains the response from method DiskAccessesClient.GetAPrivateEndpointConnection.
+type DiskAccessesClientGetAPrivateEndpointConnectionResponse struct {
+ // The Private Endpoint Connection resource.
+ PrivateEndpointConnection
+}
+
+// DiskAccessesClientGetPrivateLinkResourcesResponse contains the response from method DiskAccessesClient.GetPrivateLinkResources.
+type DiskAccessesClientGetPrivateLinkResourcesResponse struct {
+ // A list of private link resources
+ PrivateLinkResourceListResult
+}
+
+// DiskAccessesClientGetResponse contains the response from method DiskAccessesClient.Get.
+type DiskAccessesClientGetResponse struct {
+ // disk access resource.
+ DiskAccess
+}
+
+// DiskAccessesClientListByResourceGroupResponse contains the response from method DiskAccessesClient.NewListByResourceGroupPager.
+type DiskAccessesClientListByResourceGroupResponse struct {
+ // The List disk access operation response.
+ DiskAccessList
+}
+
+// DiskAccessesClientListPrivateEndpointConnectionsResponse contains the response from method DiskAccessesClient.NewListPrivateEndpointConnectionsPager.
+type DiskAccessesClientListPrivateEndpointConnectionsResponse struct {
+ // A list of private link resources
+ PrivateEndpointConnectionListResult
+}
+
+// DiskAccessesClientListResponse contains the response from method DiskAccessesClient.NewListPager.
+type DiskAccessesClientListResponse struct {
+ // The List disk access operation response.
+ DiskAccessList
+}
+
+// DiskAccessesClientUpdateAPrivateEndpointConnectionResponse contains the response from method DiskAccessesClient.BeginUpdateAPrivateEndpointConnection.
+type DiskAccessesClientUpdateAPrivateEndpointConnectionResponse struct {
+ // The Private Endpoint Connection resource.
+ PrivateEndpointConnection
+}
+
+// DiskAccessesClientUpdateResponse contains the response from method DiskAccessesClient.BeginUpdate.
+type DiskAccessesClientUpdateResponse struct {
+ // disk access resource.
+ DiskAccess
+}
+
+// DiskEncryptionSetsClientCreateOrUpdateResponse contains the response from method DiskEncryptionSetsClient.BeginCreateOrUpdate.
+type DiskEncryptionSetsClientCreateOrUpdateResponse struct {
+ // disk encryption set resource.
+ DiskEncryptionSet
+}
+
+// DiskEncryptionSetsClientDeleteResponse contains the response from method DiskEncryptionSetsClient.BeginDelete.
+type DiskEncryptionSetsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// DiskEncryptionSetsClientGetResponse contains the response from method DiskEncryptionSetsClient.Get.
+type DiskEncryptionSetsClientGetResponse struct {
+ // disk encryption set resource.
+ DiskEncryptionSet
+}
+
+// DiskEncryptionSetsClientListAssociatedResourcesResponse contains the response from method DiskEncryptionSetsClient.NewListAssociatedResourcesPager.
+type DiskEncryptionSetsClientListAssociatedResourcesResponse struct {
+ // The List resources which are encrypted with the disk encryption set.
+ ResourceURIList
+}
+
+// DiskEncryptionSetsClientListByResourceGroupResponse contains the response from method DiskEncryptionSetsClient.NewListByResourceGroupPager.
+type DiskEncryptionSetsClientListByResourceGroupResponse struct {
+ // The List disk encryption set operation response.
+ DiskEncryptionSetList
+}
+
+// DiskEncryptionSetsClientListResponse contains the response from method DiskEncryptionSetsClient.NewListPager.
+type DiskEncryptionSetsClientListResponse struct {
+ // The List disk encryption set operation response.
+ DiskEncryptionSetList
+}
+
+// DiskEncryptionSetsClientUpdateResponse contains the response from method DiskEncryptionSetsClient.BeginUpdate.
+type DiskEncryptionSetsClientUpdateResponse struct {
+ // disk encryption set resource.
+ DiskEncryptionSet
+}
+
+// DiskRestorePointClientGetResponse contains the response from method DiskRestorePointClient.Get.
+type DiskRestorePointClientGetResponse struct {
+ // Properties of disk restore point
+ DiskRestorePoint
+}
+
+// DiskRestorePointClientGrantAccessResponse contains the response from method DiskRestorePointClient.BeginGrantAccess.
+type DiskRestorePointClientGrantAccessResponse struct {
+ // A disk access SAS uri.
+ AccessURI
+}
+
+// DiskRestorePointClientListByRestorePointResponse contains the response from method DiskRestorePointClient.NewListByRestorePointPager.
+type DiskRestorePointClientListByRestorePointResponse struct {
+ // The List Disk Restore Points operation response.
+ DiskRestorePointList
+}
+
+// DiskRestorePointClientRevokeAccessResponse contains the response from method DiskRestorePointClient.BeginRevokeAccess.
+type DiskRestorePointClientRevokeAccessResponse struct {
+ // placeholder for future response values
+}
+
+// DisksClientCreateOrUpdateResponse contains the response from method DisksClient.BeginCreateOrUpdate.
+type DisksClientCreateOrUpdateResponse struct {
+ // Disk resource.
+ Disk
+}
+
+// DisksClientDeleteResponse contains the response from method DisksClient.BeginDelete.
+type DisksClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// DisksClientGetResponse contains the response from method DisksClient.Get.
+type DisksClientGetResponse struct {
+ // Disk resource.
+ Disk
+}
+
+// DisksClientGrantAccessResponse contains the response from method DisksClient.BeginGrantAccess.
+type DisksClientGrantAccessResponse struct {
+ // A disk access SAS uri.
+ AccessURI
+}
+
+// DisksClientListByResourceGroupResponse contains the response from method DisksClient.NewListByResourceGroupPager.
+type DisksClientListByResourceGroupResponse struct {
+ // The List Disks operation response.
+ DiskList
+}
+
+// DisksClientListResponse contains the response from method DisksClient.NewListPager.
+type DisksClientListResponse struct {
+ // The List Disks operation response.
+ DiskList
+}
+
+// DisksClientRevokeAccessResponse contains the response from method DisksClient.BeginRevokeAccess.
+type DisksClientRevokeAccessResponse struct {
+ // placeholder for future response values
+}
+
+// DisksClientUpdateResponse contains the response from method DisksClient.BeginUpdate.
+type DisksClientUpdateResponse struct {
+ // Disk resource.
+ Disk
+}
+
+// GalleriesClientCreateOrUpdateResponse contains the response from method GalleriesClient.BeginCreateOrUpdate.
+type GalleriesClientCreateOrUpdateResponse struct {
+ // Specifies information about the Shared Image Gallery that you want to create or update.
+ Gallery
+}
+
+// GalleriesClientDeleteResponse contains the response from method GalleriesClient.BeginDelete.
+type GalleriesClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// GalleriesClientGetResponse contains the response from method GalleriesClient.Get.
+type GalleriesClientGetResponse struct {
+ // Specifies information about the Shared Image Gallery that you want to create or update.
+ Gallery
+}
+
+// GalleriesClientListByResourceGroupResponse contains the response from method GalleriesClient.NewListByResourceGroupPager.
+type GalleriesClientListByResourceGroupResponse struct {
+ // The List Galleries operation response.
+ GalleryList
+}
+
+// GalleriesClientListResponse contains the response from method GalleriesClient.NewListPager.
+type GalleriesClientListResponse struct {
+ // The List Galleries operation response.
+ GalleryList
+}
+
+// GalleriesClientUpdateResponse contains the response from method GalleriesClient.BeginUpdate.
+type GalleriesClientUpdateResponse struct {
+ // Specifies information about the Shared Image Gallery that you want to create or update.
+ Gallery
+}
+
+// GalleryApplicationVersionsClientCreateOrUpdateResponse contains the response from method GalleryApplicationVersionsClient.BeginCreateOrUpdate.
+type GalleryApplicationVersionsClientCreateOrUpdateResponse struct {
+ // Specifies information about the gallery Application Version that you want to create or update.
+ GalleryApplicationVersion
+}
+
+// GalleryApplicationVersionsClientDeleteResponse contains the response from method GalleryApplicationVersionsClient.BeginDelete.
+type GalleryApplicationVersionsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// GalleryApplicationVersionsClientGetResponse contains the response from method GalleryApplicationVersionsClient.Get.
+type GalleryApplicationVersionsClientGetResponse struct {
+ // Specifies information about the gallery Application Version that you want to create or update.
+ GalleryApplicationVersion
+}
+
+// GalleryApplicationVersionsClientListByGalleryApplicationResponse contains the response from method GalleryApplicationVersionsClient.NewListByGalleryApplicationPager.
+type GalleryApplicationVersionsClientListByGalleryApplicationResponse struct {
+ // The List Gallery Application version operation response.
+ GalleryApplicationVersionList
+}
+
+// GalleryApplicationVersionsClientUpdateResponse contains the response from method GalleryApplicationVersionsClient.BeginUpdate.
+type GalleryApplicationVersionsClientUpdateResponse struct {
+ // Specifies information about the gallery Application Version that you want to create or update.
+ GalleryApplicationVersion
+}
+
+// GalleryApplicationsClientCreateOrUpdateResponse contains the response from method GalleryApplicationsClient.BeginCreateOrUpdate.
+type GalleryApplicationsClientCreateOrUpdateResponse struct {
+ // Specifies information about the gallery Application Definition that you want to create or update.
+ GalleryApplication
+}
+
+// GalleryApplicationsClientDeleteResponse contains the response from method GalleryApplicationsClient.BeginDelete.
+type GalleryApplicationsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// GalleryApplicationsClientGetResponse contains the response from method GalleryApplicationsClient.Get.
+type GalleryApplicationsClientGetResponse struct {
+ // Specifies information about the gallery Application Definition that you want to create or update.
+ GalleryApplication
+}
+
+// GalleryApplicationsClientListByGalleryResponse contains the response from method GalleryApplicationsClient.NewListByGalleryPager.
+type GalleryApplicationsClientListByGalleryResponse struct {
+ // The List Gallery Applications operation response.
+ GalleryApplicationList
+}
+
+// GalleryApplicationsClientUpdateResponse contains the response from method GalleryApplicationsClient.BeginUpdate.
+type GalleryApplicationsClientUpdateResponse struct {
+ // Specifies information about the gallery Application Definition that you want to create or update.
+ GalleryApplication
+}
+
+// GalleryImageVersionsClientCreateOrUpdateResponse contains the response from method GalleryImageVersionsClient.BeginCreateOrUpdate.
+type GalleryImageVersionsClientCreateOrUpdateResponse struct {
+ // Specifies information about the gallery image version that you want to create or update.
+ GalleryImageVersion
+}
+
+// GalleryImageVersionsClientDeleteResponse contains the response from method GalleryImageVersionsClient.BeginDelete.
+type GalleryImageVersionsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// GalleryImageVersionsClientGetResponse contains the response from method GalleryImageVersionsClient.Get.
+type GalleryImageVersionsClientGetResponse struct {
+ // Specifies information about the gallery image version that you want to create or update.
+ GalleryImageVersion
+}
+
+// GalleryImageVersionsClientListByGalleryImageResponse contains the response from method GalleryImageVersionsClient.NewListByGalleryImagePager.
+type GalleryImageVersionsClientListByGalleryImageResponse struct {
+ // The List Gallery Image version operation response.
+ GalleryImageVersionList
+}
+
+// GalleryImageVersionsClientUpdateResponse contains the response from method GalleryImageVersionsClient.BeginUpdate.
+type GalleryImageVersionsClientUpdateResponse struct {
+ // Specifies information about the gallery image version that you want to create or update.
+ GalleryImageVersion
+}
+
+// GalleryImagesClientCreateOrUpdateResponse contains the response from method GalleryImagesClient.BeginCreateOrUpdate.
+type GalleryImagesClientCreateOrUpdateResponse struct {
+ // Specifies information about the gallery image definition that you want to create or update.
+ GalleryImage
+}
+
+// GalleryImagesClientDeleteResponse contains the response from method GalleryImagesClient.BeginDelete.
+type GalleryImagesClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// GalleryImagesClientGetResponse contains the response from method GalleryImagesClient.Get.
+type GalleryImagesClientGetResponse struct {
+ // Specifies information about the gallery image definition that you want to create or update.
+ GalleryImage
+}
+
+// GalleryImagesClientListByGalleryResponse contains the response from method GalleryImagesClient.NewListByGalleryPager.
+type GalleryImagesClientListByGalleryResponse struct {
+ // The List Gallery Images operation response.
+ GalleryImageList
+}
+
+// GalleryImagesClientUpdateResponse contains the response from method GalleryImagesClient.BeginUpdate.
+type GalleryImagesClientUpdateResponse struct {
+ // Specifies information about the gallery image definition that you want to create or update.
+ GalleryImage
+}
+
+// GallerySharingProfileClientUpdateResponse contains the response from method GallerySharingProfileClient.BeginUpdate.
+type GallerySharingProfileClientUpdateResponse struct {
+ // Specifies information about the gallery sharing profile update.
+ SharingUpdate
+}
+
+// ImagesClientCreateOrUpdateResponse contains the response from method ImagesClient.BeginCreateOrUpdate.
+type ImagesClientCreateOrUpdateResponse struct {
+ // The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine.
+ // If SourceImage is provided, the destination virtual hard drive must not exist.
+ Image
+}
+
+// ImagesClientDeleteResponse contains the response from method ImagesClient.BeginDelete.
+type ImagesClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// ImagesClientGetResponse contains the response from method ImagesClient.Get.
+type ImagesClientGetResponse struct {
+ // The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine.
+ // If SourceImage is provided, the destination virtual hard drive must not exist.
+ Image
+}
+
+// ImagesClientListByResourceGroupResponse contains the response from method ImagesClient.NewListByResourceGroupPager.
+type ImagesClientListByResourceGroupResponse struct {
+ // The List Image operation response.
+ ImageListResult
+}
+
+// ImagesClientListResponse contains the response from method ImagesClient.NewListPager.
+type ImagesClientListResponse struct {
+ // The List Image operation response.
+ ImageListResult
+}
+
+// ImagesClientUpdateResponse contains the response from method ImagesClient.BeginUpdate.
+type ImagesClientUpdateResponse struct {
+ // The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine.
+ // If SourceImage is provided, the destination virtual hard drive must not exist.
+ Image
+}
+
+// LogAnalyticsClientExportRequestRateByIntervalResponse contains the response from method LogAnalyticsClient.BeginExportRequestRateByInterval.
+type LogAnalyticsClientExportRequestRateByIntervalResponse struct {
+ // LogAnalytics operation status response
+ LogAnalyticsOperationResult
+}
+
+// LogAnalyticsClientExportThrottledRequestsResponse contains the response from method LogAnalyticsClient.BeginExportThrottledRequests.
+type LogAnalyticsClientExportThrottledRequestsResponse struct {
+ // LogAnalytics operation status response
+ LogAnalyticsOperationResult
+}
+
+// OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
+type OperationsClientListResponse struct {
+ // The List Compute Operation operation response.
+ OperationListResult
+}
+
+// ProximityPlacementGroupsClientCreateOrUpdateResponse contains the response from method ProximityPlacementGroupsClient.CreateOrUpdate.
+type ProximityPlacementGroupsClientCreateOrUpdateResponse struct {
+ // Specifies information about the proximity placement group.
+ ProximityPlacementGroup
+}
+
+// ProximityPlacementGroupsClientDeleteResponse contains the response from method ProximityPlacementGroupsClient.Delete.
+type ProximityPlacementGroupsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// ProximityPlacementGroupsClientGetResponse contains the response from method ProximityPlacementGroupsClient.Get.
+type ProximityPlacementGroupsClientGetResponse struct {
+ // Specifies information about the proximity placement group.
+ ProximityPlacementGroup
+}
+
+// ProximityPlacementGroupsClientListByResourceGroupResponse contains the response from method ProximityPlacementGroupsClient.NewListByResourceGroupPager.
+type ProximityPlacementGroupsClientListByResourceGroupResponse struct {
+ // The List Proximity Placement Group operation response.
+ ProximityPlacementGroupListResult
+}
+
+// ProximityPlacementGroupsClientListBySubscriptionResponse contains the response from method ProximityPlacementGroupsClient.NewListBySubscriptionPager.
+type ProximityPlacementGroupsClientListBySubscriptionResponse struct {
+ // The List Proximity Placement Group operation response.
+ ProximityPlacementGroupListResult
+}
+
+// ProximityPlacementGroupsClientUpdateResponse contains the response from method ProximityPlacementGroupsClient.Update.
+type ProximityPlacementGroupsClientUpdateResponse struct {
+ // Specifies information about the proximity placement group.
+ ProximityPlacementGroup
+}
+
+// ResourceSKUsClientListResponse contains the response from method ResourceSKUsClient.NewListPager.
+type ResourceSKUsClientListResponse struct {
+ // The List Resource Skus operation response.
+ ResourceSKUsResult
+}
+
+// RestorePointCollectionsClientCreateOrUpdateResponse contains the response from method RestorePointCollectionsClient.CreateOrUpdate.
+type RestorePointCollectionsClientCreateOrUpdateResponse struct {
+ // Create or update Restore Point collection parameters.
+ RestorePointCollection
+}
+
+// RestorePointCollectionsClientDeleteResponse contains the response from method RestorePointCollectionsClient.BeginDelete.
+type RestorePointCollectionsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// RestorePointCollectionsClientGetResponse contains the response from method RestorePointCollectionsClient.Get.
+type RestorePointCollectionsClientGetResponse struct {
+ // Create or update Restore Point collection parameters.
+ RestorePointCollection
+}
+
+// RestorePointCollectionsClientListAllResponse contains the response from method RestorePointCollectionsClient.NewListAllPager.
+type RestorePointCollectionsClientListAllResponse struct {
+ // The List restore point collection operation response.
+ RestorePointCollectionListResult
+}
+
+// RestorePointCollectionsClientListResponse contains the response from method RestorePointCollectionsClient.NewListPager.
+type RestorePointCollectionsClientListResponse struct {
+ // The List restore point collection operation response.
+ RestorePointCollectionListResult
+}
+
+// RestorePointCollectionsClientUpdateResponse contains the response from method RestorePointCollectionsClient.Update.
+type RestorePointCollectionsClientUpdateResponse struct {
+ // Create or update Restore Point collection parameters.
+ RestorePointCollection
+}
+
+// RestorePointsClientCreateResponse contains the response from method RestorePointsClient.BeginCreate.
+type RestorePointsClientCreateResponse struct {
+ // Restore Point details.
+ RestorePoint
+}
+
+// RestorePointsClientDeleteResponse contains the response from method RestorePointsClient.BeginDelete.
+type RestorePointsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// RestorePointsClientGetResponse contains the response from method RestorePointsClient.Get.
+type RestorePointsClientGetResponse struct {
+ // Restore Point details.
+ RestorePoint
+}
+
+// SSHPublicKeysClientCreateResponse contains the response from method SSHPublicKeysClient.Create.
+type SSHPublicKeysClientCreateResponse struct {
+ // Specifies information about the SSH public key.
+ SSHPublicKeyResource
+}
+
+// SSHPublicKeysClientDeleteResponse contains the response from method SSHPublicKeysClient.Delete.
+type SSHPublicKeysClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// SSHPublicKeysClientGenerateKeyPairResponse contains the response from method SSHPublicKeysClient.GenerateKeyPair.
+type SSHPublicKeysClientGenerateKeyPairResponse struct {
+ // Response from generation of an SSH key pair.
+ SSHPublicKeyGenerateKeyPairResult
+}
+
+// SSHPublicKeysClientGetResponse contains the response from method SSHPublicKeysClient.Get.
+type SSHPublicKeysClientGetResponse struct {
+ // Specifies information about the SSH public key.
+ SSHPublicKeyResource
+}
+
+// SSHPublicKeysClientListByResourceGroupResponse contains the response from method SSHPublicKeysClient.NewListByResourceGroupPager.
+type SSHPublicKeysClientListByResourceGroupResponse struct {
+ // The list SSH public keys operation response.
+ SSHPublicKeysGroupListResult
+}
+
+// SSHPublicKeysClientListBySubscriptionResponse contains the response from method SSHPublicKeysClient.NewListBySubscriptionPager.
+type SSHPublicKeysClientListBySubscriptionResponse struct {
+ // The list SSH public keys operation response.
+ SSHPublicKeysGroupListResult
+}
+
+// SSHPublicKeysClientUpdateResponse contains the response from method SSHPublicKeysClient.Update.
+type SSHPublicKeysClientUpdateResponse struct {
+ // Specifies information about the SSH public key.
+ SSHPublicKeyResource
+}
+
+// SharedGalleriesClientGetResponse contains the response from method SharedGalleriesClient.Get.
+type SharedGalleriesClientGetResponse struct {
+ // Specifies information about the Shared Gallery that you want to create or update.
+ SharedGallery
+}
+
+// SharedGalleriesClientListResponse contains the response from method SharedGalleriesClient.NewListPager.
+type SharedGalleriesClientListResponse struct {
+ // The List Shared Galleries operation response.
+ SharedGalleryList
+}
+
+// SharedGalleryImageVersionsClientGetResponse contains the response from method SharedGalleryImageVersionsClient.Get.
+type SharedGalleryImageVersionsClientGetResponse struct {
+ // Specifies information about the gallery image version that you want to create or update.
+ SharedGalleryImageVersion
+}
+
+// SharedGalleryImageVersionsClientListResponse contains the response from method SharedGalleryImageVersionsClient.NewListPager.
+type SharedGalleryImageVersionsClientListResponse struct {
+ // The List Shared Gallery Image versions operation response.
+ SharedGalleryImageVersionList
+}
+
+// SharedGalleryImagesClientGetResponse contains the response from method SharedGalleryImagesClient.Get.
+type SharedGalleryImagesClientGetResponse struct {
+ // Specifies information about the gallery image definition that you want to create or update.
+ SharedGalleryImage
+}
+
+// SharedGalleryImagesClientListResponse contains the response from method SharedGalleryImagesClient.NewListPager.
+type SharedGalleryImagesClientListResponse struct {
+ // The List Shared Gallery Images operation response.
+ SharedGalleryImageList
+}
+
+// SnapshotsClientCreateOrUpdateResponse contains the response from method SnapshotsClient.BeginCreateOrUpdate.
+type SnapshotsClientCreateOrUpdateResponse struct {
+ // Snapshot resource.
+ Snapshot
+}
+
+// SnapshotsClientDeleteResponse contains the response from method SnapshotsClient.BeginDelete.
+type SnapshotsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// SnapshotsClientGetResponse contains the response from method SnapshotsClient.Get.
+type SnapshotsClientGetResponse struct {
+ // Snapshot resource.
+ Snapshot
+}
+
+// SnapshotsClientGrantAccessResponse contains the response from method SnapshotsClient.BeginGrantAccess.
+type SnapshotsClientGrantAccessResponse struct {
+ // A disk access SAS uri.
+ AccessURI
+}
+
+// SnapshotsClientListByResourceGroupResponse contains the response from method SnapshotsClient.NewListByResourceGroupPager.
+type SnapshotsClientListByResourceGroupResponse struct {
+ // The List Snapshots operation response.
+ SnapshotList
+}
+
+// SnapshotsClientListResponse contains the response from method SnapshotsClient.NewListPager.
+type SnapshotsClientListResponse struct {
+ // The List Snapshots operation response.
+ SnapshotList
+}
+
+// SnapshotsClientRevokeAccessResponse contains the response from method SnapshotsClient.BeginRevokeAccess.
+type SnapshotsClientRevokeAccessResponse struct {
+ // placeholder for future response values
+}
+
+// SnapshotsClientUpdateResponse contains the response from method SnapshotsClient.BeginUpdate.
+type SnapshotsClientUpdateResponse struct {
+ // Snapshot resource.
+ Snapshot
+}
+
+// UsageClientListResponse contains the response from method UsageClient.NewListPager.
+type UsageClientListResponse struct {
+ // The List Usages operation response.
+ ListUsagesResult
+}
+
+// VirtualMachineExtensionImagesClientGetResponse contains the response from method VirtualMachineExtensionImagesClient.Get.
+type VirtualMachineExtensionImagesClientGetResponse struct {
+ // Describes a Virtual Machine Extension Image.
+ VirtualMachineExtensionImage
+}
+
+// VirtualMachineExtensionImagesClientListTypesResponse contains the response from method VirtualMachineExtensionImagesClient.ListTypes.
+type VirtualMachineExtensionImagesClientListTypesResponse struct {
+ // Array of VirtualMachineExtensionImage
+ VirtualMachineExtensionImageArray []*VirtualMachineExtensionImage
+}
+
+// VirtualMachineExtensionImagesClientListVersionsResponse contains the response from method VirtualMachineExtensionImagesClient.ListVersions.
+type VirtualMachineExtensionImagesClientListVersionsResponse struct {
+ // Array of VirtualMachineExtensionImage
+ VirtualMachineExtensionImageArray []*VirtualMachineExtensionImage
+}
+
+// VirtualMachineExtensionsClientCreateOrUpdateResponse contains the response from method VirtualMachineExtensionsClient.BeginCreateOrUpdate.
+type VirtualMachineExtensionsClientCreateOrUpdateResponse struct {
+ // Describes a Virtual Machine Extension.
+ VirtualMachineExtension
+}
+
+// VirtualMachineExtensionsClientDeleteResponse contains the response from method VirtualMachineExtensionsClient.BeginDelete.
+type VirtualMachineExtensionsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineExtensionsClientGetResponse contains the response from method VirtualMachineExtensionsClient.Get.
+type VirtualMachineExtensionsClientGetResponse struct {
+ // Describes a Virtual Machine Extension.
+ VirtualMachineExtension
+}
+
+// VirtualMachineExtensionsClientListResponse contains the response from method VirtualMachineExtensionsClient.List.
+type VirtualMachineExtensionsClientListResponse struct {
+ // The List Extension operation response
+ VirtualMachineExtensionsListResult
+}
+
+// VirtualMachineExtensionsClientUpdateResponse contains the response from method VirtualMachineExtensionsClient.BeginUpdate.
+type VirtualMachineExtensionsClientUpdateResponse struct {
+ // Describes a Virtual Machine Extension.
+ VirtualMachineExtension
+}
+
+// VirtualMachineImagesClientGetResponse contains the response from method VirtualMachineImagesClient.Get.
+type VirtualMachineImagesClientGetResponse struct {
+ // Describes a Virtual Machine Image.
+ VirtualMachineImage
+}
+
+// VirtualMachineImagesClientListByEdgeZoneResponse contains the response from method VirtualMachineImagesClient.ListByEdgeZone.
+type VirtualMachineImagesClientListByEdgeZoneResponse struct {
+ // The List VmImages in EdgeZone operation response.
+ VMImagesInEdgeZoneListResult
+}
+
+// VirtualMachineImagesClientListOffersResponse contains the response from method VirtualMachineImagesClient.ListOffers.
+type VirtualMachineImagesClientListOffersResponse struct {
+ // Array of VirtualMachineImageResource
+ VirtualMachineImageResourceArray []*VirtualMachineImageResource
+}
+
+// VirtualMachineImagesClientListPublishersResponse contains the response from method VirtualMachineImagesClient.ListPublishers.
+type VirtualMachineImagesClientListPublishersResponse struct {
+ // Array of VirtualMachineImageResource
+ VirtualMachineImageResourceArray []*VirtualMachineImageResource
+}
+
+// VirtualMachineImagesClientListResponse contains the response from method VirtualMachineImagesClient.List.
+type VirtualMachineImagesClientListResponse struct {
+ // Array of VirtualMachineImageResource
+ VirtualMachineImageResourceArray []*VirtualMachineImageResource
+}
+
+// VirtualMachineImagesClientListSKUsResponse contains the response from method VirtualMachineImagesClient.ListSKUs.
+type VirtualMachineImagesClientListSKUsResponse struct {
+ // Array of VirtualMachineImageResource
+ VirtualMachineImageResourceArray []*VirtualMachineImageResource
+}
+
+// VirtualMachineImagesEdgeZoneClientGetResponse contains the response from method VirtualMachineImagesEdgeZoneClient.Get.
+type VirtualMachineImagesEdgeZoneClientGetResponse struct {
+ // Describes a Virtual Machine Image.
+ VirtualMachineImage
+}
+
+// VirtualMachineImagesEdgeZoneClientListOffersResponse contains the response from method VirtualMachineImagesEdgeZoneClient.ListOffers.
+type VirtualMachineImagesEdgeZoneClientListOffersResponse struct {
+ // Array of VirtualMachineImageResource
+ VirtualMachineImageResourceArray []*VirtualMachineImageResource
+}
+
+// VirtualMachineImagesEdgeZoneClientListPublishersResponse contains the response from method VirtualMachineImagesEdgeZoneClient.ListPublishers.
+type VirtualMachineImagesEdgeZoneClientListPublishersResponse struct {
+ // Array of VirtualMachineImageResource
+ VirtualMachineImageResourceArray []*VirtualMachineImageResource
+}
+
+// VirtualMachineImagesEdgeZoneClientListResponse contains the response from method VirtualMachineImagesEdgeZoneClient.List.
+type VirtualMachineImagesEdgeZoneClientListResponse struct {
+ // Array of VirtualMachineImageResource
+ VirtualMachineImageResourceArray []*VirtualMachineImageResource
+}
+
+// VirtualMachineImagesEdgeZoneClientListSKUsResponse contains the response from method VirtualMachineImagesEdgeZoneClient.ListSKUs.
+type VirtualMachineImagesEdgeZoneClientListSKUsResponse struct {
+ // Array of VirtualMachineImageResource
+ VirtualMachineImageResourceArray []*VirtualMachineImageResource
+}
+
+// VirtualMachineRunCommandsClientCreateOrUpdateResponse contains the response from method VirtualMachineRunCommandsClient.BeginCreateOrUpdate.
+type VirtualMachineRunCommandsClientCreateOrUpdateResponse struct {
+ // Describes a Virtual Machine run command.
+ VirtualMachineRunCommand
+}
+
+// VirtualMachineRunCommandsClientDeleteResponse contains the response from method VirtualMachineRunCommandsClient.BeginDelete.
+type VirtualMachineRunCommandsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineRunCommandsClientGetByVirtualMachineResponse contains the response from method VirtualMachineRunCommandsClient.GetByVirtualMachine.
+type VirtualMachineRunCommandsClientGetByVirtualMachineResponse struct {
+ // Describes a Virtual Machine run command.
+ VirtualMachineRunCommand
+}
+
+// VirtualMachineRunCommandsClientGetResponse contains the response from method VirtualMachineRunCommandsClient.Get.
+type VirtualMachineRunCommandsClientGetResponse struct {
+ // Describes the properties of a Run Command.
+ RunCommandDocument
+}
+
+// VirtualMachineRunCommandsClientListByVirtualMachineResponse contains the response from method VirtualMachineRunCommandsClient.NewListByVirtualMachinePager.
+type VirtualMachineRunCommandsClientListByVirtualMachineResponse struct {
+ // The List run command operation response
+ VirtualMachineRunCommandsListResult
+}
+
+// VirtualMachineRunCommandsClientListResponse contains the response from method VirtualMachineRunCommandsClient.NewListPager.
+type VirtualMachineRunCommandsClientListResponse struct {
+ // The List Virtual Machine operation response.
+ RunCommandListResult
+}
+
+// VirtualMachineRunCommandsClientUpdateResponse contains the response from method VirtualMachineRunCommandsClient.BeginUpdate.
+type VirtualMachineRunCommandsClientUpdateResponse struct {
+ // Describes a Virtual Machine run command.
+ VirtualMachineRunCommand
+}
+
+// VirtualMachineScaleSetExtensionsClientCreateOrUpdateResponse contains the response from method VirtualMachineScaleSetExtensionsClient.BeginCreateOrUpdate.
+type VirtualMachineScaleSetExtensionsClientCreateOrUpdateResponse struct {
+ // Describes a Virtual Machine Scale Set Extension.
+ VirtualMachineScaleSetExtension
+}
+
+// VirtualMachineScaleSetExtensionsClientDeleteResponse contains the response from method VirtualMachineScaleSetExtensionsClient.BeginDelete.
+type VirtualMachineScaleSetExtensionsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetExtensionsClientGetResponse contains the response from method VirtualMachineScaleSetExtensionsClient.Get.
+type VirtualMachineScaleSetExtensionsClientGetResponse struct {
+ // Describes a Virtual Machine Scale Set Extension.
+ VirtualMachineScaleSetExtension
+}
+
+// VirtualMachineScaleSetExtensionsClientListResponse contains the response from method VirtualMachineScaleSetExtensionsClient.NewListPager.
+type VirtualMachineScaleSetExtensionsClientListResponse struct {
+ // The List VM scale set extension operation response.
+ VirtualMachineScaleSetExtensionListResult
+}
+
+// VirtualMachineScaleSetExtensionsClientUpdateResponse contains the response from method VirtualMachineScaleSetExtensionsClient.BeginUpdate.
+type VirtualMachineScaleSetExtensionsClientUpdateResponse struct {
+ // Describes a Virtual Machine Scale Set Extension.
+ VirtualMachineScaleSetExtension
+}
+
+// VirtualMachineScaleSetRollingUpgradesClientCancelResponse contains the response from method VirtualMachineScaleSetRollingUpgradesClient.BeginCancel.
+type VirtualMachineScaleSetRollingUpgradesClientCancelResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetRollingUpgradesClientGetLatestResponse contains the response from method VirtualMachineScaleSetRollingUpgradesClient.GetLatest.
+type VirtualMachineScaleSetRollingUpgradesClientGetLatestResponse struct {
+ // The status of the latest virtual machine scale set rolling upgrade.
+ RollingUpgradeStatusInfo
+}
+
+// VirtualMachineScaleSetRollingUpgradesClientStartExtensionUpgradeResponse contains the response from method VirtualMachineScaleSetRollingUpgradesClient.BeginStartExtensionUpgrade.
+type VirtualMachineScaleSetRollingUpgradesClientStartExtensionUpgradeResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetRollingUpgradesClientStartOSUpgradeResponse contains the response from method VirtualMachineScaleSetRollingUpgradesClient.BeginStartOSUpgrade.
+type VirtualMachineScaleSetRollingUpgradesClientStartOSUpgradeResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetVMExtensionsClientCreateOrUpdateResponse contains the response from method VirtualMachineScaleSetVMExtensionsClient.BeginCreateOrUpdate.
+type VirtualMachineScaleSetVMExtensionsClientCreateOrUpdateResponse struct {
+ // Describes a VMSS VM Extension.
+ VirtualMachineScaleSetVMExtension
+}
+
+// VirtualMachineScaleSetVMExtensionsClientDeleteResponse contains the response from method VirtualMachineScaleSetVMExtensionsClient.BeginDelete.
+type VirtualMachineScaleSetVMExtensionsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetVMExtensionsClientGetResponse contains the response from method VirtualMachineScaleSetVMExtensionsClient.Get.
+type VirtualMachineScaleSetVMExtensionsClientGetResponse struct {
+ // Describes a VMSS VM Extension.
+ VirtualMachineScaleSetVMExtension
+}
+
+// VirtualMachineScaleSetVMExtensionsClientListResponse contains the response from method VirtualMachineScaleSetVMExtensionsClient.List.
+type VirtualMachineScaleSetVMExtensionsClientListResponse struct {
+ // The List VMSS VM Extension operation response
+ VirtualMachineScaleSetVMExtensionsListResult
+}
+
+// VirtualMachineScaleSetVMExtensionsClientUpdateResponse contains the response from method VirtualMachineScaleSetVMExtensionsClient.BeginUpdate.
+type VirtualMachineScaleSetVMExtensionsClientUpdateResponse struct {
+ // Describes a VMSS VM Extension.
+ VirtualMachineScaleSetVMExtension
+}
+
+// VirtualMachineScaleSetVMRunCommandsClientCreateOrUpdateResponse contains the response from method VirtualMachineScaleSetVMRunCommandsClient.BeginCreateOrUpdate.
+type VirtualMachineScaleSetVMRunCommandsClientCreateOrUpdateResponse struct {
+ // Describes a Virtual Machine run command.
+ VirtualMachineRunCommand
+}
+
+// VirtualMachineScaleSetVMRunCommandsClientDeleteResponse contains the response from method VirtualMachineScaleSetVMRunCommandsClient.BeginDelete.
+type VirtualMachineScaleSetVMRunCommandsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetVMRunCommandsClientGetResponse contains the response from method VirtualMachineScaleSetVMRunCommandsClient.Get.
+type VirtualMachineScaleSetVMRunCommandsClientGetResponse struct {
+ // Describes a Virtual Machine run command.
+ VirtualMachineRunCommand
+}
+
+// VirtualMachineScaleSetVMRunCommandsClientListResponse contains the response from method VirtualMachineScaleSetVMRunCommandsClient.NewListPager.
+type VirtualMachineScaleSetVMRunCommandsClientListResponse struct {
+ // The List run command operation response
+ VirtualMachineRunCommandsListResult
+}
+
+// VirtualMachineScaleSetVMRunCommandsClientUpdateResponse contains the response from method VirtualMachineScaleSetVMRunCommandsClient.BeginUpdate.
+type VirtualMachineScaleSetVMRunCommandsClientUpdateResponse struct {
+ // Describes a Virtual Machine run command.
+ VirtualMachineRunCommand
+}
+
+// VirtualMachineScaleSetVMsClientApproveRollingUpgradeResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginApproveRollingUpgrade.
+type VirtualMachineScaleSetVMsClientApproveRollingUpgradeResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetVMsClientAttachDetachDataDisksResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginAttachDetachDataDisks.
+type VirtualMachineScaleSetVMsClientAttachDetachDataDisksResponse struct {
+ // Specifies the storage settings for the virtual machine disks.
+ StorageProfile
+}
+
+// VirtualMachineScaleSetVMsClientDeallocateResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginDeallocate.
+type VirtualMachineScaleSetVMsClientDeallocateResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetVMsClientDeleteResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginDelete.
+type VirtualMachineScaleSetVMsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetVMsClientGetInstanceViewResponse contains the response from method VirtualMachineScaleSetVMsClient.GetInstanceView.
+type VirtualMachineScaleSetVMsClientGetInstanceViewResponse struct {
+ // The instance view of a virtual machine scale set VM.
+ VirtualMachineScaleSetVMInstanceView
+}
+
+// VirtualMachineScaleSetVMsClientGetResponse contains the response from method VirtualMachineScaleSetVMsClient.Get.
+type VirtualMachineScaleSetVMsClientGetResponse struct {
+ // Describes a virtual machine scale set virtual machine.
+ VirtualMachineScaleSetVM
+}
+
+// VirtualMachineScaleSetVMsClientListResponse contains the response from method VirtualMachineScaleSetVMsClient.NewListPager.
+type VirtualMachineScaleSetVMsClientListResponse struct {
+ // The List Virtual Machine Scale Set VMs operation response.
+ VirtualMachineScaleSetVMListResult
+}
+
+// VirtualMachineScaleSetVMsClientPerformMaintenanceResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginPerformMaintenance.
+type VirtualMachineScaleSetVMsClientPerformMaintenanceResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetVMsClientPowerOffResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginPowerOff.
+type VirtualMachineScaleSetVMsClientPowerOffResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetVMsClientRedeployResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginRedeploy.
+type VirtualMachineScaleSetVMsClientRedeployResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetVMsClientReimageAllResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginReimageAll.
+type VirtualMachineScaleSetVMsClientReimageAllResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetVMsClientReimageResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginReimage.
+type VirtualMachineScaleSetVMsClientReimageResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetVMsClientRestartResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginRestart.
+type VirtualMachineScaleSetVMsClientRestartResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataResponse contains the response from method VirtualMachineScaleSetVMsClient.RetrieveBootDiagnosticsData.
+type VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataResponse struct {
+ // The SAS URIs of the console screenshot and serial log blobs.
+ RetrieveBootDiagnosticsDataResult
+}
+
+// VirtualMachineScaleSetVMsClientRunCommandResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginRunCommand.
+type VirtualMachineScaleSetVMsClientRunCommandResponse struct {
+ RunCommandResult
+}
+
+// VirtualMachineScaleSetVMsClientSimulateEvictionResponse contains the response from method VirtualMachineScaleSetVMsClient.SimulateEviction.
+type VirtualMachineScaleSetVMsClientSimulateEvictionResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetVMsClientStartResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginStart.
+type VirtualMachineScaleSetVMsClientStartResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetVMsClientUpdateResponse contains the response from method VirtualMachineScaleSetVMsClient.BeginUpdate.
+type VirtualMachineScaleSetVMsClientUpdateResponse struct {
+ // Describes a virtual machine scale set virtual machine.
+ VirtualMachineScaleSetVM
+}
+
+// VirtualMachineScaleSetsClientApproveRollingUpgradeResponse contains the response from method VirtualMachineScaleSetsClient.BeginApproveRollingUpgrade.
+type VirtualMachineScaleSetsClientApproveRollingUpgradeResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientConvertToSinglePlacementGroupResponse contains the response from method VirtualMachineScaleSetsClient.ConvertToSinglePlacementGroup.
+type VirtualMachineScaleSetsClientConvertToSinglePlacementGroupResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientCreateOrUpdateResponse contains the response from method VirtualMachineScaleSetsClient.BeginCreateOrUpdate.
+type VirtualMachineScaleSetsClientCreateOrUpdateResponse struct {
+ // Describes a Virtual Machine Scale Set.
+ VirtualMachineScaleSet
+}
+
+// VirtualMachineScaleSetsClientDeallocateResponse contains the response from method VirtualMachineScaleSetsClient.BeginDeallocate.
+type VirtualMachineScaleSetsClientDeallocateResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientDeleteInstancesResponse contains the response from method VirtualMachineScaleSetsClient.BeginDeleteInstances.
+type VirtualMachineScaleSetsClientDeleteInstancesResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientDeleteResponse contains the response from method VirtualMachineScaleSetsClient.BeginDelete.
+type VirtualMachineScaleSetsClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse contains the response from method
+// VirtualMachineScaleSetsClient.ForceRecoveryServiceFabricPlatformUpdateDomainWalk.
+type VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse struct {
+ // Response after calling a manual recovery walk
+ RecoveryWalkResponse
+}
+
+// VirtualMachineScaleSetsClientGetInstanceViewResponse contains the response from method VirtualMachineScaleSetsClient.GetInstanceView.
+type VirtualMachineScaleSetsClientGetInstanceViewResponse struct {
+ // The instance view of a virtual machine scale set.
+ VirtualMachineScaleSetInstanceView
+}
+
+// VirtualMachineScaleSetsClientGetOSUpgradeHistoryResponse contains the response from method VirtualMachineScaleSetsClient.NewGetOSUpgradeHistoryPager.
+type VirtualMachineScaleSetsClientGetOSUpgradeHistoryResponse struct {
+ // List of Virtual Machine Scale Set OS Upgrade History operation response.
+ VirtualMachineScaleSetListOSUpgradeHistory
+}
+
+// VirtualMachineScaleSetsClientGetResponse contains the response from method VirtualMachineScaleSetsClient.Get.
+type VirtualMachineScaleSetsClientGetResponse struct {
+ // Describes a Virtual Machine Scale Set.
+ VirtualMachineScaleSet
+}
+
+// VirtualMachineScaleSetsClientListAllResponse contains the response from method VirtualMachineScaleSetsClient.NewListAllPager.
+type VirtualMachineScaleSetsClientListAllResponse struct {
+ // The List Virtual Machine operation response.
+ VirtualMachineScaleSetListWithLinkResult
+}
+
+// VirtualMachineScaleSetsClientListByLocationResponse contains the response from method VirtualMachineScaleSetsClient.NewListByLocationPager.
+type VirtualMachineScaleSetsClientListByLocationResponse struct {
+ // The List Virtual Machine operation response.
+ VirtualMachineScaleSetListResult
+}
+
+// VirtualMachineScaleSetsClientListResponse contains the response from method VirtualMachineScaleSetsClient.NewListPager.
+type VirtualMachineScaleSetsClientListResponse struct {
+ // The List Virtual Machine operation response.
+ VirtualMachineScaleSetListResult
+}
+
+// VirtualMachineScaleSetsClientListSKUsResponse contains the response from method VirtualMachineScaleSetsClient.NewListSKUsPager.
+type VirtualMachineScaleSetsClientListSKUsResponse struct {
+ // The Virtual Machine Scale Set List Skus operation response.
+ VirtualMachineScaleSetListSKUsResult
+}
+
+// VirtualMachineScaleSetsClientPerformMaintenanceResponse contains the response from method VirtualMachineScaleSetsClient.BeginPerformMaintenance.
+type VirtualMachineScaleSetsClientPerformMaintenanceResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientPowerOffResponse contains the response from method VirtualMachineScaleSetsClient.BeginPowerOff.
+type VirtualMachineScaleSetsClientPowerOffResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientReapplyResponse contains the response from method VirtualMachineScaleSetsClient.BeginReapply.
+type VirtualMachineScaleSetsClientReapplyResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientRedeployResponse contains the response from method VirtualMachineScaleSetsClient.BeginRedeploy.
+type VirtualMachineScaleSetsClientRedeployResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientReimageAllResponse contains the response from method VirtualMachineScaleSetsClient.BeginReimageAll.
+type VirtualMachineScaleSetsClientReimageAllResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientReimageResponse contains the response from method VirtualMachineScaleSetsClient.BeginReimage.
+type VirtualMachineScaleSetsClientReimageResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientRestartResponse contains the response from method VirtualMachineScaleSetsClient.BeginRestart.
+type VirtualMachineScaleSetsClientRestartResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientSetOrchestrationServiceStateResponse contains the response from method VirtualMachineScaleSetsClient.BeginSetOrchestrationServiceState.
+type VirtualMachineScaleSetsClientSetOrchestrationServiceStateResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientStartResponse contains the response from method VirtualMachineScaleSetsClient.BeginStart.
+type VirtualMachineScaleSetsClientStartResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientUpdateInstancesResponse contains the response from method VirtualMachineScaleSetsClient.BeginUpdateInstances.
+type VirtualMachineScaleSetsClientUpdateInstancesResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachineScaleSetsClientUpdateResponse contains the response from method VirtualMachineScaleSetsClient.BeginUpdate.
+type VirtualMachineScaleSetsClientUpdateResponse struct {
+ // Describes a Virtual Machine Scale Set.
+ VirtualMachineScaleSet
+}
+
+// VirtualMachineSizesClientListResponse contains the response from method VirtualMachineSizesClient.NewListPager.
+type VirtualMachineSizesClientListResponse struct {
+ // The List Virtual Machine operation response.
+ VirtualMachineSizeListResult
+}
+
+// VirtualMachinesClientAssessPatchesResponse contains the response from method VirtualMachinesClient.BeginAssessPatches.
+type VirtualMachinesClientAssessPatchesResponse struct {
+ // Describes the properties of an AssessPatches result.
+ VirtualMachineAssessPatchesResult
+}
+
+// VirtualMachinesClientAttachDetachDataDisksResponse contains the response from method VirtualMachinesClient.BeginAttachDetachDataDisks.
+type VirtualMachinesClientAttachDetachDataDisksResponse struct {
+ // Specifies the storage settings for the virtual machine disks.
+ StorageProfile
+}
+
+// VirtualMachinesClientCaptureResponse contains the response from method VirtualMachinesClient.BeginCapture.
+type VirtualMachinesClientCaptureResponse struct {
+ // Output of virtual machine capture operation.
+ VirtualMachineCaptureResult
+}
+
+// VirtualMachinesClientConvertToManagedDisksResponse contains the response from method VirtualMachinesClient.BeginConvertToManagedDisks.
+type VirtualMachinesClientConvertToManagedDisksResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachinesClientCreateOrUpdateResponse contains the response from method VirtualMachinesClient.BeginCreateOrUpdate.
+type VirtualMachinesClientCreateOrUpdateResponse struct {
+ // Describes a Virtual Machine.
+ VirtualMachine
+}
+
+// VirtualMachinesClientDeallocateResponse contains the response from method VirtualMachinesClient.BeginDeallocate.
+type VirtualMachinesClientDeallocateResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachinesClientDeleteResponse contains the response from method VirtualMachinesClient.BeginDelete.
+type VirtualMachinesClientDeleteResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachinesClientGeneralizeResponse contains the response from method VirtualMachinesClient.Generalize.
+type VirtualMachinesClientGeneralizeResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachinesClientGetResponse contains the response from method VirtualMachinesClient.Get.
+type VirtualMachinesClientGetResponse struct {
+ // Describes a Virtual Machine.
+ VirtualMachine
+}
+
+// VirtualMachinesClientInstallPatchesResponse contains the response from method VirtualMachinesClient.BeginInstallPatches.
+type VirtualMachinesClientInstallPatchesResponse struct {
+ // The result summary of an installation operation.
+ VirtualMachineInstallPatchesResult
+}
+
+// VirtualMachinesClientInstanceViewResponse contains the response from method VirtualMachinesClient.InstanceView.
+type VirtualMachinesClientInstanceViewResponse struct {
+ // The instance view of a virtual machine.
+ VirtualMachineInstanceView
+}
+
+// VirtualMachinesClientListAllResponse contains the response from method VirtualMachinesClient.NewListAllPager.
+type VirtualMachinesClientListAllResponse struct {
+ // The List Virtual Machine operation response.
+ VirtualMachineListResult
+}
+
+// VirtualMachinesClientListAvailableSizesResponse contains the response from method VirtualMachinesClient.NewListAvailableSizesPager.
+type VirtualMachinesClientListAvailableSizesResponse struct {
+ // The List Virtual Machine operation response.
+ VirtualMachineSizeListResult
+}
+
+// VirtualMachinesClientListByLocationResponse contains the response from method VirtualMachinesClient.NewListByLocationPager.
+type VirtualMachinesClientListByLocationResponse struct {
+ // The List Virtual Machine operation response.
+ VirtualMachineListResult
+}
+
+// VirtualMachinesClientListResponse contains the response from method VirtualMachinesClient.NewListPager.
+type VirtualMachinesClientListResponse struct {
+ // The List Virtual Machine operation response.
+ VirtualMachineListResult
+}
+
+// VirtualMachinesClientPerformMaintenanceResponse contains the response from method VirtualMachinesClient.BeginPerformMaintenance.
+type VirtualMachinesClientPerformMaintenanceResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachinesClientPowerOffResponse contains the response from method VirtualMachinesClient.BeginPowerOff.
+type VirtualMachinesClientPowerOffResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachinesClientReapplyResponse contains the response from method VirtualMachinesClient.BeginReapply.
+type VirtualMachinesClientReapplyResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachinesClientRedeployResponse contains the response from method VirtualMachinesClient.BeginRedeploy.
+type VirtualMachinesClientRedeployResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachinesClientReimageResponse contains the response from method VirtualMachinesClient.BeginReimage.
+type VirtualMachinesClientReimageResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachinesClientRestartResponse contains the response from method VirtualMachinesClient.BeginRestart.
+type VirtualMachinesClientRestartResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachinesClientRetrieveBootDiagnosticsDataResponse contains the response from method VirtualMachinesClient.RetrieveBootDiagnosticsData.
+type VirtualMachinesClientRetrieveBootDiagnosticsDataResponse struct {
+ // The SAS URIs of the console screenshot and serial log blobs.
+ RetrieveBootDiagnosticsDataResult
+}
+
+// VirtualMachinesClientRunCommandResponse contains the response from method VirtualMachinesClient.BeginRunCommand.
+type VirtualMachinesClientRunCommandResponse struct {
+ RunCommandResult
+}
+
+// VirtualMachinesClientSimulateEvictionResponse contains the response from method VirtualMachinesClient.SimulateEviction.
+type VirtualMachinesClientSimulateEvictionResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachinesClientStartResponse contains the response from method VirtualMachinesClient.BeginStart.
+type VirtualMachinesClientStartResponse struct {
+ // placeholder for future response values
+}
+
+// VirtualMachinesClientUpdateResponse contains the response from method VirtualMachinesClient.BeginUpdate.
+type VirtualMachinesClientUpdateResponse struct {
+ // Describes a Virtual Machine.
+ VirtualMachine
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/restorepointcollections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/restorepointcollections_client.go
new file mode 100644
index 000000000..f53e3a7d4
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/restorepointcollections_client.go
@@ -0,0 +1,447 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// RestorePointCollectionsClient contains the methods for the RestorePointCollections group.
+// Don't use this type directly, use NewRestorePointCollectionsClient() instead.
+type RestorePointCollectionsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewRestorePointCollectionsClient creates a new instance of RestorePointCollectionsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewRestorePointCollectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorePointCollectionsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &RestorePointCollectionsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// CreateOrUpdate - The operation to create or update the restore point collection. Please refer to https://aka.ms/RestorePoints
+// for more details. When updating a restore point collection, only tags may be modified.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - restorePointCollectionName - The name of the restore point collection.
+// - parameters - Parameters supplied to the Create or Update restore point collection operation.
+// - options - RestorePointCollectionsClientCreateOrUpdateOptions contains the optional parameters for the RestorePointCollectionsClient.CreateOrUpdate
+// method.
+func (client *RestorePointCollectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, restorePointCollectionName string, parameters RestorePointCollection, options *RestorePointCollectionsClientCreateOrUpdateOptions) (RestorePointCollectionsClientCreateOrUpdateResponse, error) {
+ var err error
+ const operationName = "RestorePointCollectionsClient.CreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, restorePointCollectionName, parameters, options)
+ if err != nil {
+ return RestorePointCollectionsClientCreateOrUpdateResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return RestorePointCollectionsClientCreateOrUpdateResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return RestorePointCollectionsClientCreateOrUpdateResponse{}, err
+ }
+ resp, err := client.createOrUpdateHandleResponse(httpResp)
+ return resp, err
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *RestorePointCollectionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, restorePointCollectionName string, parameters RestorePointCollection, options *RestorePointCollectionsClientCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if restorePointCollectionName == "" {
+ return nil, errors.New("parameter restorePointCollectionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{restorePointCollectionName}", url.PathEscape(restorePointCollectionName))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// createOrUpdateHandleResponse handles the CreateOrUpdate response.
+func (client *RestorePointCollectionsClient) createOrUpdateHandleResponse(resp *http.Response) (RestorePointCollectionsClientCreateOrUpdateResponse, error) {
+ result := RestorePointCollectionsClientCreateOrUpdateResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RestorePointCollection); err != nil {
+ return RestorePointCollectionsClientCreateOrUpdateResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginDelete - The operation to delete the restore point collection. This operation will also delete all the contained restore
+// points.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - restorePointCollectionName - The name of the Restore Point Collection.
+// - options - RestorePointCollectionsClientBeginDeleteOptions contains the optional parameters for the RestorePointCollectionsClient.BeginDelete
+// method.
+func (client *RestorePointCollectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, restorePointCollectionName string, options *RestorePointCollectionsClientBeginDeleteOptions) (*runtime.Poller[RestorePointCollectionsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, restorePointCollectionName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RestorePointCollectionsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RestorePointCollectionsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - The operation to delete the restore point collection. This operation will also delete all the contained restore
+// points.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *RestorePointCollectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, restorePointCollectionName string, options *RestorePointCollectionsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "RestorePointCollectionsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, restorePointCollectionName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *RestorePointCollectionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, restorePointCollectionName string, options *RestorePointCollectionsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if restorePointCollectionName == "" {
+ return nil, errors.New("parameter restorePointCollectionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{restorePointCollectionName}", url.PathEscape(restorePointCollectionName))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - The operation to get the restore point collection.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - restorePointCollectionName - The name of the restore point collection.
+// - options - RestorePointCollectionsClientGetOptions contains the optional parameters for the RestorePointCollectionsClient.Get
+// method.
+func (client *RestorePointCollectionsClient) Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, options *RestorePointCollectionsClientGetOptions) (RestorePointCollectionsClientGetResponse, error) {
+ var err error
+ const operationName = "RestorePointCollectionsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, restorePointCollectionName, options)
+ if err != nil {
+ return RestorePointCollectionsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return RestorePointCollectionsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return RestorePointCollectionsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *RestorePointCollectionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, restorePointCollectionName string, options *RestorePointCollectionsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if restorePointCollectionName == "" {
+ return nil, errors.New("parameter restorePointCollectionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{restorePointCollectionName}", url.PathEscape(restorePointCollectionName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *RestorePointCollectionsClient) getHandleResponse(resp *http.Response) (RestorePointCollectionsClientGetResponse, error) {
+ result := RestorePointCollectionsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RestorePointCollection); err != nil {
+ return RestorePointCollectionsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - Gets the list of restore point collections in a resource group.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - options - RestorePointCollectionsClientListOptions contains the optional parameters for the RestorePointCollectionsClient.NewListPager
+// method.
+func (client *RestorePointCollectionsClient) NewListPager(resourceGroupName string, options *RestorePointCollectionsClientListOptions) *runtime.Pager[RestorePointCollectionsClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[RestorePointCollectionsClientListResponse]{
+ More: func(page RestorePointCollectionsClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *RestorePointCollectionsClientListResponse) (RestorePointCollectionsClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RestorePointCollectionsClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return RestorePointCollectionsClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *RestorePointCollectionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *RestorePointCollectionsClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *RestorePointCollectionsClient) listHandleResponse(resp *http.Response) (RestorePointCollectionsClientListResponse, error) {
+ result := RestorePointCollectionsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RestorePointCollectionListResult); err != nil {
+ return RestorePointCollectionsClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListAllPager - Gets the list of restore point collections in the subscription. Use nextLink property in the response
+// to get the next page of restore point collections. Do this till nextLink is not null to fetch all
+// the restore point collections.
+//
+// Generated from API version 2024-03-01
+// - options - RestorePointCollectionsClientListAllOptions contains the optional parameters for the RestorePointCollectionsClient.NewListAllPager
+// method.
+func (client *RestorePointCollectionsClient) NewListAllPager(options *RestorePointCollectionsClientListAllOptions) *runtime.Pager[RestorePointCollectionsClientListAllResponse] {
+ return runtime.NewPager(runtime.PagingHandler[RestorePointCollectionsClientListAllResponse]{
+ More: func(page RestorePointCollectionsClientListAllResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *RestorePointCollectionsClientListAllResponse) (RestorePointCollectionsClientListAllResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RestorePointCollectionsClient.NewListAllPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listAllCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return RestorePointCollectionsClientListAllResponse{}, err
+ }
+ return client.listAllHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listAllCreateRequest creates the ListAll request.
+func (client *RestorePointCollectionsClient) listAllCreateRequest(ctx context.Context, options *RestorePointCollectionsClientListAllOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/restorePointCollections"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listAllHandleResponse handles the ListAll response.
+func (client *RestorePointCollectionsClient) listAllHandleResponse(resp *http.Response) (RestorePointCollectionsClientListAllResponse, error) {
+ result := RestorePointCollectionsClientListAllResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RestorePointCollectionListResult); err != nil {
+ return RestorePointCollectionsClientListAllResponse{}, err
+ }
+ return result, nil
+}
+
+// Update - The operation to update the restore point collection.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - restorePointCollectionName - The name of the restore point collection.
+// - parameters - Parameters supplied to the Update restore point collection operation.
+// - options - RestorePointCollectionsClientUpdateOptions contains the optional parameters for the RestorePointCollectionsClient.Update
+// method.
+func (client *RestorePointCollectionsClient) Update(ctx context.Context, resourceGroupName string, restorePointCollectionName string, parameters RestorePointCollectionUpdate, options *RestorePointCollectionsClientUpdateOptions) (RestorePointCollectionsClientUpdateResponse, error) {
+ var err error
+ const operationName = "RestorePointCollectionsClient.Update"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, restorePointCollectionName, parameters, options)
+ if err != nil {
+ return RestorePointCollectionsClientUpdateResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return RestorePointCollectionsClientUpdateResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return RestorePointCollectionsClientUpdateResponse{}, err
+ }
+ resp, err := client.updateHandleResponse(httpResp)
+ return resp, err
+}
+
+// updateCreateRequest creates the Update request.
+func (client *RestorePointCollectionsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, restorePointCollectionName string, parameters RestorePointCollectionUpdate, options *RestorePointCollectionsClientUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if restorePointCollectionName == "" {
+ return nil, errors.New("parameter restorePointCollectionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{restorePointCollectionName}", url.PathEscape(restorePointCollectionName))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// updateHandleResponse handles the Update response.
+func (client *RestorePointCollectionsClient) updateHandleResponse(resp *http.Response) (RestorePointCollectionsClientUpdateResponse, error) {
+ result := RestorePointCollectionsClientUpdateResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RestorePointCollection); err != nil {
+ return RestorePointCollectionsClientUpdateResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/restorepoints_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/restorepoints_client.go
new file mode 100644
index 000000000..dffafe2da
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/restorepoints_client.go
@@ -0,0 +1,283 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// RestorePointsClient contains the methods for the RestorePoints group.
+// Don't use this type directly, use NewRestorePointsClient() instead.
+type RestorePointsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewRestorePointsClient creates a new instance of RestorePointsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewRestorePointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorePointsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &RestorePointsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreate - The operation to create the restore point. Updating properties of an existing restore point is not allowed
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - restorePointCollectionName - The name of the restore point collection.
+// - restorePointName - The name of the restore point.
+// - parameters - Parameters supplied to the Create restore point operation.
+// - options - RestorePointsClientBeginCreateOptions contains the optional parameters for the RestorePointsClient.BeginCreate
+// method.
+func (client *RestorePointsClient) BeginCreate(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, parameters RestorePoint, options *RestorePointsClientBeginCreateOptions) (*runtime.Poller[RestorePointsClientCreateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.create(ctx, resourceGroupName, restorePointCollectionName, restorePointName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RestorePointsClientCreateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RestorePointsClientCreateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Create - The operation to create the restore point. Updating properties of an existing restore point is not allowed
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *RestorePointsClient) create(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, parameters RestorePoint, options *RestorePointsClientBeginCreateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "RestorePointsClient.BeginCreate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createCreateRequest(ctx, resourceGroupName, restorePointCollectionName, restorePointName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createCreateRequest creates the Create request.
+func (client *RestorePointsClient) createCreateRequest(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, parameters RestorePoint, options *RestorePointsClientBeginCreateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if restorePointCollectionName == "" {
+ return nil, errors.New("parameter restorePointCollectionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{restorePointCollectionName}", url.PathEscape(restorePointCollectionName))
+ if restorePointName == "" {
+ return nil, errors.New("parameter restorePointName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{restorePointName}", url.PathEscape(restorePointName))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - The operation to delete the restore point.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - restorePointCollectionName - The name of the Restore Point Collection.
+// - restorePointName - The name of the restore point.
+// - options - RestorePointsClientBeginDeleteOptions contains the optional parameters for the RestorePointsClient.BeginDelete
+// method.
+func (client *RestorePointsClient) BeginDelete(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, options *RestorePointsClientBeginDeleteOptions) (*runtime.Poller[RestorePointsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, restorePointCollectionName, restorePointName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[RestorePointsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[RestorePointsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - The operation to delete the restore point.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *RestorePointsClient) deleteOperation(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, options *RestorePointsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "RestorePointsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, restorePointCollectionName, restorePointName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *RestorePointsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, options *RestorePointsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if restorePointCollectionName == "" {
+ return nil, errors.New("parameter restorePointCollectionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{restorePointCollectionName}", url.PathEscape(restorePointCollectionName))
+ if restorePointName == "" {
+ return nil, errors.New("parameter restorePointName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{restorePointName}", url.PathEscape(restorePointName))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - The operation to get the restore point.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - restorePointCollectionName - The name of the restore point collection.
+// - restorePointName - The name of the restore point.
+// - options - RestorePointsClientGetOptions contains the optional parameters for the RestorePointsClient.Get method.
+func (client *RestorePointsClient) Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, options *RestorePointsClientGetOptions) (RestorePointsClientGetResponse, error) {
+ var err error
+ const operationName = "RestorePointsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, restorePointCollectionName, restorePointName, options)
+ if err != nil {
+ return RestorePointsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return RestorePointsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return RestorePointsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *RestorePointsClient) getCreateRequest(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, options *RestorePointsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if restorePointCollectionName == "" {
+ return nil, errors.New("parameter restorePointCollectionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{restorePointCollectionName}", url.PathEscape(restorePointCollectionName))
+ if restorePointName == "" {
+ return nil, errors.New("parameter restorePointName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{restorePointName}", url.PathEscape(restorePointName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *RestorePointsClient) getHandleResponse(resp *http.Response) (RestorePointsClientGetResponse, error) {
+ result := RestorePointsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RestorePoint); err != nil {
+ return RestorePointsClientGetResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/sharedgalleries_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/sharedgalleries_client.go
new file mode 100644
index 000000000..ee8172bae
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/sharedgalleries_client.go
@@ -0,0 +1,172 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// SharedGalleriesClient contains the methods for the SharedGalleries group.
+// Don't use this type directly, use NewSharedGalleriesClient() instead.
+type SharedGalleriesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewSharedGalleriesClient creates a new instance of SharedGalleriesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewSharedGalleriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SharedGalleriesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &SharedGalleriesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// Get - Get a shared gallery by subscription id or tenant id.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - location - Resource location.
+// - galleryUniqueName - The unique name of the Shared Gallery.
+// - options - SharedGalleriesClientGetOptions contains the optional parameters for the SharedGalleriesClient.Get method.
+func (client *SharedGalleriesClient) Get(ctx context.Context, location string, galleryUniqueName string, options *SharedGalleriesClientGetOptions) (SharedGalleriesClientGetResponse, error) {
+ var err error
+ const operationName = "SharedGalleriesClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, location, galleryUniqueName, options)
+ if err != nil {
+ return SharedGalleriesClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return SharedGalleriesClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return SharedGalleriesClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *SharedGalleriesClient) getCreateRequest(ctx context.Context, location string, galleryUniqueName string, options *SharedGalleriesClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if galleryUniqueName == "" {
+ return nil, errors.New("parameter galleryUniqueName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryUniqueName}", url.PathEscape(galleryUniqueName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *SharedGalleriesClient) getHandleResponse(resp *http.Response) (SharedGalleriesClientGetResponse, error) {
+ result := SharedGalleriesClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SharedGallery); err != nil {
+ return SharedGalleriesClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - List shared galleries by subscription id or tenant id.
+//
+// Generated from API version 2023-07-03
+// - location - Resource location.
+// - options - SharedGalleriesClientListOptions contains the optional parameters for the SharedGalleriesClient.NewListPager
+// method.
+func (client *SharedGalleriesClient) NewListPager(location string, options *SharedGalleriesClientListOptions) *runtime.Pager[SharedGalleriesClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[SharedGalleriesClientListResponse]{
+ More: func(page SharedGalleriesClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *SharedGalleriesClientListResponse) (SharedGalleriesClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SharedGalleriesClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, location, options)
+ }, nil)
+ if err != nil {
+ return SharedGalleriesClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *SharedGalleriesClient) listCreateRequest(ctx context.Context, location string, options *SharedGalleriesClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ if options != nil && options.SharedTo != nil {
+ reqQP.Set("sharedTo", string(*options.SharedTo))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *SharedGalleriesClient) listHandleResponse(resp *http.Response) (SharedGalleriesClientListResponse, error) {
+ result := SharedGalleriesClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SharedGalleryList); err != nil {
+ return SharedGalleriesClientListResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/sharedgalleryimages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/sharedgalleryimages_client.go
new file mode 100644
index 000000000..8f0ef79cf
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/sharedgalleryimages_client.go
@@ -0,0 +1,182 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// SharedGalleryImagesClient contains the methods for the SharedGalleryImages group.
+// Don't use this type directly, use NewSharedGalleryImagesClient() instead.
+type SharedGalleryImagesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewSharedGalleryImagesClient creates a new instance of SharedGalleryImagesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewSharedGalleryImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SharedGalleryImagesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &SharedGalleryImagesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// Get - Get a shared gallery image by subscription id or tenant id.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - location - Resource location.
+// - galleryUniqueName - The unique name of the Shared Gallery.
+// - galleryImageName - The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.
+// - options - SharedGalleryImagesClientGetOptions contains the optional parameters for the SharedGalleryImagesClient.Get method.
+func (client *SharedGalleryImagesClient) Get(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, options *SharedGalleryImagesClientGetOptions) (SharedGalleryImagesClientGetResponse, error) {
+ var err error
+ const operationName = "SharedGalleryImagesClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, location, galleryUniqueName, galleryImageName, options)
+ if err != nil {
+ return SharedGalleryImagesClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return SharedGalleryImagesClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return SharedGalleryImagesClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *SharedGalleryImagesClient) getCreateRequest(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, options *SharedGalleryImagesClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if galleryUniqueName == "" {
+ return nil, errors.New("parameter galleryUniqueName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryUniqueName}", url.PathEscape(galleryUniqueName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *SharedGalleryImagesClient) getHandleResponse(resp *http.Response) (SharedGalleryImagesClientGetResponse, error) {
+ result := SharedGalleryImagesClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SharedGalleryImage); err != nil {
+ return SharedGalleryImagesClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - List shared gallery images by subscription id or tenant id.
+//
+// Generated from API version 2023-07-03
+// - location - Resource location.
+// - galleryUniqueName - The unique name of the Shared Gallery.
+// - options - SharedGalleryImagesClientListOptions contains the optional parameters for the SharedGalleryImagesClient.NewListPager
+// method.
+func (client *SharedGalleryImagesClient) NewListPager(location string, galleryUniqueName string, options *SharedGalleryImagesClientListOptions) *runtime.Pager[SharedGalleryImagesClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[SharedGalleryImagesClientListResponse]{
+ More: func(page SharedGalleryImagesClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *SharedGalleryImagesClientListResponse) (SharedGalleryImagesClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SharedGalleryImagesClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, location, galleryUniqueName, options)
+ }, nil)
+ if err != nil {
+ return SharedGalleryImagesClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *SharedGalleryImagesClient) listCreateRequest(ctx context.Context, location string, galleryUniqueName string, options *SharedGalleryImagesClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if galleryUniqueName == "" {
+ return nil, errors.New("parameter galleryUniqueName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryUniqueName}", url.PathEscape(galleryUniqueName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ if options != nil && options.SharedTo != nil {
+ reqQP.Set("sharedTo", string(*options.SharedTo))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *SharedGalleryImagesClient) listHandleResponse(resp *http.Response) (SharedGalleryImagesClientListResponse, error) {
+ result := SharedGalleryImagesClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SharedGalleryImageList); err != nil {
+ return SharedGalleryImagesClientListResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/sharedgalleryimageversions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/sharedgalleryimageversions_client.go
new file mode 100644
index 000000000..729b0e3c5
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/sharedgalleryimageversions_client.go
@@ -0,0 +1,195 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// SharedGalleryImageVersionsClient contains the methods for the SharedGalleryImageVersions group.
+// Don't use this type directly, use NewSharedGalleryImageVersionsClient() instead.
+type SharedGalleryImageVersionsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewSharedGalleryImageVersionsClient creates a new instance of SharedGalleryImageVersionsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewSharedGalleryImageVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SharedGalleryImageVersionsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &SharedGalleryImageVersionsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// Get - Get a shared gallery image version by subscription id or tenant id.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-07-03
+// - location - Resource location.
+// - galleryUniqueName - The unique name of the Shared Gallery.
+// - galleryImageName - The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.
+// - galleryImageVersionName - The name of the gallery image version to be created. Needs to follow semantic version name pattern:
+// The allowed characters are digit and period. Digits must be within the range of a 32-bit integer.
+// Format: ..
+// - options - SharedGalleryImageVersionsClientGetOptions contains the optional parameters for the SharedGalleryImageVersionsClient.Get
+// method.
+func (client *SharedGalleryImageVersionsClient) Get(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, galleryImageVersionName string, options *SharedGalleryImageVersionsClientGetOptions) (SharedGalleryImageVersionsClientGetResponse, error) {
+ var err error
+ const operationName = "SharedGalleryImageVersionsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, location, galleryUniqueName, galleryImageName, galleryImageVersionName, options)
+ if err != nil {
+ return SharedGalleryImageVersionsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return SharedGalleryImageVersionsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return SharedGalleryImageVersionsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *SharedGalleryImageVersionsClient) getCreateRequest(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, galleryImageVersionName string, options *SharedGalleryImageVersionsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions/{galleryImageVersionName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if galleryUniqueName == "" {
+ return nil, errors.New("parameter galleryUniqueName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryUniqueName}", url.PathEscape(galleryUniqueName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ if galleryImageVersionName == "" {
+ return nil, errors.New("parameter galleryImageVersionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageVersionName}", url.PathEscape(galleryImageVersionName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *SharedGalleryImageVersionsClient) getHandleResponse(resp *http.Response) (SharedGalleryImageVersionsClientGetResponse, error) {
+ result := SharedGalleryImageVersionsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SharedGalleryImageVersion); err != nil {
+ return SharedGalleryImageVersionsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - List shared gallery image versions by subscription id or tenant id.
+//
+// Generated from API version 2023-07-03
+// - location - Resource location.
+// - galleryUniqueName - The unique name of the Shared Gallery.
+// - galleryImageName - The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.
+// - options - SharedGalleryImageVersionsClientListOptions contains the optional parameters for the SharedGalleryImageVersionsClient.NewListPager
+// method.
+func (client *SharedGalleryImageVersionsClient) NewListPager(location string, galleryUniqueName string, galleryImageName string, options *SharedGalleryImageVersionsClientListOptions) *runtime.Pager[SharedGalleryImageVersionsClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[SharedGalleryImageVersionsClientListResponse]{
+ More: func(page SharedGalleryImageVersionsClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *SharedGalleryImageVersionsClientListResponse) (SharedGalleryImageVersionsClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SharedGalleryImageVersionsClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, location, galleryUniqueName, galleryImageName, options)
+ }, nil)
+ if err != nil {
+ return SharedGalleryImageVersionsClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *SharedGalleryImageVersionsClient) listCreateRequest(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, options *SharedGalleryImageVersionsClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if galleryUniqueName == "" {
+ return nil, errors.New("parameter galleryUniqueName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryUniqueName}", url.PathEscape(galleryUniqueName))
+ if galleryImageName == "" {
+ return nil, errors.New("parameter galleryImageName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{galleryImageName}", url.PathEscape(galleryImageName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-07-03")
+ if options != nil && options.SharedTo != nil {
+ reqQP.Set("sharedTo", string(*options.SharedTo))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *SharedGalleryImageVersionsClient) listHandleResponse(resp *http.Response) (SharedGalleryImageVersionsClientListResponse, error) {
+ result := SharedGalleryImageVersionsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SharedGalleryImageVersionList); err != nil {
+ return SharedGalleryImageVersionsClientListResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/snapshots_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/snapshots_client.go
new file mode 100644
index 000000000..8c73f7709
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/snapshots_client.go
@@ -0,0 +1,625 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// SnapshotsClient contains the methods for the Snapshots group.
+// Don't use this type directly, use NewSnapshotsClient() instead.
+type SnapshotsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewSnapshotsClient creates a new instance of SnapshotsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewSnapshotsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SnapshotsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &SnapshotsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - Creates or updates a snapshot.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created.
+// Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
+// characters.
+// - snapshot - Snapshot object supplied in the body of the Put disk operation.
+// - options - SnapshotsClientBeginCreateOrUpdateOptions contains the optional parameters for the SnapshotsClient.BeginCreateOrUpdate
+// method.
+func (client *SnapshotsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot, options *SnapshotsClientBeginCreateOrUpdateOptions) (*runtime.Poller[SnapshotsClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, snapshotName, snapshot, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - Creates or updates a snapshot.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *SnapshotsClient) createOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot, options *SnapshotsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "SnapshotsClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, snapshotName, snapshot, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *SnapshotsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot, options *SnapshotsClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if snapshotName == "" {
+ return nil, errors.New("parameter snapshotName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, snapshot); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - Deletes a snapshot.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created.
+// Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
+// characters.
+// - options - SnapshotsClientBeginDeleteOptions contains the optional parameters for the SnapshotsClient.BeginDelete method.
+func (client *SnapshotsClient) BeginDelete(ctx context.Context, resourceGroupName string, snapshotName string, options *SnapshotsClientBeginDeleteOptions) (*runtime.Poller[SnapshotsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, snapshotName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Deletes a snapshot.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *SnapshotsClient) deleteOperation(ctx context.Context, resourceGroupName string, snapshotName string, options *SnapshotsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "SnapshotsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, snapshotName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *SnapshotsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, snapshotName string, options *SnapshotsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if snapshotName == "" {
+ return nil, errors.New("parameter snapshotName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ return req, nil
+}
+
+// Get - Gets information about a snapshot.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created.
+// Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
+// characters.
+// - options - SnapshotsClientGetOptions contains the optional parameters for the SnapshotsClient.Get method.
+func (client *SnapshotsClient) Get(ctx context.Context, resourceGroupName string, snapshotName string, options *SnapshotsClientGetOptions) (SnapshotsClientGetResponse, error) {
+ var err error
+ const operationName = "SnapshotsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, snapshotName, options)
+ if err != nil {
+ return SnapshotsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return SnapshotsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return SnapshotsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *SnapshotsClient) getCreateRequest(ctx context.Context, resourceGroupName string, snapshotName string, options *SnapshotsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if snapshotName == "" {
+ return nil, errors.New("parameter snapshotName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *SnapshotsClient) getHandleResponse(resp *http.Response) (SnapshotsClientGetResponse, error) {
+ result := SnapshotsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.Snapshot); err != nil {
+ return SnapshotsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginGrantAccess - Grants access to a snapshot.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created.
+// Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
+// characters.
+// - grantAccessData - Access data object supplied in the body of the get snapshot access operation.
+// - options - SnapshotsClientBeginGrantAccessOptions contains the optional parameters for the SnapshotsClient.BeginGrantAccess
+// method.
+func (client *SnapshotsClient) BeginGrantAccess(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData GrantAccessData, options *SnapshotsClientBeginGrantAccessOptions) (*runtime.Poller[SnapshotsClientGrantAccessResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.grantAccess(ctx, resourceGroupName, snapshotName, grantAccessData, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotsClientGrantAccessResponse]{
+ FinalStateVia: runtime.FinalStateViaLocation,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotsClientGrantAccessResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// GrantAccess - Grants access to a snapshot.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *SnapshotsClient) grantAccess(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData GrantAccessData, options *SnapshotsClientBeginGrantAccessOptions) (*http.Response, error) {
+ var err error
+ const operationName = "SnapshotsClient.BeginGrantAccess"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.grantAccessCreateRequest(ctx, resourceGroupName, snapshotName, grantAccessData, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// grantAccessCreateRequest creates the GrantAccess request.
+func (client *SnapshotsClient) grantAccessCreateRequest(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData GrantAccessData, options *SnapshotsClientBeginGrantAccessOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if snapshotName == "" {
+ return nil, errors.New("parameter snapshotName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, grantAccessData); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// NewListPager - Lists snapshots under a subscription.
+//
+// Generated from API version 2023-10-02
+// - options - SnapshotsClientListOptions contains the optional parameters for the SnapshotsClient.NewListPager method.
+func (client *SnapshotsClient) NewListPager(options *SnapshotsClientListOptions) *runtime.Pager[SnapshotsClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[SnapshotsClientListResponse]{
+ More: func(page SnapshotsClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *SnapshotsClientListResponse) (SnapshotsClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SnapshotsClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return SnapshotsClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *SnapshotsClient) listCreateRequest(ctx context.Context, options *SnapshotsClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *SnapshotsClient) listHandleResponse(resp *http.Response) (SnapshotsClientListResponse, error) {
+ result := SnapshotsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotList); err != nil {
+ return SnapshotsClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByResourceGroupPager - Lists snapshots under a resource group.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - options - SnapshotsClientListByResourceGroupOptions contains the optional parameters for the SnapshotsClient.NewListByResourceGroupPager
+// method.
+func (client *SnapshotsClient) NewListByResourceGroupPager(resourceGroupName string, options *SnapshotsClientListByResourceGroupOptions) *runtime.Pager[SnapshotsClientListByResourceGroupResponse] {
+ return runtime.NewPager(runtime.PagingHandler[SnapshotsClientListByResourceGroupResponse]{
+ More: func(page SnapshotsClientListByResourceGroupResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *SnapshotsClientListByResourceGroupResponse) (SnapshotsClientListByResourceGroupResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SnapshotsClient.NewListByResourceGroupPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return SnapshotsClientListByResourceGroupResponse{}, err
+ }
+ return client.listByResourceGroupHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByResourceGroupCreateRequest creates the ListByResourceGroup request.
+func (client *SnapshotsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *SnapshotsClientListByResourceGroupOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByResourceGroupHandleResponse handles the ListByResourceGroup response.
+func (client *SnapshotsClient) listByResourceGroupHandleResponse(resp *http.Response) (SnapshotsClientListByResourceGroupResponse, error) {
+ result := SnapshotsClientListByResourceGroupResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SnapshotList); err != nil {
+ return SnapshotsClientListByResourceGroupResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginRevokeAccess - Revokes access to a snapshot.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created.
+// Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
+// characters.
+// - options - SnapshotsClientBeginRevokeAccessOptions contains the optional parameters for the SnapshotsClient.BeginRevokeAccess
+// method.
+func (client *SnapshotsClient) BeginRevokeAccess(ctx context.Context, resourceGroupName string, snapshotName string, options *SnapshotsClientBeginRevokeAccessOptions) (*runtime.Poller[SnapshotsClientRevokeAccessResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.revokeAccess(ctx, resourceGroupName, snapshotName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotsClientRevokeAccessResponse]{
+ FinalStateVia: runtime.FinalStateViaLocation,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotsClientRevokeAccessResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// RevokeAccess - Revokes access to a snapshot.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *SnapshotsClient) revokeAccess(ctx context.Context, resourceGroupName string, snapshotName string, options *SnapshotsClientBeginRevokeAccessOptions) (*http.Response, error) {
+ var err error
+ const operationName = "SnapshotsClient.BeginRevokeAccess"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.revokeAccessCreateRequest(ctx, resourceGroupName, snapshotName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// revokeAccessCreateRequest creates the RevokeAccess request.
+func (client *SnapshotsClient) revokeAccessCreateRequest(ctx context.Context, resourceGroupName string, snapshotName string, options *SnapshotsClientBeginRevokeAccessOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if snapshotName == "" {
+ return nil, errors.New("parameter snapshotName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ return req, nil
+}
+
+// BeginUpdate - Updates (patches) a snapshot.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+// - resourceGroupName - The name of the resource group.
+// - snapshotName - The name of the snapshot that is being created. The name can't be changed after the snapshot is created.
+// Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
+// characters.
+// - snapshot - Snapshot object supplied in the body of the Patch snapshot operation.
+// - options - SnapshotsClientBeginUpdateOptions contains the optional parameters for the SnapshotsClient.BeginUpdate method.
+func (client *SnapshotsClient) BeginUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate, options *SnapshotsClientBeginUpdateOptions) (*runtime.Poller[SnapshotsClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, snapshotName, snapshot, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[SnapshotsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[SnapshotsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Updates (patches) a snapshot.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2023-10-02
+func (client *SnapshotsClient) update(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate, options *SnapshotsClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "SnapshotsClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, snapshotName, snapshot, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *SnapshotsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate, options *SnapshotsClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if snapshotName == "" {
+ return nil, errors.New("parameter snapshotName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{snapshotName}", url.PathEscape(snapshotName))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2023-10-02")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, snapshot); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/sshpublickeys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/sshpublickeys_client.go
new file mode 100644
index 000000000..58d8d18ba
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/sshpublickeys_client.go
@@ -0,0 +1,489 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// SSHPublicKeysClient contains the methods for the SSHPublicKeys group.
+// Don't use this type directly, use NewSSHPublicKeysClient() instead.
+type SSHPublicKeysClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewSSHPublicKeysClient creates a new instance of SSHPublicKeysClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewSSHPublicKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SSHPublicKeysClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &SSHPublicKeysClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// Create - Creates a new SSH public key resource.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - sshPublicKeyName - The name of the SSH public key.
+// - parameters - Parameters supplied to create the SSH public key.
+// - options - SSHPublicKeysClientCreateOptions contains the optional parameters for the SSHPublicKeysClient.Create method.
+func (client *SSHPublicKeysClient) Create(ctx context.Context, resourceGroupName string, sshPublicKeyName string, parameters SSHPublicKeyResource, options *SSHPublicKeysClientCreateOptions) (SSHPublicKeysClientCreateResponse, error) {
+ var err error
+ const operationName = "SSHPublicKeysClient.Create"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createCreateRequest(ctx, resourceGroupName, sshPublicKeyName, parameters, options)
+ if err != nil {
+ return SSHPublicKeysClientCreateResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return SSHPublicKeysClientCreateResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return SSHPublicKeysClientCreateResponse{}, err
+ }
+ resp, err := client.createHandleResponse(httpResp)
+ return resp, err
+}
+
+// createCreateRequest creates the Create request.
+func (client *SSHPublicKeysClient) createCreateRequest(ctx context.Context, resourceGroupName string, sshPublicKeyName string, parameters SSHPublicKeyResource, options *SSHPublicKeysClientCreateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if sshPublicKeyName == "" {
+ return nil, errors.New("parameter sshPublicKeyName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{sshPublicKeyName}", url.PathEscape(sshPublicKeyName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// createHandleResponse handles the Create response.
+func (client *SSHPublicKeysClient) createHandleResponse(resp *http.Response) (SSHPublicKeysClientCreateResponse, error) {
+ result := SSHPublicKeysClientCreateResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SSHPublicKeyResource); err != nil {
+ return SSHPublicKeysClientCreateResponse{}, err
+ }
+ return result, nil
+}
+
+// Delete - Delete an SSH public key.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - sshPublicKeyName - The name of the SSH public key.
+// - options - SSHPublicKeysClientDeleteOptions contains the optional parameters for the SSHPublicKeysClient.Delete method.
+func (client *SSHPublicKeysClient) Delete(ctx context.Context, resourceGroupName string, sshPublicKeyName string, options *SSHPublicKeysClientDeleteOptions) (SSHPublicKeysClientDeleteResponse, error) {
+ var err error
+ const operationName = "SSHPublicKeysClient.Delete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, sshPublicKeyName, options)
+ if err != nil {
+ return SSHPublicKeysClientDeleteResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return SSHPublicKeysClientDeleteResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return SSHPublicKeysClientDeleteResponse{}, err
+ }
+ return SSHPublicKeysClientDeleteResponse{}, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *SSHPublicKeysClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, sshPublicKeyName string, options *SSHPublicKeysClientDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if sshPublicKeyName == "" {
+ return nil, errors.New("parameter sshPublicKeyName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{sshPublicKeyName}", url.PathEscape(sshPublicKeyName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// GenerateKeyPair - Generates and returns a public/private key pair and populates the SSH public key resource with the public
+// key. The length of the key will be 3072 bits. This operation can only be performed once per
+// SSH public key resource.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - sshPublicKeyName - The name of the SSH public key.
+// - options - SSHPublicKeysClientGenerateKeyPairOptions contains the optional parameters for the SSHPublicKeysClient.GenerateKeyPair
+// method.
+func (client *SSHPublicKeysClient) GenerateKeyPair(ctx context.Context, resourceGroupName string, sshPublicKeyName string, options *SSHPublicKeysClientGenerateKeyPairOptions) (SSHPublicKeysClientGenerateKeyPairResponse, error) {
+ var err error
+ const operationName = "SSHPublicKeysClient.GenerateKeyPair"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.generateKeyPairCreateRequest(ctx, resourceGroupName, sshPublicKeyName, options)
+ if err != nil {
+ return SSHPublicKeysClientGenerateKeyPairResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return SSHPublicKeysClientGenerateKeyPairResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return SSHPublicKeysClientGenerateKeyPairResponse{}, err
+ }
+ resp, err := client.generateKeyPairHandleResponse(httpResp)
+ return resp, err
+}
+
+// generateKeyPairCreateRequest creates the GenerateKeyPair request.
+func (client *SSHPublicKeysClient) generateKeyPairCreateRequest(ctx context.Context, resourceGroupName string, sshPublicKeyName string, options *SSHPublicKeysClientGenerateKeyPairOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}/generateKeyPair"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if sshPublicKeyName == "" {
+ return nil, errors.New("parameter sshPublicKeyName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{sshPublicKeyName}", url.PathEscape(sshPublicKeyName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.Parameters != nil {
+ if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// generateKeyPairHandleResponse handles the GenerateKeyPair response.
+func (client *SSHPublicKeysClient) generateKeyPairHandleResponse(resp *http.Response) (SSHPublicKeysClientGenerateKeyPairResponse, error) {
+ result := SSHPublicKeysClientGenerateKeyPairResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SSHPublicKeyGenerateKeyPairResult); err != nil {
+ return SSHPublicKeysClientGenerateKeyPairResponse{}, err
+ }
+ return result, nil
+}
+
+// Get - Retrieves information about an SSH public key.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - sshPublicKeyName - The name of the SSH public key.
+// - options - SSHPublicKeysClientGetOptions contains the optional parameters for the SSHPublicKeysClient.Get method.
+func (client *SSHPublicKeysClient) Get(ctx context.Context, resourceGroupName string, sshPublicKeyName string, options *SSHPublicKeysClientGetOptions) (SSHPublicKeysClientGetResponse, error) {
+ var err error
+ const operationName = "SSHPublicKeysClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, sshPublicKeyName, options)
+ if err != nil {
+ return SSHPublicKeysClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return SSHPublicKeysClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return SSHPublicKeysClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *SSHPublicKeysClient) getCreateRequest(ctx context.Context, resourceGroupName string, sshPublicKeyName string, options *SSHPublicKeysClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if sshPublicKeyName == "" {
+ return nil, errors.New("parameter sshPublicKeyName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{sshPublicKeyName}", url.PathEscape(sshPublicKeyName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *SSHPublicKeysClient) getHandleResponse(resp *http.Response) (SSHPublicKeysClientGetResponse, error) {
+ result := SSHPublicKeysClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SSHPublicKeyResource); err != nil {
+ return SSHPublicKeysClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByResourceGroupPager - Lists all of the SSH public keys in the specified resource group. Use the nextLink property
+// in the response to get the next page of SSH public keys.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - options - SSHPublicKeysClientListByResourceGroupOptions contains the optional parameters for the SSHPublicKeysClient.NewListByResourceGroupPager
+// method.
+func (client *SSHPublicKeysClient) NewListByResourceGroupPager(resourceGroupName string, options *SSHPublicKeysClientListByResourceGroupOptions) *runtime.Pager[SSHPublicKeysClientListByResourceGroupResponse] {
+ return runtime.NewPager(runtime.PagingHandler[SSHPublicKeysClientListByResourceGroupResponse]{
+ More: func(page SSHPublicKeysClientListByResourceGroupResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *SSHPublicKeysClientListByResourceGroupResponse) (SSHPublicKeysClientListByResourceGroupResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SSHPublicKeysClient.NewListByResourceGroupPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return SSHPublicKeysClientListByResourceGroupResponse{}, err
+ }
+ return client.listByResourceGroupHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByResourceGroupCreateRequest creates the ListByResourceGroup request.
+func (client *SSHPublicKeysClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *SSHPublicKeysClientListByResourceGroupOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByResourceGroupHandleResponse handles the ListByResourceGroup response.
+func (client *SSHPublicKeysClient) listByResourceGroupHandleResponse(resp *http.Response) (SSHPublicKeysClientListByResourceGroupResponse, error) {
+ result := SSHPublicKeysClientListByResourceGroupResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SSHPublicKeysGroupListResult); err != nil {
+ return SSHPublicKeysClientListByResourceGroupResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListBySubscriptionPager - Lists all of the SSH public keys in the subscription. Use the nextLink property in the response
+// to get the next page of SSH public keys.
+//
+// Generated from API version 2024-03-01
+// - options - SSHPublicKeysClientListBySubscriptionOptions contains the optional parameters for the SSHPublicKeysClient.NewListBySubscriptionPager
+// method.
+func (client *SSHPublicKeysClient) NewListBySubscriptionPager(options *SSHPublicKeysClientListBySubscriptionOptions) *runtime.Pager[SSHPublicKeysClientListBySubscriptionResponse] {
+ return runtime.NewPager(runtime.PagingHandler[SSHPublicKeysClientListBySubscriptionResponse]{
+ More: func(page SSHPublicKeysClientListBySubscriptionResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *SSHPublicKeysClientListBySubscriptionResponse) (SSHPublicKeysClientListBySubscriptionResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "SSHPublicKeysClient.NewListBySubscriptionPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listBySubscriptionCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return SSHPublicKeysClientListBySubscriptionResponse{}, err
+ }
+ return client.listBySubscriptionHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listBySubscriptionCreateRequest creates the ListBySubscription request.
+func (client *SSHPublicKeysClient) listBySubscriptionCreateRequest(ctx context.Context, options *SSHPublicKeysClientListBySubscriptionOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/sshPublicKeys"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listBySubscriptionHandleResponse handles the ListBySubscription response.
+func (client *SSHPublicKeysClient) listBySubscriptionHandleResponse(resp *http.Response) (SSHPublicKeysClientListBySubscriptionResponse, error) {
+ result := SSHPublicKeysClientListBySubscriptionResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SSHPublicKeysGroupListResult); err != nil {
+ return SSHPublicKeysClientListBySubscriptionResponse{}, err
+ }
+ return result, nil
+}
+
+// Update - Updates a new SSH public key resource.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - sshPublicKeyName - The name of the SSH public key.
+// - parameters - Parameters supplied to update the SSH public key.
+// - options - SSHPublicKeysClientUpdateOptions contains the optional parameters for the SSHPublicKeysClient.Update method.
+func (client *SSHPublicKeysClient) Update(ctx context.Context, resourceGroupName string, sshPublicKeyName string, parameters SSHPublicKeyUpdateResource, options *SSHPublicKeysClientUpdateOptions) (SSHPublicKeysClientUpdateResponse, error) {
+ var err error
+ const operationName = "SSHPublicKeysClient.Update"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, sshPublicKeyName, parameters, options)
+ if err != nil {
+ return SSHPublicKeysClientUpdateResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return SSHPublicKeysClientUpdateResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return SSHPublicKeysClientUpdateResponse{}, err
+ }
+ resp, err := client.updateHandleResponse(httpResp)
+ return resp, err
+}
+
+// updateCreateRequest creates the Update request.
+func (client *SSHPublicKeysClient) updateCreateRequest(ctx context.Context, resourceGroupName string, sshPublicKeyName string, parameters SSHPublicKeyUpdateResource, options *SSHPublicKeysClientUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if sshPublicKeyName == "" {
+ return nil, errors.New("parameter sshPublicKeyName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{sshPublicKeyName}", url.PathEscape(sshPublicKeyName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// updateHandleResponse handles the Update response.
+func (client *SSHPublicKeysClient) updateHandleResponse(resp *http.Response) (SSHPublicKeysClientUpdateResponse, error) {
+ result := SSHPublicKeysClientUpdateResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.SSHPublicKeyResource); err != nil {
+ return SSHPublicKeysClientUpdateResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/time_rfc3339.go
new file mode 100644
index 000000000..ae4e62dd4
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/time_rfc3339.go
@@ -0,0 +1,110 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "encoding/json"
+ "fmt"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "reflect"
+ "regexp"
+ "strings"
+ "time"
+)
+
+// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases.
+var tzOffsetRegex = regexp.MustCompile(`(?:Z|z|\+|-)(?:\d+:\d+)*"*$`)
+
+const (
+ utcDateTime = "2006-01-02T15:04:05.999999999"
+ utcDateTimeJSON = `"` + utcDateTime + `"`
+ utcDateTimeNoT = "2006-01-02 15:04:05.999999999"
+ utcDateTimeJSONNoT = `"` + utcDateTimeNoT + `"`
+ dateTimeNoT = `2006-01-02 15:04:05.999999999Z07:00`
+ dateTimeJSON = `"` + time.RFC3339Nano + `"`
+ dateTimeJSONNoT = `"` + dateTimeNoT + `"`
+)
+
+type dateTimeRFC3339 time.Time
+
+func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) {
+ tt := time.Time(t)
+ return tt.MarshalJSON()
+}
+
+func (t dateTimeRFC3339) MarshalText() ([]byte, error) {
+ tt := time.Time(t)
+ return tt.MarshalText()
+}
+
+func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error {
+ tzOffset := tzOffsetRegex.Match(data)
+ hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t")
+ var layout string
+ if tzOffset && hasT {
+ layout = dateTimeJSON
+ } else if tzOffset {
+ layout = dateTimeJSONNoT
+ } else if hasT {
+ layout = utcDateTimeJSON
+ } else {
+ layout = utcDateTimeJSONNoT
+ }
+ return t.Parse(layout, string(data))
+}
+
+func (t *dateTimeRFC3339) UnmarshalText(data []byte) error {
+ tzOffset := tzOffsetRegex.Match(data)
+ hasT := strings.Contains(string(data), "T") || strings.Contains(string(data), "t")
+ var layout string
+ if tzOffset && hasT {
+ layout = time.RFC3339Nano
+ } else if tzOffset {
+ layout = dateTimeNoT
+ } else if hasT {
+ layout = utcDateTime
+ } else {
+ layout = utcDateTimeNoT
+ }
+ return t.Parse(layout, string(data))
+}
+
+func (t *dateTimeRFC3339) Parse(layout, value string) error {
+ p, err := time.Parse(layout, strings.ToUpper(value))
+ *t = dateTimeRFC3339(p)
+ return err
+}
+
+func (t dateTimeRFC3339) String() string {
+ return time.Time(t).Format(time.RFC3339Nano)
+}
+
+func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) {
+ if t == nil {
+ return
+ } else if azcore.IsNullValue(t) {
+ m[k] = nil
+ return
+ } else if reflect.ValueOf(t).IsNil() {
+ return
+ }
+ m[k] = (*dateTimeRFC3339)(t)
+}
+
+func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error {
+ if data == nil || string(data) == "null" {
+ return nil
+ }
+ var aux dateTimeRFC3339
+ if err := json.Unmarshal(data, &aux); err != nil {
+ return fmt.Errorf("struct field %s: %v", fn, err)
+ }
+ *t = (*time.Time)(&aux)
+ return nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/usage_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/usage_client.go
new file mode 100644
index 000000000..e251486e9
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/usage_client.go
@@ -0,0 +1,105 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// UsageClient contains the methods for the Usage group.
+// Don't use this type directly, use NewUsageClient() instead.
+type UsageClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewUsageClient creates a new instance of UsageClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewUsageClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsageClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &UsageClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// NewListPager - Gets, for the specified location, the current compute resource usage information as well as the limits for
+// compute resources under the subscription.
+//
+// Generated from API version 2024-03-01
+// - location - The location for which resource usage is queried.
+// - options - UsageClientListOptions contains the optional parameters for the UsageClient.NewListPager method.
+func (client *UsageClient) NewListPager(location string, options *UsageClientListOptions) *runtime.Pager[UsageClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[UsageClientListResponse]{
+ More: func(page UsageClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *UsageClientListResponse) (UsageClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UsageClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, location, options)
+ }, nil)
+ if err != nil {
+ return UsageClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *UsageClient) listCreateRequest(ctx context.Context, location string, options *UsageClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *UsageClient) listHandleResponse(resp *http.Response) (UsageClientListResponse, error) {
+ result := UsageClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.ListUsagesResult); err != nil {
+ return UsageClientListResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineextensionimages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineextensionimages_client.go
new file mode 100644
index 000000000..a337d2453
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineextensionimages_client.go
@@ -0,0 +1,259 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strconv"
+ "strings"
+)
+
+// VirtualMachineExtensionImagesClient contains the methods for the VirtualMachineExtensionImages group.
+// Don't use this type directly, use NewVirtualMachineExtensionImagesClient() instead.
+type VirtualMachineExtensionImagesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewVirtualMachineExtensionImagesClient creates a new instance of VirtualMachineExtensionImagesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewVirtualMachineExtensionImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineExtensionImagesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &VirtualMachineExtensionImagesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// Get - Gets a virtual machine extension image.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The name of a supported Azure region.
+// - options - VirtualMachineExtensionImagesClientGetOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.Get
+// method.
+func (client *VirtualMachineExtensionImagesClient) Get(ctx context.Context, location string, publisherName string, typeParam string, version string, options *VirtualMachineExtensionImagesClientGetOptions) (VirtualMachineExtensionImagesClientGetResponse, error) {
+ var err error
+ const operationName = "VirtualMachineExtensionImagesClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, location, publisherName, typeParam, version, options)
+ if err != nil {
+ return VirtualMachineExtensionImagesClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineExtensionImagesClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineExtensionImagesClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *VirtualMachineExtensionImagesClient) getCreateRequest(ctx context.Context, location string, publisherName string, typeParam string, version string, options *VirtualMachineExtensionImagesClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if publisherName == "" {
+ return nil, errors.New("parameter publisherName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publisherName}", url.PathEscape(publisherName))
+ if typeParam == "" {
+ return nil, errors.New("parameter typeParam cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{type}", url.PathEscape(typeParam))
+ if version == "" {
+ return nil, errors.New("parameter version cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *VirtualMachineExtensionImagesClient) getHandleResponse(resp *http.Response) (VirtualMachineExtensionImagesClientGetResponse, error) {
+ result := VirtualMachineExtensionImagesClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineExtensionImage); err != nil {
+ return VirtualMachineExtensionImagesClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// ListTypes - Gets a list of virtual machine extension image types.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The name of a supported Azure region.
+// - options - VirtualMachineExtensionImagesClientListTypesOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.ListTypes
+// method.
+func (client *VirtualMachineExtensionImagesClient) ListTypes(ctx context.Context, location string, publisherName string, options *VirtualMachineExtensionImagesClientListTypesOptions) (VirtualMachineExtensionImagesClientListTypesResponse, error) {
+ var err error
+ const operationName = "VirtualMachineExtensionImagesClient.ListTypes"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.listTypesCreateRequest(ctx, location, publisherName, options)
+ if err != nil {
+ return VirtualMachineExtensionImagesClientListTypesResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineExtensionImagesClientListTypesResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineExtensionImagesClientListTypesResponse{}, err
+ }
+ resp, err := client.listTypesHandleResponse(httpResp)
+ return resp, err
+}
+
+// listTypesCreateRequest creates the ListTypes request.
+func (client *VirtualMachineExtensionImagesClient) listTypesCreateRequest(ctx context.Context, location string, publisherName string, options *VirtualMachineExtensionImagesClientListTypesOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if publisherName == "" {
+ return nil, errors.New("parameter publisherName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publisherName}", url.PathEscape(publisherName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listTypesHandleResponse handles the ListTypes response.
+func (client *VirtualMachineExtensionImagesClient) listTypesHandleResponse(resp *http.Response) (VirtualMachineExtensionImagesClientListTypesResponse, error) {
+ result := VirtualMachineExtensionImagesClientListTypesResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineExtensionImageArray); err != nil {
+ return VirtualMachineExtensionImagesClientListTypesResponse{}, err
+ }
+ return result, nil
+}
+
+// ListVersions - Gets a list of virtual machine extension image versions.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The name of a supported Azure region.
+// - options - VirtualMachineExtensionImagesClientListVersionsOptions contains the optional parameters for the VirtualMachineExtensionImagesClient.ListVersions
+// method.
+func (client *VirtualMachineExtensionImagesClient) ListVersions(ctx context.Context, location string, publisherName string, typeParam string, options *VirtualMachineExtensionImagesClientListVersionsOptions) (VirtualMachineExtensionImagesClientListVersionsResponse, error) {
+ var err error
+ const operationName = "VirtualMachineExtensionImagesClient.ListVersions"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.listVersionsCreateRequest(ctx, location, publisherName, typeParam, options)
+ if err != nil {
+ return VirtualMachineExtensionImagesClientListVersionsResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineExtensionImagesClientListVersionsResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineExtensionImagesClientListVersionsResponse{}, err
+ }
+ resp, err := client.listVersionsHandleResponse(httpResp)
+ return resp, err
+}
+
+// listVersionsCreateRequest creates the ListVersions request.
+func (client *VirtualMachineExtensionImagesClient) listVersionsCreateRequest(ctx context.Context, location string, publisherName string, typeParam string, options *VirtualMachineExtensionImagesClientListVersionsOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if publisherName == "" {
+ return nil, errors.New("parameter publisherName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publisherName}", url.PathEscape(publisherName))
+ if typeParam == "" {
+ return nil, errors.New("parameter typeParam cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{type}", url.PathEscape(typeParam))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Filter != nil {
+ reqQP.Set("$filter", *options.Filter)
+ }
+ if options != nil && options.Orderby != nil {
+ reqQP.Set("$orderby", *options.Orderby)
+ }
+ if options != nil && options.Top != nil {
+ reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10))
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listVersionsHandleResponse handles the ListVersions response.
+func (client *VirtualMachineExtensionImagesClient) listVersionsHandleResponse(resp *http.Response) (VirtualMachineExtensionImagesClientListVersionsResponse, error) {
+ result := VirtualMachineExtensionImagesClientListVersionsResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineExtensionImageArray); err != nil {
+ return VirtualMachineExtensionImagesClientListVersionsResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineextensions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineextensions_client.go
new file mode 100644
index 000000000..bd62e8137
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineextensions_client.go
@@ -0,0 +1,437 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// VirtualMachineExtensionsClient contains the methods for the VirtualMachineExtensions group.
+// Don't use this type directly, use NewVirtualMachineExtensionsClient() instead.
+type VirtualMachineExtensionsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewVirtualMachineExtensionsClient creates a new instance of VirtualMachineExtensionsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewVirtualMachineExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineExtensionsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &VirtualMachineExtensionsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - The operation to create or update the extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine where the extension should be created or updated.
+// - vmExtensionName - The name of the virtual machine extension.
+// - extensionParameters - Parameters supplied to the Create Virtual Machine Extension operation.
+// - options - VirtualMachineExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineExtensionsClient.BeginCreateOrUpdate
+// method.
+func (client *VirtualMachineExtensionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, extensionParameters VirtualMachineExtension, options *VirtualMachineExtensionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualMachineExtensionsClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, vmName, vmExtensionName, extensionParameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineExtensionsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineExtensionsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - The operation to create or update the extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineExtensionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, extensionParameters VirtualMachineExtension, options *VirtualMachineExtensionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineExtensionsClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vmName, vmExtensionName, extensionParameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *VirtualMachineExtensionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, extensionParameters VirtualMachineExtension, options *VirtualMachineExtensionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if vmExtensionName == "" {
+ return nil, errors.New("parameter vmExtensionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmExtensionName}", url.PathEscape(vmExtensionName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - The operation to delete the extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine where the extension should be deleted.
+// - vmExtensionName - The name of the virtual machine extension.
+// - options - VirtualMachineExtensionsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineExtensionsClient.BeginDelete
+// method.
+func (client *VirtualMachineExtensionsClient) BeginDelete(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, options *VirtualMachineExtensionsClientBeginDeleteOptions) (*runtime.Poller[VirtualMachineExtensionsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, vmName, vmExtensionName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineExtensionsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineExtensionsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - The operation to delete the extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineExtensionsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, options *VirtualMachineExtensionsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineExtensionsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, vmName, vmExtensionName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *VirtualMachineExtensionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, options *VirtualMachineExtensionsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if vmExtensionName == "" {
+ return nil, errors.New("parameter vmExtensionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmExtensionName}", url.PathEscape(vmExtensionName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - The operation to get the extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine containing the extension.
+// - vmExtensionName - The name of the virtual machine extension.
+// - options - VirtualMachineExtensionsClientGetOptions contains the optional parameters for the VirtualMachineExtensionsClient.Get
+// method.
+func (client *VirtualMachineExtensionsClient) Get(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, options *VirtualMachineExtensionsClientGetOptions) (VirtualMachineExtensionsClientGetResponse, error) {
+ var err error
+ const operationName = "VirtualMachineExtensionsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, vmName, vmExtensionName, options)
+ if err != nil {
+ return VirtualMachineExtensionsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineExtensionsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineExtensionsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *VirtualMachineExtensionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, options *VirtualMachineExtensionsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if vmExtensionName == "" {
+ return nil, errors.New("parameter vmExtensionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmExtensionName}", url.PathEscape(vmExtensionName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", *options.Expand)
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *VirtualMachineExtensionsClient) getHandleResponse(resp *http.Response) (VirtualMachineExtensionsClientGetResponse, error) {
+ result := VirtualMachineExtensionsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineExtension); err != nil {
+ return VirtualMachineExtensionsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// List - The operation to get all extensions of a Virtual Machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine containing the extension.
+// - options - VirtualMachineExtensionsClientListOptions contains the optional parameters for the VirtualMachineExtensionsClient.List
+// method.
+func (client *VirtualMachineExtensionsClient) List(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachineExtensionsClientListOptions) (VirtualMachineExtensionsClientListResponse, error) {
+ var err error
+ const operationName = "VirtualMachineExtensionsClient.List"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.listCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return VirtualMachineExtensionsClientListResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineExtensionsClientListResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineExtensionsClientListResponse{}, err
+ }
+ resp, err := client.listHandleResponse(httpResp)
+ return resp, err
+}
+
+// listCreateRequest creates the List request.
+func (client *VirtualMachineExtensionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachineExtensionsClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", *options.Expand)
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *VirtualMachineExtensionsClient) listHandleResponse(resp *http.Response) (VirtualMachineExtensionsClientListResponse, error) {
+ result := VirtualMachineExtensionsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineExtensionsListResult); err != nil {
+ return VirtualMachineExtensionsClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginUpdate - The operation to update the extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine where the extension should be updated.
+// - vmExtensionName - The name of the virtual machine extension.
+// - extensionParameters - Parameters supplied to the Update Virtual Machine Extension operation.
+// - options - VirtualMachineExtensionsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineExtensionsClient.BeginUpdate
+// method.
+func (client *VirtualMachineExtensionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, extensionParameters VirtualMachineExtensionUpdate, options *VirtualMachineExtensionsClientBeginUpdateOptions) (*runtime.Poller[VirtualMachineExtensionsClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, vmName, vmExtensionName, extensionParameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineExtensionsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineExtensionsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - The operation to update the extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineExtensionsClient) update(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, extensionParameters VirtualMachineExtensionUpdate, options *VirtualMachineExtensionsClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineExtensionsClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, vmName, vmExtensionName, extensionParameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *VirtualMachineExtensionsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, vmName string, vmExtensionName string, extensionParameters VirtualMachineExtensionUpdate, options *VirtualMachineExtensionsClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if vmExtensionName == "" {
+ return nil, errors.New("parameter vmExtensionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmExtensionName}", url.PathEscape(vmExtensionName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineimages_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineimages_client.go
new file mode 100644
index 000000000..d2557d0d4
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineimages_client.go
@@ -0,0 +1,470 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strconv"
+ "strings"
+)
+
+// VirtualMachineImagesClient contains the methods for the VirtualMachineImages group.
+// Don't use this type directly, use NewVirtualMachineImagesClient() instead.
+type VirtualMachineImagesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewVirtualMachineImagesClient creates a new instance of VirtualMachineImagesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewVirtualMachineImagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineImagesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &VirtualMachineImagesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// Get - Gets a virtual machine image.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The name of a supported Azure region.
+// - publisherName - A valid image publisher.
+// - offer - A valid image publisher offer.
+// - skus - A valid image SKU.
+// - version - A valid image SKU version.
+// - options - VirtualMachineImagesClientGetOptions contains the optional parameters for the VirtualMachineImagesClient.Get
+// method.
+func (client *VirtualMachineImagesClient) Get(ctx context.Context, location string, publisherName string, offer string, skus string, version string, options *VirtualMachineImagesClientGetOptions) (VirtualMachineImagesClientGetResponse, error) {
+ var err error
+ const operationName = "VirtualMachineImagesClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, location, publisherName, offer, skus, version, options)
+ if err != nil {
+ return VirtualMachineImagesClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineImagesClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineImagesClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *VirtualMachineImagesClient) getCreateRequest(ctx context.Context, location string, publisherName string, offer string, skus string, version string, options *VirtualMachineImagesClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if publisherName == "" {
+ return nil, errors.New("parameter publisherName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publisherName}", url.PathEscape(publisherName))
+ if offer == "" {
+ return nil, errors.New("parameter offer cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{offer}", url.PathEscape(offer))
+ if skus == "" {
+ return nil, errors.New("parameter skus cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{skus}", url.PathEscape(skus))
+ if version == "" {
+ return nil, errors.New("parameter version cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *VirtualMachineImagesClient) getHandleResponse(resp *http.Response) (VirtualMachineImagesClientGetResponse, error) {
+ result := VirtualMachineImagesClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineImage); err != nil {
+ return VirtualMachineImagesClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// List - Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The name of a supported Azure region.
+// - publisherName - A valid image publisher.
+// - offer - A valid image publisher offer.
+// - skus - A valid image SKU.
+// - options - VirtualMachineImagesClientListOptions contains the optional parameters for the VirtualMachineImagesClient.List
+// method.
+func (client *VirtualMachineImagesClient) List(ctx context.Context, location string, publisherName string, offer string, skus string, options *VirtualMachineImagesClientListOptions) (VirtualMachineImagesClientListResponse, error) {
+ var err error
+ const operationName = "VirtualMachineImagesClient.List"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.listCreateRequest(ctx, location, publisherName, offer, skus, options)
+ if err != nil {
+ return VirtualMachineImagesClientListResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineImagesClientListResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineImagesClientListResponse{}, err
+ }
+ resp, err := client.listHandleResponse(httpResp)
+ return resp, err
+}
+
+// listCreateRequest creates the List request.
+func (client *VirtualMachineImagesClient) listCreateRequest(ctx context.Context, location string, publisherName string, offer string, skus string, options *VirtualMachineImagesClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if publisherName == "" {
+ return nil, errors.New("parameter publisherName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publisherName}", url.PathEscape(publisherName))
+ if offer == "" {
+ return nil, errors.New("parameter offer cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{offer}", url.PathEscape(offer))
+ if skus == "" {
+ return nil, errors.New("parameter skus cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{skus}", url.PathEscape(skus))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", *options.Expand)
+ }
+ if options != nil && options.Orderby != nil {
+ reqQP.Set("$orderby", *options.Orderby)
+ }
+ if options != nil && options.Top != nil {
+ reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10))
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *VirtualMachineImagesClient) listHandleResponse(resp *http.Response) (VirtualMachineImagesClientListResponse, error) {
+ result := VirtualMachineImagesClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineImageResourceArray); err != nil {
+ return VirtualMachineImagesClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// ListByEdgeZone - Gets a list of all virtual machine image versions for the specified edge zone
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The name of a supported Azure region.
+// - edgeZone - The name of the edge zone.
+// - options - VirtualMachineImagesClientListByEdgeZoneOptions contains the optional parameters for the VirtualMachineImagesClient.ListByEdgeZone
+// method.
+func (client *VirtualMachineImagesClient) ListByEdgeZone(ctx context.Context, location string, edgeZone string, options *VirtualMachineImagesClientListByEdgeZoneOptions) (VirtualMachineImagesClientListByEdgeZoneResponse, error) {
+ var err error
+ const operationName = "VirtualMachineImagesClient.ListByEdgeZone"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.listByEdgeZoneCreateRequest(ctx, location, edgeZone, options)
+ if err != nil {
+ return VirtualMachineImagesClientListByEdgeZoneResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineImagesClientListByEdgeZoneResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineImagesClientListByEdgeZoneResponse{}, err
+ }
+ resp, err := client.listByEdgeZoneHandleResponse(httpResp)
+ return resp, err
+}
+
+// listByEdgeZoneCreateRequest creates the ListByEdgeZone request.
+func (client *VirtualMachineImagesClient) listByEdgeZoneCreateRequest(ctx context.Context, location string, edgeZone string, options *VirtualMachineImagesClientListByEdgeZoneOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/vmimages"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if edgeZone == "" {
+ return nil, errors.New("parameter edgeZone cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{edgeZone}", url.PathEscape(edgeZone))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByEdgeZoneHandleResponse handles the ListByEdgeZone response.
+func (client *VirtualMachineImagesClient) listByEdgeZoneHandleResponse(resp *http.Response) (VirtualMachineImagesClientListByEdgeZoneResponse, error) {
+ result := VirtualMachineImagesClientListByEdgeZoneResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VMImagesInEdgeZoneListResult); err != nil {
+ return VirtualMachineImagesClientListByEdgeZoneResponse{}, err
+ }
+ return result, nil
+}
+
+// ListOffers - Gets a list of virtual machine image offers for the specified location and publisher.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The name of a supported Azure region.
+// - publisherName - A valid image publisher.
+// - options - VirtualMachineImagesClientListOffersOptions contains the optional parameters for the VirtualMachineImagesClient.ListOffers
+// method.
+func (client *VirtualMachineImagesClient) ListOffers(ctx context.Context, location string, publisherName string, options *VirtualMachineImagesClientListOffersOptions) (VirtualMachineImagesClientListOffersResponse, error) {
+ var err error
+ const operationName = "VirtualMachineImagesClient.ListOffers"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.listOffersCreateRequest(ctx, location, publisherName, options)
+ if err != nil {
+ return VirtualMachineImagesClientListOffersResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineImagesClientListOffersResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineImagesClientListOffersResponse{}, err
+ }
+ resp, err := client.listOffersHandleResponse(httpResp)
+ return resp, err
+}
+
+// listOffersCreateRequest creates the ListOffers request.
+func (client *VirtualMachineImagesClient) listOffersCreateRequest(ctx context.Context, location string, publisherName string, options *VirtualMachineImagesClientListOffersOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if publisherName == "" {
+ return nil, errors.New("parameter publisherName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publisherName}", url.PathEscape(publisherName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listOffersHandleResponse handles the ListOffers response.
+func (client *VirtualMachineImagesClient) listOffersHandleResponse(resp *http.Response) (VirtualMachineImagesClientListOffersResponse, error) {
+ result := VirtualMachineImagesClientListOffersResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineImageResourceArray); err != nil {
+ return VirtualMachineImagesClientListOffersResponse{}, err
+ }
+ return result, nil
+}
+
+// ListPublishers - Gets a list of virtual machine image publishers for the specified Azure location.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The name of a supported Azure region.
+// - options - VirtualMachineImagesClientListPublishersOptions contains the optional parameters for the VirtualMachineImagesClient.ListPublishers
+// method.
+func (client *VirtualMachineImagesClient) ListPublishers(ctx context.Context, location string, options *VirtualMachineImagesClientListPublishersOptions) (VirtualMachineImagesClientListPublishersResponse, error) {
+ var err error
+ const operationName = "VirtualMachineImagesClient.ListPublishers"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.listPublishersCreateRequest(ctx, location, options)
+ if err != nil {
+ return VirtualMachineImagesClientListPublishersResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineImagesClientListPublishersResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineImagesClientListPublishersResponse{}, err
+ }
+ resp, err := client.listPublishersHandleResponse(httpResp)
+ return resp, err
+}
+
+// listPublishersCreateRequest creates the ListPublishers request.
+func (client *VirtualMachineImagesClient) listPublishersCreateRequest(ctx context.Context, location string, options *VirtualMachineImagesClientListPublishersOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listPublishersHandleResponse handles the ListPublishers response.
+func (client *VirtualMachineImagesClient) listPublishersHandleResponse(resp *http.Response) (VirtualMachineImagesClientListPublishersResponse, error) {
+ result := VirtualMachineImagesClientListPublishersResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineImageResourceArray); err != nil {
+ return VirtualMachineImagesClientListPublishersResponse{}, err
+ }
+ return result, nil
+}
+
+// ListSKUs - Gets a list of virtual machine image SKUs for the specified location, publisher, and offer.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The name of a supported Azure region.
+// - publisherName - A valid image publisher.
+// - offer - A valid image publisher offer.
+// - options - VirtualMachineImagesClientListSKUsOptions contains the optional parameters for the VirtualMachineImagesClient.ListSKUs
+// method.
+func (client *VirtualMachineImagesClient) ListSKUs(ctx context.Context, location string, publisherName string, offer string, options *VirtualMachineImagesClientListSKUsOptions) (VirtualMachineImagesClientListSKUsResponse, error) {
+ var err error
+ const operationName = "VirtualMachineImagesClient.ListSKUs"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.listSKUsCreateRequest(ctx, location, publisherName, offer, options)
+ if err != nil {
+ return VirtualMachineImagesClientListSKUsResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineImagesClientListSKUsResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineImagesClientListSKUsResponse{}, err
+ }
+ resp, err := client.listSKUsHandleResponse(httpResp)
+ return resp, err
+}
+
+// listSKUsCreateRequest creates the ListSKUs request.
+func (client *VirtualMachineImagesClient) listSKUsCreateRequest(ctx context.Context, location string, publisherName string, offer string, options *VirtualMachineImagesClientListSKUsOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if publisherName == "" {
+ return nil, errors.New("parameter publisherName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publisherName}", url.PathEscape(publisherName))
+ if offer == "" {
+ return nil, errors.New("parameter offer cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{offer}", url.PathEscape(offer))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listSKUsHandleResponse handles the ListSKUs response.
+func (client *VirtualMachineImagesClient) listSKUsHandleResponse(resp *http.Response) (VirtualMachineImagesClientListSKUsResponse, error) {
+ result := VirtualMachineImagesClientListSKUsResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineImageResourceArray); err != nil {
+ return VirtualMachineImagesClientListSKUsResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineimagesedgezone_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineimagesedgezone_client.go
new file mode 100644
index 000000000..8558798f5
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineimagesedgezone_client.go
@@ -0,0 +1,430 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strconv"
+ "strings"
+)
+
+// VirtualMachineImagesEdgeZoneClient contains the methods for the VirtualMachineImagesEdgeZone group.
+// Don't use this type directly, use NewVirtualMachineImagesEdgeZoneClient() instead.
+type VirtualMachineImagesEdgeZoneClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewVirtualMachineImagesEdgeZoneClient creates a new instance of VirtualMachineImagesEdgeZoneClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewVirtualMachineImagesEdgeZoneClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineImagesEdgeZoneClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &VirtualMachineImagesEdgeZoneClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// Get - Gets a virtual machine image in an edge zone.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The name of a supported Azure region.
+// - edgeZone - The name of the edge zone.
+// - publisherName - A valid image publisher.
+// - offer - A valid image publisher offer.
+// - skus - A valid image SKU.
+// - version - A valid image SKU version.
+// - options - VirtualMachineImagesEdgeZoneClientGetOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.Get
+// method.
+func (client *VirtualMachineImagesEdgeZoneClient) Get(ctx context.Context, location string, edgeZone string, publisherName string, offer string, skus string, version string, options *VirtualMachineImagesEdgeZoneClientGetOptions) (VirtualMachineImagesEdgeZoneClientGetResponse, error) {
+ var err error
+ const operationName = "VirtualMachineImagesEdgeZoneClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, location, edgeZone, publisherName, offer, skus, version, options)
+ if err != nil {
+ return VirtualMachineImagesEdgeZoneClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineImagesEdgeZoneClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineImagesEdgeZoneClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *VirtualMachineImagesEdgeZoneClient) getCreateRequest(ctx context.Context, location string, edgeZone string, publisherName string, offer string, skus string, version string, options *VirtualMachineImagesEdgeZoneClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if edgeZone == "" {
+ return nil, errors.New("parameter edgeZone cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{edgeZone}", url.PathEscape(edgeZone))
+ if publisherName == "" {
+ return nil, errors.New("parameter publisherName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publisherName}", url.PathEscape(publisherName))
+ if offer == "" {
+ return nil, errors.New("parameter offer cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{offer}", url.PathEscape(offer))
+ if skus == "" {
+ return nil, errors.New("parameter skus cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{skus}", url.PathEscape(skus))
+ if version == "" {
+ return nil, errors.New("parameter version cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *VirtualMachineImagesEdgeZoneClient) getHandleResponse(resp *http.Response) (VirtualMachineImagesEdgeZoneClientGetResponse, error) {
+ result := VirtualMachineImagesEdgeZoneClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineImage); err != nil {
+ return VirtualMachineImagesEdgeZoneClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// List - Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and SKU.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The name of a supported Azure region.
+// - edgeZone - The name of the edge zone.
+// - publisherName - A valid image publisher.
+// - offer - A valid image publisher offer.
+// - skus - A valid image SKU.
+// - options - VirtualMachineImagesEdgeZoneClientListOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.List
+// method.
+func (client *VirtualMachineImagesEdgeZoneClient) List(ctx context.Context, location string, edgeZone string, publisherName string, offer string, skus string, options *VirtualMachineImagesEdgeZoneClientListOptions) (VirtualMachineImagesEdgeZoneClientListResponse, error) {
+ var err error
+ const operationName = "VirtualMachineImagesEdgeZoneClient.List"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.listCreateRequest(ctx, location, edgeZone, publisherName, offer, skus, options)
+ if err != nil {
+ return VirtualMachineImagesEdgeZoneClientListResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineImagesEdgeZoneClientListResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineImagesEdgeZoneClientListResponse{}, err
+ }
+ resp, err := client.listHandleResponse(httpResp)
+ return resp, err
+}
+
+// listCreateRequest creates the List request.
+func (client *VirtualMachineImagesEdgeZoneClient) listCreateRequest(ctx context.Context, location string, edgeZone string, publisherName string, offer string, skus string, options *VirtualMachineImagesEdgeZoneClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if edgeZone == "" {
+ return nil, errors.New("parameter edgeZone cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{edgeZone}", url.PathEscape(edgeZone))
+ if publisherName == "" {
+ return nil, errors.New("parameter publisherName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publisherName}", url.PathEscape(publisherName))
+ if offer == "" {
+ return nil, errors.New("parameter offer cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{offer}", url.PathEscape(offer))
+ if skus == "" {
+ return nil, errors.New("parameter skus cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{skus}", url.PathEscape(skus))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", *options.Expand)
+ }
+ if options != nil && options.Orderby != nil {
+ reqQP.Set("$orderby", *options.Orderby)
+ }
+ if options != nil && options.Top != nil {
+ reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10))
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *VirtualMachineImagesEdgeZoneClient) listHandleResponse(resp *http.Response) (VirtualMachineImagesEdgeZoneClientListResponse, error) {
+ result := VirtualMachineImagesEdgeZoneClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineImageResourceArray); err != nil {
+ return VirtualMachineImagesEdgeZoneClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// ListOffers - Gets a list of virtual machine image offers for the specified location, edge zone and publisher.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The name of a supported Azure region.
+// - edgeZone - The name of the edge zone.
+// - publisherName - A valid image publisher.
+// - options - VirtualMachineImagesEdgeZoneClientListOffersOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.ListOffers
+// method.
+func (client *VirtualMachineImagesEdgeZoneClient) ListOffers(ctx context.Context, location string, edgeZone string, publisherName string, options *VirtualMachineImagesEdgeZoneClientListOffersOptions) (VirtualMachineImagesEdgeZoneClientListOffersResponse, error) {
+ var err error
+ const operationName = "VirtualMachineImagesEdgeZoneClient.ListOffers"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.listOffersCreateRequest(ctx, location, edgeZone, publisherName, options)
+ if err != nil {
+ return VirtualMachineImagesEdgeZoneClientListOffersResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineImagesEdgeZoneClientListOffersResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineImagesEdgeZoneClientListOffersResponse{}, err
+ }
+ resp, err := client.listOffersHandleResponse(httpResp)
+ return resp, err
+}
+
+// listOffersCreateRequest creates the ListOffers request.
+func (client *VirtualMachineImagesEdgeZoneClient) listOffersCreateRequest(ctx context.Context, location string, edgeZone string, publisherName string, options *VirtualMachineImagesEdgeZoneClientListOffersOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if edgeZone == "" {
+ return nil, errors.New("parameter edgeZone cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{edgeZone}", url.PathEscape(edgeZone))
+ if publisherName == "" {
+ return nil, errors.New("parameter publisherName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publisherName}", url.PathEscape(publisherName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listOffersHandleResponse handles the ListOffers response.
+func (client *VirtualMachineImagesEdgeZoneClient) listOffersHandleResponse(resp *http.Response) (VirtualMachineImagesEdgeZoneClientListOffersResponse, error) {
+ result := VirtualMachineImagesEdgeZoneClientListOffersResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineImageResourceArray); err != nil {
+ return VirtualMachineImagesEdgeZoneClientListOffersResponse{}, err
+ }
+ return result, nil
+}
+
+// ListPublishers - Gets a list of virtual machine image publishers for the specified Azure location and edge zone.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The name of a supported Azure region.
+// - edgeZone - The name of the edge zone.
+// - options - VirtualMachineImagesEdgeZoneClientListPublishersOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.ListPublishers
+// method.
+func (client *VirtualMachineImagesEdgeZoneClient) ListPublishers(ctx context.Context, location string, edgeZone string, options *VirtualMachineImagesEdgeZoneClientListPublishersOptions) (VirtualMachineImagesEdgeZoneClientListPublishersResponse, error) {
+ var err error
+ const operationName = "VirtualMachineImagesEdgeZoneClient.ListPublishers"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.listPublishersCreateRequest(ctx, location, edgeZone, options)
+ if err != nil {
+ return VirtualMachineImagesEdgeZoneClientListPublishersResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineImagesEdgeZoneClientListPublishersResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineImagesEdgeZoneClientListPublishersResponse{}, err
+ }
+ resp, err := client.listPublishersHandleResponse(httpResp)
+ return resp, err
+}
+
+// listPublishersCreateRequest creates the ListPublishers request.
+func (client *VirtualMachineImagesEdgeZoneClient) listPublishersCreateRequest(ctx context.Context, location string, edgeZone string, options *VirtualMachineImagesEdgeZoneClientListPublishersOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if edgeZone == "" {
+ return nil, errors.New("parameter edgeZone cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{edgeZone}", url.PathEscape(edgeZone))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listPublishersHandleResponse handles the ListPublishers response.
+func (client *VirtualMachineImagesEdgeZoneClient) listPublishersHandleResponse(resp *http.Response) (VirtualMachineImagesEdgeZoneClientListPublishersResponse, error) {
+ result := VirtualMachineImagesEdgeZoneClientListPublishersResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineImageResourceArray); err != nil {
+ return VirtualMachineImagesEdgeZoneClientListPublishersResponse{}, err
+ }
+ return result, nil
+}
+
+// ListSKUs - Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The name of a supported Azure region.
+// - edgeZone - The name of the edge zone.
+// - publisherName - A valid image publisher.
+// - offer - A valid image publisher offer.
+// - options - VirtualMachineImagesEdgeZoneClientListSKUsOptions contains the optional parameters for the VirtualMachineImagesEdgeZoneClient.ListSKUs
+// method.
+func (client *VirtualMachineImagesEdgeZoneClient) ListSKUs(ctx context.Context, location string, edgeZone string, publisherName string, offer string, options *VirtualMachineImagesEdgeZoneClientListSKUsOptions) (VirtualMachineImagesEdgeZoneClientListSKUsResponse, error) {
+ var err error
+ const operationName = "VirtualMachineImagesEdgeZoneClient.ListSKUs"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.listSKUsCreateRequest(ctx, location, edgeZone, publisherName, offer, options)
+ if err != nil {
+ return VirtualMachineImagesEdgeZoneClientListSKUsResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineImagesEdgeZoneClientListSKUsResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineImagesEdgeZoneClientListSKUsResponse{}, err
+ }
+ resp, err := client.listSKUsHandleResponse(httpResp)
+ return resp, err
+}
+
+// listSKUsCreateRequest creates the ListSKUs request.
+func (client *VirtualMachineImagesEdgeZoneClient) listSKUsCreateRequest(ctx context.Context, location string, edgeZone string, publisherName string, offer string, options *VirtualMachineImagesEdgeZoneClientListSKUsOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if edgeZone == "" {
+ return nil, errors.New("parameter edgeZone cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{edgeZone}", url.PathEscape(edgeZone))
+ if publisherName == "" {
+ return nil, errors.New("parameter publisherName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{publisherName}", url.PathEscape(publisherName))
+ if offer == "" {
+ return nil, errors.New("parameter offer cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{offer}", url.PathEscape(offer))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listSKUsHandleResponse handles the ListSKUs response.
+func (client *VirtualMachineImagesEdgeZoneClient) listSKUsHandleResponse(resp *http.Response) (VirtualMachineImagesEdgeZoneClientListSKUsResponse, error) {
+ result := VirtualMachineImagesEdgeZoneClientListSKUsResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineImageResourceArray); err != nil {
+ return VirtualMachineImagesEdgeZoneClientListSKUsResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineruncommands_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineruncommands_client.go
new file mode 100644
index 000000000..c5ef4894c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachineruncommands_client.go
@@ -0,0 +1,562 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// VirtualMachineRunCommandsClient contains the methods for the VirtualMachineRunCommands group.
+// Don't use this type directly, use NewVirtualMachineRunCommandsClient() instead.
+type VirtualMachineRunCommandsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewVirtualMachineRunCommandsClient creates a new instance of VirtualMachineRunCommandsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewVirtualMachineRunCommandsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineRunCommandsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &VirtualMachineRunCommandsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - The operation to create or update the run command.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine where the run command should be created or updated.
+// - runCommandName - The name of the virtual machine run command.
+// - runCommand - Parameters supplied to the Create Virtual Machine RunCommand operation.
+// - options - VirtualMachineRunCommandsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineRunCommandsClient.BeginCreateOrUpdate
+// method.
+func (client *VirtualMachineRunCommandsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, runCommand VirtualMachineRunCommand, options *VirtualMachineRunCommandsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualMachineRunCommandsClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, vmName, runCommandName, runCommand, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineRunCommandsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineRunCommandsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - The operation to create or update the run command.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineRunCommandsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, runCommand VirtualMachineRunCommand, options *VirtualMachineRunCommandsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineRunCommandsClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vmName, runCommandName, runCommand, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *VirtualMachineRunCommandsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, runCommand VirtualMachineRunCommand, options *VirtualMachineRunCommandsClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if runCommandName == "" {
+ return nil, errors.New("parameter runCommandName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{runCommandName}", url.PathEscape(runCommandName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json, text/json"}
+ if err := runtime.MarshalAsJSON(req, runCommand); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - The operation to delete the run command.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine where the run command should be deleted.
+// - runCommandName - The name of the virtual machine run command.
+// - options - VirtualMachineRunCommandsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineRunCommandsClient.BeginDelete
+// method.
+func (client *VirtualMachineRunCommandsClient) BeginDelete(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, options *VirtualMachineRunCommandsClientBeginDeleteOptions) (*runtime.Poller[VirtualMachineRunCommandsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, vmName, runCommandName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineRunCommandsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineRunCommandsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - The operation to delete the run command.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineRunCommandsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, options *VirtualMachineRunCommandsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineRunCommandsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, vmName, runCommandName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *VirtualMachineRunCommandsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, options *VirtualMachineRunCommandsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if runCommandName == "" {
+ return nil, errors.New("parameter runCommandName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{runCommandName}", url.PathEscape(runCommandName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json, text/json"}
+ return req, nil
+}
+
+// Get - Gets specific run command for a subscription in a location.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - location - The location upon which run commands is queried.
+// - commandID - The command id.
+// - options - VirtualMachineRunCommandsClientGetOptions contains the optional parameters for the VirtualMachineRunCommandsClient.Get
+// method.
+func (client *VirtualMachineRunCommandsClient) Get(ctx context.Context, location string, commandID string, options *VirtualMachineRunCommandsClientGetOptions) (VirtualMachineRunCommandsClientGetResponse, error) {
+ var err error
+ const operationName = "VirtualMachineRunCommandsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, location, commandID, options)
+ if err != nil {
+ return VirtualMachineRunCommandsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineRunCommandsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineRunCommandsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *VirtualMachineRunCommandsClient) getCreateRequest(ctx context.Context, location string, commandID string, options *VirtualMachineRunCommandsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if commandID == "" {
+ return nil, errors.New("parameter commandID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{commandId}", url.PathEscape(commandID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json, text/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *VirtualMachineRunCommandsClient) getHandleResponse(resp *http.Response) (VirtualMachineRunCommandsClientGetResponse, error) {
+ result := VirtualMachineRunCommandsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RunCommandDocument); err != nil {
+ return VirtualMachineRunCommandsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// GetByVirtualMachine - The operation to get the run command.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine containing the run command.
+// - runCommandName - The name of the virtual machine run command.
+// - options - VirtualMachineRunCommandsClientGetByVirtualMachineOptions contains the optional parameters for the VirtualMachineRunCommandsClient.GetByVirtualMachine
+// method.
+func (client *VirtualMachineRunCommandsClient) GetByVirtualMachine(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, options *VirtualMachineRunCommandsClientGetByVirtualMachineOptions) (VirtualMachineRunCommandsClientGetByVirtualMachineResponse, error) {
+ var err error
+ const operationName = "VirtualMachineRunCommandsClient.GetByVirtualMachine"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getByVirtualMachineCreateRequest(ctx, resourceGroupName, vmName, runCommandName, options)
+ if err != nil {
+ return VirtualMachineRunCommandsClientGetByVirtualMachineResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineRunCommandsClientGetByVirtualMachineResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineRunCommandsClientGetByVirtualMachineResponse{}, err
+ }
+ resp, err := client.getByVirtualMachineHandleResponse(httpResp)
+ return resp, err
+}
+
+// getByVirtualMachineCreateRequest creates the GetByVirtualMachine request.
+func (client *VirtualMachineRunCommandsClient) getByVirtualMachineCreateRequest(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, options *VirtualMachineRunCommandsClientGetByVirtualMachineOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if runCommandName == "" {
+ return nil, errors.New("parameter runCommandName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{runCommandName}", url.PathEscape(runCommandName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", *options.Expand)
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json, text/json"}
+ return req, nil
+}
+
+// getByVirtualMachineHandleResponse handles the GetByVirtualMachine response.
+func (client *VirtualMachineRunCommandsClient) getByVirtualMachineHandleResponse(resp *http.Response) (VirtualMachineRunCommandsClientGetByVirtualMachineResponse, error) {
+ result := VirtualMachineRunCommandsClientGetByVirtualMachineResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineRunCommand); err != nil {
+ return VirtualMachineRunCommandsClientGetByVirtualMachineResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - Lists all available run commands for a subscription in a location.
+//
+// Generated from API version 2024-03-01
+// - location - The location upon which run commands is queried.
+// - options - VirtualMachineRunCommandsClientListOptions contains the optional parameters for the VirtualMachineRunCommandsClient.NewListPager
+// method.
+func (client *VirtualMachineRunCommandsClient) NewListPager(location string, options *VirtualMachineRunCommandsClientListOptions) *runtime.Pager[VirtualMachineRunCommandsClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachineRunCommandsClientListResponse]{
+ More: func(page VirtualMachineRunCommandsClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachineRunCommandsClientListResponse) (VirtualMachineRunCommandsClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachineRunCommandsClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, location, options)
+ }, nil)
+ if err != nil {
+ return VirtualMachineRunCommandsClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *VirtualMachineRunCommandsClient) listCreateRequest(ctx context.Context, location string, options *VirtualMachineRunCommandsClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json, text/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *VirtualMachineRunCommandsClient) listHandleResponse(resp *http.Response) (VirtualMachineRunCommandsClientListResponse, error) {
+ result := VirtualMachineRunCommandsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RunCommandListResult); err != nil {
+ return VirtualMachineRunCommandsClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByVirtualMachinePager - The operation to get all run commands of a Virtual Machine.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine containing the run command.
+// - options - VirtualMachineRunCommandsClientListByVirtualMachineOptions contains the optional parameters for the VirtualMachineRunCommandsClient.NewListByVirtualMachinePager
+// method.
+func (client *VirtualMachineRunCommandsClient) NewListByVirtualMachinePager(resourceGroupName string, vmName string, options *VirtualMachineRunCommandsClientListByVirtualMachineOptions) *runtime.Pager[VirtualMachineRunCommandsClientListByVirtualMachineResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachineRunCommandsClientListByVirtualMachineResponse]{
+ More: func(page VirtualMachineRunCommandsClientListByVirtualMachineResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachineRunCommandsClientListByVirtualMachineResponse) (VirtualMachineRunCommandsClientListByVirtualMachineResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachineRunCommandsClient.NewListByVirtualMachinePager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByVirtualMachineCreateRequest(ctx, resourceGroupName, vmName, options)
+ }, nil)
+ if err != nil {
+ return VirtualMachineRunCommandsClientListByVirtualMachineResponse{}, err
+ }
+ return client.listByVirtualMachineHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByVirtualMachineCreateRequest creates the ListByVirtualMachine request.
+func (client *VirtualMachineRunCommandsClient) listByVirtualMachineCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachineRunCommandsClientListByVirtualMachineOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", *options.Expand)
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json, text/json"}
+ return req, nil
+}
+
+// listByVirtualMachineHandleResponse handles the ListByVirtualMachine response.
+func (client *VirtualMachineRunCommandsClient) listByVirtualMachineHandleResponse(resp *http.Response) (VirtualMachineRunCommandsClientListByVirtualMachineResponse, error) {
+ result := VirtualMachineRunCommandsClientListByVirtualMachineResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineRunCommandsListResult); err != nil {
+ return VirtualMachineRunCommandsClientListByVirtualMachineResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginUpdate - The operation to update the run command.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine where the run command should be updated.
+// - runCommandName - The name of the virtual machine run command.
+// - runCommand - Parameters supplied to the Update Virtual Machine RunCommand operation.
+// - options - VirtualMachineRunCommandsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineRunCommandsClient.BeginUpdate
+// method.
+func (client *VirtualMachineRunCommandsClient) BeginUpdate(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, runCommand VirtualMachineRunCommandUpdate, options *VirtualMachineRunCommandsClientBeginUpdateOptions) (*runtime.Poller[VirtualMachineRunCommandsClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, vmName, runCommandName, runCommand, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineRunCommandsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineRunCommandsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - The operation to update the run command.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineRunCommandsClient) update(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, runCommand VirtualMachineRunCommandUpdate, options *VirtualMachineRunCommandsClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineRunCommandsClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, vmName, runCommandName, runCommand, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *VirtualMachineRunCommandsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, vmName string, runCommandName string, runCommand VirtualMachineRunCommandUpdate, options *VirtualMachineRunCommandsClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if runCommandName == "" {
+ return nil, errors.New("parameter runCommandName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{runCommandName}", url.PathEscape(runCommandName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json, text/json"}
+ if err := runtime.MarshalAsJSON(req, runCommand); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachines_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachines_client.go
new file mode 100644
index 000000000..dd55aabc3
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachines_client.go
@@ -0,0 +1,1984 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strconv"
+ "strings"
+)
+
+// VirtualMachinesClient contains the methods for the VirtualMachines group.
+// Don't use this type directly, use NewVirtualMachinesClient() instead.
+type VirtualMachinesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewVirtualMachinesClient creates a new instance of VirtualMachinesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachinesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &VirtualMachinesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginAssessPatches - Assess patches on the VM.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientBeginAssessPatchesOptions contains the optional parameters for the VirtualMachinesClient.BeginAssessPatches
+// method.
+func (client *VirtualMachinesClient) BeginAssessPatches(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginAssessPatchesOptions) (*runtime.Poller[VirtualMachinesClientAssessPatchesResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.assessPatches(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientAssessPatchesResponse]{
+ FinalStateVia: runtime.FinalStateViaLocation,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientAssessPatchesResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// AssessPatches - Assess patches on the VM.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) assessPatches(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginAssessPatchesOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginAssessPatches"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.assessPatchesCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// assessPatchesCreateRequest creates the AssessPatches request.
+func (client *VirtualMachinesClient) assessPatchesCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginAssessPatchesOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/assessPatches"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginAttachDetachDataDisks - Attach and detach data disks to/from the virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - parameters - Parameters supplied to the attach and detach data disks operation on the virtual machine.
+// - options - VirtualMachinesClientBeginAttachDetachDataDisksOptions contains the optional parameters for the VirtualMachinesClient.BeginAttachDetachDataDisks
+// method.
+func (client *VirtualMachinesClient) BeginAttachDetachDataDisks(ctx context.Context, resourceGroupName string, vmName string, parameters AttachDetachDataDisksRequest, options *VirtualMachinesClientBeginAttachDetachDataDisksOptions) (*runtime.Poller[VirtualMachinesClientAttachDetachDataDisksResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.attachDetachDataDisks(ctx, resourceGroupName, vmName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientAttachDetachDataDisksResponse]{
+ FinalStateVia: runtime.FinalStateViaLocation,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientAttachDetachDataDisksResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// AttachDetachDataDisks - Attach and detach data disks to/from the virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) attachDetachDataDisks(ctx context.Context, resourceGroupName string, vmName string, parameters AttachDetachDataDisksRequest, options *VirtualMachinesClientBeginAttachDetachDataDisksOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginAttachDetachDataDisks"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.attachDetachDataDisksCreateRequest(ctx, resourceGroupName, vmName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// attachDetachDataDisksCreateRequest creates the AttachDetachDataDisks request.
+func (client *VirtualMachinesClient) attachDetachDataDisksCreateRequest(ctx context.Context, resourceGroupName string, vmName string, parameters AttachDetachDataDisksRequest, options *VirtualMachinesClientBeginAttachDetachDataDisksOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/attachDetachDataDisks"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginCapture - Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create
+// similar VMs.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - parameters - Parameters supplied to the Capture Virtual Machine operation.
+// - options - VirtualMachinesClientBeginCaptureOptions contains the optional parameters for the VirtualMachinesClient.BeginCapture
+// method.
+func (client *VirtualMachinesClient) BeginCapture(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachineCaptureParameters, options *VirtualMachinesClientBeginCaptureOptions) (*runtime.Poller[VirtualMachinesClientCaptureResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.capture(ctx, resourceGroupName, vmName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientCaptureResponse]{
+ FinalStateVia: runtime.FinalStateViaLocation,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientCaptureResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Capture - Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar
+// VMs.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) capture(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachineCaptureParameters, options *VirtualMachinesClientBeginCaptureOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginCapture"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.captureCreateRequest(ctx, resourceGroupName, vmName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// captureCreateRequest creates the Capture request.
+func (client *VirtualMachinesClient) captureCreateRequest(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachineCaptureParameters, options *VirtualMachinesClientBeginCaptureOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginConvertToManagedDisks - Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated
+// before invoking this operation.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientBeginConvertToManagedDisksOptions contains the optional parameters for the VirtualMachinesClient.BeginConvertToManagedDisks
+// method.
+func (client *VirtualMachinesClient) BeginConvertToManagedDisks(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginConvertToManagedDisksOptions) (*runtime.Poller[VirtualMachinesClientConvertToManagedDisksResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.convertToManagedDisks(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientConvertToManagedDisksResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientConvertToManagedDisksResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// ConvertToManagedDisks - Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated
+// before invoking this operation.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) convertToManagedDisks(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginConvertToManagedDisksOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginConvertToManagedDisks"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.convertToManagedDisksCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// convertToManagedDisksCreateRequest creates the ConvertToManagedDisks request.
+func (client *VirtualMachinesClient) convertToManagedDisksCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginConvertToManagedDisksOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginCreateOrUpdate - The operation to create or update a virtual machine. Please note some properties can be set only
+// during virtual machine creation.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - parameters - Parameters supplied to the Create Virtual Machine operation.
+// - options - VirtualMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateOrUpdate
+// method.
+func (client *VirtualMachinesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachine, options *VirtualMachinesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualMachinesClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, vmName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - The operation to create or update a virtual machine. Please note some properties can be set only during
+// virtual machine creation.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachine, options *VirtualMachinesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vmName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *VirtualMachinesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachine, options *VirtualMachinesClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.IfMatch != nil {
+ req.Raw().Header["If-Match"] = []string{*options.IfMatch}
+ }
+ if options != nil && options.IfNoneMatch != nil {
+ req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
+ }
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDeallocate - Shuts down the virtual machine and releases the compute resources. You are not billed for the compute
+// resources that this virtual machine uses.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientBeginDeallocateOptions contains the optional parameters for the VirtualMachinesClient.BeginDeallocate
+// method.
+func (client *VirtualMachinesClient) BeginDeallocate(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginDeallocateOptions) (*runtime.Poller[VirtualMachinesClientDeallocateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deallocate(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientDeallocateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientDeallocateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Deallocate - Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources
+// that this virtual machine uses.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) deallocate(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginDeallocateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginDeallocate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deallocateCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deallocateCreateRequest creates the Deallocate request.
+func (client *VirtualMachinesClient) deallocateCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginDeallocateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.Hibernate != nil {
+ reqQP.Set("hibernate", strconv.FormatBool(*options.Hibernate))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginDelete - The operation to delete a virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete
+// method.
+func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginDeleteOptions) (*runtime.Poller[VirtualMachinesClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - The operation to delete a virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) deleteOperation(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *VirtualMachinesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.ForceDeletion != nil {
+ reqQP.Set("forceDeletion", strconv.FormatBool(*options.ForceDeletion))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Generalize - Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine
+// before performing this operation. For Windows, please refer to Create a managed image of a
+// generalized VM in Azure [https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource]. For Linux,
+// please refer to How to create an image of a virtual machine or VHD
+// [https://docs.microsoft.com/azure/virtual-machines/linux/capture-image].
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientGeneralizeOptions contains the optional parameters for the VirtualMachinesClient.Generalize
+// method.
+func (client *VirtualMachinesClient) Generalize(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientGeneralizeOptions) (VirtualMachinesClientGeneralizeResponse, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.Generalize"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.generalizeCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return VirtualMachinesClientGeneralizeResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachinesClientGeneralizeResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachinesClientGeneralizeResponse{}, err
+ }
+ return VirtualMachinesClientGeneralizeResponse{}, nil
+}
+
+// generalizeCreateRequest creates the Generalize request.
+func (client *VirtualMachinesClient) generalizeCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientGeneralizeOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Retrieves information about the model view or the instance view of a virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
+func (client *VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientGetOptions) (VirtualMachinesClientGetResponse, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return VirtualMachinesClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachinesClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachinesClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *VirtualMachinesClient) getCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *VirtualMachinesClient) getHandleResponse(resp *http.Response) (VirtualMachinesClientGetResponse, error) {
+ result := VirtualMachinesClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachine); err != nil {
+ return VirtualMachinesClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginInstallPatches - Installs patches on the VM.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - installPatchesInput - Input for InstallPatches as directly received by the API
+// - options - VirtualMachinesClientBeginInstallPatchesOptions contains the optional parameters for the VirtualMachinesClient.BeginInstallPatches
+// method.
+func (client *VirtualMachinesClient) BeginInstallPatches(ctx context.Context, resourceGroupName string, vmName string, installPatchesInput VirtualMachineInstallPatchesParameters, options *VirtualMachinesClientBeginInstallPatchesOptions) (*runtime.Poller[VirtualMachinesClientInstallPatchesResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.installPatches(ctx, resourceGroupName, vmName, installPatchesInput, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientInstallPatchesResponse]{
+ FinalStateVia: runtime.FinalStateViaLocation,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientInstallPatchesResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// InstallPatches - Installs patches on the VM.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) installPatches(ctx context.Context, resourceGroupName string, vmName string, installPatchesInput VirtualMachineInstallPatchesParameters, options *VirtualMachinesClientBeginInstallPatchesOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginInstallPatches"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.installPatchesCreateRequest(ctx, resourceGroupName, vmName, installPatchesInput, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// installPatchesCreateRequest creates the InstallPatches request.
+func (client *VirtualMachinesClient) installPatchesCreateRequest(ctx context.Context, resourceGroupName string, vmName string, installPatchesInput VirtualMachineInstallPatchesParameters, options *VirtualMachinesClientBeginInstallPatchesOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/installPatches"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, installPatchesInput); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// InstanceView - Retrieves information about the run-time state of a virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientInstanceViewOptions contains the optional parameters for the VirtualMachinesClient.InstanceView
+// method.
+func (client *VirtualMachinesClient) InstanceView(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientInstanceViewOptions) (VirtualMachinesClientInstanceViewResponse, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.InstanceView"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.instanceViewCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return VirtualMachinesClientInstanceViewResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachinesClientInstanceViewResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachinesClientInstanceViewResponse{}, err
+ }
+ resp, err := client.instanceViewHandleResponse(httpResp)
+ return resp, err
+}
+
+// instanceViewCreateRequest creates the InstanceView request.
+func (client *VirtualMachinesClient) instanceViewCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientInstanceViewOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// instanceViewHandleResponse handles the InstanceView response.
+func (client *VirtualMachinesClient) instanceViewHandleResponse(resp *http.Response) (VirtualMachinesClientInstanceViewResponse, error) {
+ result := VirtualMachinesClientInstanceViewResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineInstanceView); err != nil {
+ return VirtualMachinesClientInstanceViewResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response
+// to get the next page of virtual machines.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - options - VirtualMachinesClientListOptions contains the optional parameters for the VirtualMachinesClient.NewListPager
+// method.
+func (client *VirtualMachinesClient) NewListPager(resourceGroupName string, options *VirtualMachinesClientListOptions) *runtime.Pager[VirtualMachinesClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachinesClientListResponse]{
+ More: func(page VirtualMachinesClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachinesClientListResponse) (VirtualMachinesClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachinesClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return VirtualMachinesClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *VirtualMachinesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualMachinesClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ if options != nil && options.Filter != nil {
+ reqQP.Set("$filter", *options.Filter)
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *VirtualMachinesClient) listHandleResponse(resp *http.Response) (VirtualMachinesClientListResponse, error) {
+ result := VirtualMachinesClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineListResult); err != nil {
+ return VirtualMachinesClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListAllPager - Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response
+// to get the next page of virtual machines.
+//
+// Generated from API version 2024-03-01
+// - options - VirtualMachinesClientListAllOptions contains the optional parameters for the VirtualMachinesClient.NewListAllPager
+// method.
+func (client *VirtualMachinesClient) NewListAllPager(options *VirtualMachinesClientListAllOptions) *runtime.Pager[VirtualMachinesClientListAllResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachinesClientListAllResponse]{
+ More: func(page VirtualMachinesClientListAllResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachinesClientListAllResponse) (VirtualMachinesClientListAllResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachinesClient.NewListAllPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listAllCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return VirtualMachinesClientListAllResponse{}, err
+ }
+ return client.listAllHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listAllCreateRequest creates the ListAll request.
+func (client *VirtualMachinesClient) listAllCreateRequest(ctx context.Context, options *VirtualMachinesClientListAllOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ if options != nil && options.Filter != nil {
+ reqQP.Set("$filter", *options.Filter)
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.StatusOnly != nil {
+ reqQP.Set("statusOnly", *options.StatusOnly)
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listAllHandleResponse handles the ListAll response.
+func (client *VirtualMachinesClient) listAllHandleResponse(resp *http.Response) (VirtualMachinesClientListAllResponse, error) {
+ result := VirtualMachinesClientListAllResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineListResult); err != nil {
+ return VirtualMachinesClientListAllResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListAvailableSizesPager - Lists all available virtual machine sizes to which the specified virtual machine can be resized.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientListAvailableSizesOptions contains the optional parameters for the VirtualMachinesClient.NewListAvailableSizesPager
+// method.
+func (client *VirtualMachinesClient) NewListAvailableSizesPager(resourceGroupName string, vmName string, options *VirtualMachinesClientListAvailableSizesOptions) *runtime.Pager[VirtualMachinesClientListAvailableSizesResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachinesClientListAvailableSizesResponse]{
+ More: func(page VirtualMachinesClientListAvailableSizesResponse) bool {
+ return false
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachinesClientListAvailableSizesResponse) (VirtualMachinesClientListAvailableSizesResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachinesClient.NewListAvailableSizesPager")
+ req, err := client.listAvailableSizesCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return VirtualMachinesClientListAvailableSizesResponse{}, err
+ }
+ resp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachinesClientListAvailableSizesResponse{}, err
+ }
+ if !runtime.HasStatusCode(resp, http.StatusOK) {
+ return VirtualMachinesClientListAvailableSizesResponse{}, runtime.NewResponseError(resp)
+ }
+ return client.listAvailableSizesHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listAvailableSizesCreateRequest creates the ListAvailableSizes request.
+func (client *VirtualMachinesClient) listAvailableSizesCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientListAvailableSizesOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listAvailableSizesHandleResponse handles the ListAvailableSizes response.
+func (client *VirtualMachinesClient) listAvailableSizesHandleResponse(resp *http.Response) (VirtualMachinesClientListAvailableSizesResponse, error) {
+ result := VirtualMachinesClientListAvailableSizesResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineSizeListResult); err != nil {
+ return VirtualMachinesClientListAvailableSizesResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByLocationPager - Gets all the virtual machines under the specified subscription for the specified location.
+//
+// Generated from API version 2024-03-01
+// - location - The location for which virtual machines under the subscription are queried.
+// - options - VirtualMachinesClientListByLocationOptions contains the optional parameters for the VirtualMachinesClient.NewListByLocationPager
+// method.
+func (client *VirtualMachinesClient) NewListByLocationPager(location string, options *VirtualMachinesClientListByLocationOptions) *runtime.Pager[VirtualMachinesClientListByLocationResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachinesClientListByLocationResponse]{
+ More: func(page VirtualMachinesClientListByLocationResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachinesClientListByLocationResponse) (VirtualMachinesClientListByLocationResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachinesClient.NewListByLocationPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByLocationCreateRequest(ctx, location, options)
+ }, nil)
+ if err != nil {
+ return VirtualMachinesClientListByLocationResponse{}, err
+ }
+ return client.listByLocationHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByLocationCreateRequest creates the ListByLocation request.
+func (client *VirtualMachinesClient) listByLocationCreateRequest(ctx context.Context, location string, options *VirtualMachinesClientListByLocationOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByLocationHandleResponse handles the ListByLocation response.
+func (client *VirtualMachinesClient) listByLocationHandleResponse(resp *http.Response) (VirtualMachinesClientListByLocationResponse, error) {
+ result := VirtualMachinesClientListByLocationResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineListResult); err != nil {
+ return VirtualMachinesClientListByLocationResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginPerformMaintenance - The operation to perform maintenance on a virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachinesClient.BeginPerformMaintenance
+// method.
+func (client *VirtualMachinesClient) BeginPerformMaintenance(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginPerformMaintenanceOptions) (*runtime.Poller[VirtualMachinesClientPerformMaintenanceResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.performMaintenance(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientPerformMaintenanceResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientPerformMaintenanceResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// PerformMaintenance - The operation to perform maintenance on a virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) performMaintenance(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginPerformMaintenanceOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginPerformMaintenance"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.performMaintenanceCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// performMaintenanceCreateRequest creates the PerformMaintenance request.
+func (client *VirtualMachinesClient) performMaintenanceCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginPerformMaintenanceOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginPowerOff - The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same
+// provisioned resources. You are still charged for this virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientBeginPowerOffOptions contains the optional parameters for the VirtualMachinesClient.BeginPowerOff
+// method.
+func (client *VirtualMachinesClient) BeginPowerOff(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginPowerOffOptions) (*runtime.Poller[VirtualMachinesClientPowerOffResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.powerOff(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientPowerOffResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientPowerOffResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// PowerOff - The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned
+// resources. You are still charged for this virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) powerOff(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginPowerOffOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginPowerOff"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.powerOffCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// powerOffCreateRequest creates the PowerOff request.
+func (client *VirtualMachinesClient) powerOffCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginPowerOffOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.SkipShutdown != nil {
+ reqQP.Set("skipShutdown", strconv.FormatBool(*options.SkipShutdown))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginReapply - The operation to reapply a virtual machine's state.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientBeginReapplyOptions contains the optional parameters for the VirtualMachinesClient.BeginReapply
+// method.
+func (client *VirtualMachinesClient) BeginReapply(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginReapplyOptions) (*runtime.Poller[VirtualMachinesClientReapplyResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.reapply(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientReapplyResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientReapplyResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Reapply - The operation to reapply a virtual machine's state.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) reapply(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginReapplyOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginReapply"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.reapplyCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// reapplyCreateRequest creates the Reapply request.
+func (client *VirtualMachinesClient) reapplyCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginReapplyOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reapply"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginRedeploy - Shuts down the virtual machine, moves it to a new node, and powers it back on.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientBeginRedeployOptions contains the optional parameters for the VirtualMachinesClient.BeginRedeploy
+// method.
+func (client *VirtualMachinesClient) BeginRedeploy(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginRedeployOptions) (*runtime.Poller[VirtualMachinesClientRedeployResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.redeploy(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientRedeployResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientRedeployResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Redeploy - Shuts down the virtual machine, moves it to a new node, and powers it back on.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) redeploy(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginRedeployOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginRedeploy"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.redeployCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// redeployCreateRequest creates the Redeploy request.
+func (client *VirtualMachinesClient) redeployCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginRedeployOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginReimage - Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual
+// machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE:
+// The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk
+// will be preserved after reimage. If deleteOption is delete, the old OS disk
+// will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientBeginReimageOptions contains the optional parameters for the VirtualMachinesClient.BeginReimage
+// method.
+func (client *VirtualMachinesClient) BeginReimage(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginReimageOptions) (*runtime.Poller[VirtualMachinesClientReimageResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.reimage(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientReimageResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientReimageResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Reimage - Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines
+// who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE:
+// The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk
+// will be preserved after reimage. If deleteOption is delete, the old OS disk
+// will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) reimage(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginReimageOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginReimage"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.reimageCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// reimageCreateRequest creates the Reimage request.
+func (client *VirtualMachinesClient) reimageCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginReimageOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.Parameters != nil {
+ if err := runtime.MarshalAsJSON(req, *options.Parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// BeginRestart - The operation to restart a virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientBeginRestartOptions contains the optional parameters for the VirtualMachinesClient.BeginRestart
+// method.
+func (client *VirtualMachinesClient) BeginRestart(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginRestartOptions) (*runtime.Poller[VirtualMachinesClientRestartResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.restart(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientRestartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientRestartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Restart - The operation to restart a virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) restart(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginRestartOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginRestart"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.restartCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// restartCreateRequest creates the Restart request.
+func (client *VirtualMachinesClient) restartCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginRestartOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// RetrieveBootDiagnosticsData - The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientRetrieveBootDiagnosticsDataOptions contains the optional parameters for the VirtualMachinesClient.RetrieveBootDiagnosticsData
+// method.
+func (client *VirtualMachinesClient) RetrieveBootDiagnosticsData(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientRetrieveBootDiagnosticsDataOptions) (VirtualMachinesClientRetrieveBootDiagnosticsDataResponse, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.RetrieveBootDiagnosticsData"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.retrieveBootDiagnosticsDataCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return VirtualMachinesClientRetrieveBootDiagnosticsDataResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachinesClientRetrieveBootDiagnosticsDataResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachinesClientRetrieveBootDiagnosticsDataResponse{}, err
+ }
+ resp, err := client.retrieveBootDiagnosticsDataHandleResponse(httpResp)
+ return resp, err
+}
+
+// retrieveBootDiagnosticsDataCreateRequest creates the RetrieveBootDiagnosticsData request.
+func (client *VirtualMachinesClient) retrieveBootDiagnosticsDataCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientRetrieveBootDiagnosticsDataOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/retrieveBootDiagnosticsData"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.SasURIExpirationTimeInMinutes != nil {
+ reqQP.Set("sasUriExpirationTimeInMinutes", strconv.FormatInt(int64(*options.SasURIExpirationTimeInMinutes), 10))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// retrieveBootDiagnosticsDataHandleResponse handles the RetrieveBootDiagnosticsData response.
+func (client *VirtualMachinesClient) retrieveBootDiagnosticsDataHandleResponse(resp *http.Response) (VirtualMachinesClientRetrieveBootDiagnosticsDataResponse, error) {
+ result := VirtualMachinesClientRetrieveBootDiagnosticsDataResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RetrieveBootDiagnosticsDataResult); err != nil {
+ return VirtualMachinesClientRetrieveBootDiagnosticsDataResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginRunCommand - Run command on the VM.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - parameters - Parameters supplied to the Run command operation.
+// - options - VirtualMachinesClientBeginRunCommandOptions contains the optional parameters for the VirtualMachinesClient.BeginRunCommand
+// method.
+func (client *VirtualMachinesClient) BeginRunCommand(ctx context.Context, resourceGroupName string, vmName string, parameters RunCommandInput, options *VirtualMachinesClientBeginRunCommandOptions) (*runtime.Poller[VirtualMachinesClientRunCommandResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.runCommand(ctx, resourceGroupName, vmName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientRunCommandResponse]{
+ FinalStateVia: runtime.FinalStateViaLocation,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientRunCommandResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// RunCommand - Run command on the VM.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) runCommand(ctx context.Context, resourceGroupName string, vmName string, parameters RunCommandInput, options *VirtualMachinesClientBeginRunCommandOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginRunCommand"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.runCommandCreateRequest(ctx, resourceGroupName, vmName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// runCommandCreateRequest creates the RunCommand request.
+func (client *VirtualMachinesClient) runCommandCreateRequest(ctx context.Context, resourceGroupName string, vmName string, parameters RunCommandInput, options *VirtualMachinesClientBeginRunCommandOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json, text/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// SimulateEviction - The operation to simulate the eviction of spot virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientSimulateEvictionOptions contains the optional parameters for the VirtualMachinesClient.SimulateEviction
+// method.
+func (client *VirtualMachinesClient) SimulateEviction(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientSimulateEvictionOptions) (VirtualMachinesClientSimulateEvictionResponse, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.SimulateEviction"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.simulateEvictionCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return VirtualMachinesClientSimulateEvictionResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachinesClientSimulateEvictionResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachinesClientSimulateEvictionResponse{}, err
+ }
+ return VirtualMachinesClientSimulateEvictionResponse{}, nil
+}
+
+// simulateEvictionCreateRequest creates the SimulateEviction request.
+func (client *VirtualMachinesClient) simulateEvictionCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientSimulateEvictionOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/simulateEviction"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginStart - The operation to start a virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - options - VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart
+// method.
+func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginStartOptions) (*runtime.Poller[VirtualMachinesClientStartResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.start(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientStartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientStartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Start - The operation to start a virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) start(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginStartOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginStart"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.startCreateRequest(ctx, resourceGroupName, vmName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// startCreateRequest creates the Start request.
+func (client *VirtualMachinesClient) startCreateRequest(ctx context.Context, resourceGroupName string, vmName string, options *VirtualMachinesClientBeginStartOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginUpdate - The operation to update a virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmName - The name of the virtual machine.
+// - parameters - Parameters supplied to the Update Virtual Machine operation.
+// - options - VirtualMachinesClientBeginUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginUpdate
+// method.
+func (client *VirtualMachinesClient) BeginUpdate(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachineUpdate, options *VirtualMachinesClientBeginUpdateOptions) (*runtime.Poller[VirtualMachinesClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, vmName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachinesClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachinesClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - The operation to update a virtual machine.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachinesClient) update(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachineUpdate, options *VirtualMachinesClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachinesClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, vmName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *VirtualMachinesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, vmName string, parameters VirtualMachineUpdate, options *VirtualMachinesClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmName == "" {
+ return nil, errors.New("parameter vmName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmName}", url.PathEscape(vmName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.IfMatch != nil {
+ req.Raw().Header["If-Match"] = []string{*options.IfMatch}
+ }
+ if options != nil && options.IfNoneMatch != nil {
+ req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
+ }
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetextensions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetextensions_client.go
new file mode 100644
index 000000000..81ddfad6a
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetextensions_client.go
@@ -0,0 +1,434 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// VirtualMachineScaleSetExtensionsClient contains the methods for the VirtualMachineScaleSetExtensions group.
+// Don't use this type directly, use NewVirtualMachineScaleSetExtensionsClient() instead.
+type VirtualMachineScaleSetExtensionsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewVirtualMachineScaleSetExtensionsClient creates a new instance of VirtualMachineScaleSetExtensionsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetExtensionsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &VirtualMachineScaleSetExtensionsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - The operation to create or update an extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set where the extension should be create or updated.
+// - vmssExtensionName - The name of the VM scale set extension.
+// - extensionParameters - Parameters supplied to the Create VM scale set Extension operation.
+// - options - VirtualMachineScaleSetExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.BeginCreateOrUpdate
+// method.
+func (client *VirtualMachineScaleSetExtensionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension, options *VirtualMachineScaleSetExtensionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualMachineScaleSetExtensionsClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetExtensionsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetExtensionsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - The operation to create or update an extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetExtensionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension, options *VirtualMachineScaleSetExtensionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetExtensionsClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *VirtualMachineScaleSetExtensionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension, options *VirtualMachineScaleSetExtensionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if vmssExtensionName == "" {
+ return nil, errors.New("parameter vmssExtensionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmssExtensionName}", url.PathEscape(vmssExtensionName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - The operation to delete the extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set where the extension should be deleted.
+// - vmssExtensionName - The name of the VM scale set extension.
+// - options - VirtualMachineScaleSetExtensionsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.BeginDelete
+// method.
+func (client *VirtualMachineScaleSetExtensionsClient) BeginDelete(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, options *VirtualMachineScaleSetExtensionsClientBeginDeleteOptions) (*runtime.Poller[VirtualMachineScaleSetExtensionsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, vmScaleSetName, vmssExtensionName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetExtensionsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetExtensionsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - The operation to delete the extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetExtensionsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, options *VirtualMachineScaleSetExtensionsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetExtensionsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, vmScaleSetName, vmssExtensionName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *VirtualMachineScaleSetExtensionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, options *VirtualMachineScaleSetExtensionsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if vmssExtensionName == "" {
+ return nil, errors.New("parameter vmssExtensionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmssExtensionName}", url.PathEscape(vmssExtensionName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - The operation to get the extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set containing the extension.
+// - vmssExtensionName - The name of the VM scale set extension.
+// - options - VirtualMachineScaleSetExtensionsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.Get
+// method.
+func (client *VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, options *VirtualMachineScaleSetExtensionsClientGetOptions) (VirtualMachineScaleSetExtensionsClientGetResponse, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetExtensionsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, vmScaleSetName, vmssExtensionName, options)
+ if err != nil {
+ return VirtualMachineScaleSetExtensionsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineScaleSetExtensionsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineScaleSetExtensionsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *VirtualMachineScaleSetExtensionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, options *VirtualMachineScaleSetExtensionsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if vmssExtensionName == "" {
+ return nil, errors.New("parameter vmssExtensionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmssExtensionName}", url.PathEscape(vmssExtensionName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", *options.Expand)
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *VirtualMachineScaleSetExtensionsClient) getHandleResponse(resp *http.Response) (VirtualMachineScaleSetExtensionsClientGetResponse, error) {
+ result := VirtualMachineScaleSetExtensionsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineScaleSetExtension); err != nil {
+ return VirtualMachineScaleSetExtensionsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - Gets a list of all extensions in a VM scale set.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set containing the extension.
+// - options - VirtualMachineScaleSetExtensionsClientListOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.NewListPager
+// method.
+func (client *VirtualMachineScaleSetExtensionsClient) NewListPager(resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetExtensionsClientListOptions) *runtime.Pager[VirtualMachineScaleSetExtensionsClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachineScaleSetExtensionsClientListResponse]{
+ More: func(page VirtualMachineScaleSetExtensionsClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachineScaleSetExtensionsClientListResponse) (VirtualMachineScaleSetExtensionsClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachineScaleSetExtensionsClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ }, nil)
+ if err != nil {
+ return VirtualMachineScaleSetExtensionsClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *VirtualMachineScaleSetExtensionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetExtensionsClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *VirtualMachineScaleSetExtensionsClient) listHandleResponse(resp *http.Response) (VirtualMachineScaleSetExtensionsClientListResponse, error) {
+ result := VirtualMachineScaleSetExtensionsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineScaleSetExtensionListResult); err != nil {
+ return VirtualMachineScaleSetExtensionsClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginUpdate - The operation to update an extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set where the extension should be updated.
+// - vmssExtensionName - The name of the VM scale set extension.
+// - extensionParameters - Parameters supplied to the Update VM scale set Extension operation.
+// - options - VirtualMachineScaleSetExtensionsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetExtensionsClient.BeginUpdate
+// method.
+func (client *VirtualMachineScaleSetExtensionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate, options *VirtualMachineScaleSetExtensionsClientBeginUpdateOptions) (*runtime.Poller[VirtualMachineScaleSetExtensionsClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetExtensionsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetExtensionsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - The operation to update an extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetExtensionsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate, options *VirtualMachineScaleSetExtensionsClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetExtensionsClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *VirtualMachineScaleSetExtensionsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate, options *VirtualMachineScaleSetExtensionsClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if vmssExtensionName == "" {
+ return nil, errors.New("parameter vmssExtensionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmssExtensionName}", url.PathEscape(vmssExtensionName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetrollingupgrades_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetrollingupgrades_client.go
new file mode 100644
index 000000000..41e01d5d7
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetrollingupgrades_client.go
@@ -0,0 +1,346 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// VirtualMachineScaleSetRollingUpgradesClient contains the methods for the VirtualMachineScaleSetRollingUpgrades group.
+// Don't use this type directly, use NewVirtualMachineScaleSetRollingUpgradesClient() instead.
+type VirtualMachineScaleSetRollingUpgradesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewVirtualMachineScaleSetRollingUpgradesClient creates a new instance of VirtualMachineScaleSetRollingUpgradesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetRollingUpgradesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &VirtualMachineScaleSetRollingUpgradesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCancel - Cancels the current virtual machine scale set rolling upgrade.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetRollingUpgradesClientBeginCancelOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.BeginCancel
+// method.
+func (client *VirtualMachineScaleSetRollingUpgradesClient) BeginCancel(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginCancelOptions) (*runtime.Poller[VirtualMachineScaleSetRollingUpgradesClientCancelResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.cancel(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetRollingUpgradesClientCancelResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetRollingUpgradesClientCancelResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Cancel - Cancels the current virtual machine scale set rolling upgrade.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetRollingUpgradesClient) cancel(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginCancelOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetRollingUpgradesClient.BeginCancel"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.cancelCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// cancelCreateRequest creates the Cancel request.
+func (client *VirtualMachineScaleSetRollingUpgradesClient) cancelCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginCancelOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// GetLatest - Gets the status of the latest virtual machine scale set rolling upgrade.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetRollingUpgradesClientGetLatestOptions contains the optional parameters for the VirtualMachineScaleSetRollingUpgradesClient.GetLatest
+// method.
+func (client *VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientGetLatestOptions) (VirtualMachineScaleSetRollingUpgradesClientGetLatestResponse, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetRollingUpgradesClient.GetLatest"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getLatestCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return VirtualMachineScaleSetRollingUpgradesClientGetLatestResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineScaleSetRollingUpgradesClientGetLatestResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineScaleSetRollingUpgradesClientGetLatestResponse{}, err
+ }
+ resp, err := client.getLatestHandleResponse(httpResp)
+ return resp, err
+}
+
+// getLatestCreateRequest creates the GetLatest request.
+func (client *VirtualMachineScaleSetRollingUpgradesClient) getLatestCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientGetLatestOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getLatestHandleResponse handles the GetLatest response.
+func (client *VirtualMachineScaleSetRollingUpgradesClient) getLatestHandleResponse(resp *http.Response) (VirtualMachineScaleSetRollingUpgradesClientGetLatestResponse, error) {
+ result := VirtualMachineScaleSetRollingUpgradesClientGetLatestResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RollingUpgradeStatusInfo); err != nil {
+ return VirtualMachineScaleSetRollingUpgradesClientGetLatestResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginStartExtensionUpgrade - Starts a rolling upgrade to move all extensions for all virtual machine scale set instances
+// to the latest available extension version. Instances which are already running the latest extension versions
+// are not affected.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetRollingUpgradesClientBeginStartExtensionUpgradeOptions contains the optional parameters
+// for the VirtualMachineScaleSetRollingUpgradesClient.BeginStartExtensionUpgrade method.
+func (client *VirtualMachineScaleSetRollingUpgradesClient) BeginStartExtensionUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginStartExtensionUpgradeOptions) (*runtime.Poller[VirtualMachineScaleSetRollingUpgradesClientStartExtensionUpgradeResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.startExtensionUpgrade(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetRollingUpgradesClientStartExtensionUpgradeResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetRollingUpgradesClientStartExtensionUpgradeResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// StartExtensionUpgrade - Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to
+// the latest available extension version. Instances which are already running the latest extension versions
+// are not affected.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetRollingUpgradesClient) startExtensionUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginStartExtensionUpgradeOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetRollingUpgradesClient.BeginStartExtensionUpgrade"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.startExtensionUpgradeCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// startExtensionUpgradeCreateRequest creates the StartExtensionUpgrade request.
+func (client *VirtualMachineScaleSetRollingUpgradesClient) startExtensionUpgradeCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginStartExtensionUpgradeOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginStartOSUpgrade - Starts a rolling upgrade to move all virtual machine scale set instances to the latest available
+// Platform Image OS version. Instances which are already running the latest available OS version are not
+// affected.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetRollingUpgradesClientBeginStartOSUpgradeOptions contains the optional parameters for the
+// VirtualMachineScaleSetRollingUpgradesClient.BeginStartOSUpgrade method.
+func (client *VirtualMachineScaleSetRollingUpgradesClient) BeginStartOSUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginStartOSUpgradeOptions) (*runtime.Poller[VirtualMachineScaleSetRollingUpgradesClientStartOSUpgradeResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.startOSUpgrade(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetRollingUpgradesClientStartOSUpgradeResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetRollingUpgradesClientStartOSUpgradeResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// StartOSUpgrade - Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform
+// Image OS version. Instances which are already running the latest available OS version are not
+// affected.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetRollingUpgradesClient) startOSUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginStartOSUpgradeOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetRollingUpgradesClient.BeginStartOSUpgrade"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.startOSUpgradeCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// startOSUpgradeCreateRequest creates the StartOSUpgrade request.
+func (client *VirtualMachineScaleSetRollingUpgradesClient) startOSUpgradeCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetRollingUpgradesClientBeginStartOSUpgradeOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesets_client.go
new file mode 100644
index 000000000..a03ff0c50
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesets_client.go
@@ -0,0 +1,1957 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strconv"
+ "strings"
+)
+
+// VirtualMachineScaleSetsClient contains the methods for the VirtualMachineScaleSets group.
+// Don't use this type directly, use NewVirtualMachineScaleSetsClient() instead.
+type VirtualMachineScaleSetsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewVirtualMachineScaleSetsClient creates a new instance of VirtualMachineScaleSetsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewVirtualMachineScaleSetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &VirtualMachineScaleSetsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginApproveRollingUpgrade - Approve upgrade on deferred rolling upgrades for OS disks in the virtual machines in a VM
+// scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginApproveRollingUpgrade
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginApproveRollingUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions) (*runtime.Poller[VirtualMachineScaleSetsClientApproveRollingUpgradeResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.approveRollingUpgrade(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientApproveRollingUpgradeResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientApproveRollingUpgradeResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// ApproveRollingUpgrade - Approve upgrade on deferred rolling upgrades for OS disks in the virtual machines in a VM scale
+// set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) approveRollingUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginApproveRollingUpgrade"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.approveRollingUpgradeCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// approveRollingUpgradeCreateRequest creates the ApproveRollingUpgrade request.
+func (client *VirtualMachineScaleSetsClient) approveRollingUpgradeCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginApproveRollingUpgradeOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/approveRollingUpgrade"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.VMInstanceIDs != nil {
+ if err := runtime.MarshalAsJSON(req, *options.VMInstanceIDs); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// ConvertToSinglePlacementGroup - Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the virtual machine scale set to create or update.
+// - parameters - The input object for ConvertToSinglePlacementGroup API.
+// - options - VirtualMachineScaleSetsClientConvertToSinglePlacementGroupOptions contains the optional parameters for the VirtualMachineScaleSetsClient.ConvertToSinglePlacementGroup
+// method.
+func (client *VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroup(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters VMScaleSetConvertToSinglePlacementGroupInput, options *VirtualMachineScaleSetsClientConvertToSinglePlacementGroupOptions) (VirtualMachineScaleSetsClientConvertToSinglePlacementGroupResponse, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.ConvertToSinglePlacementGroup"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.convertToSinglePlacementGroupCreateRequest(ctx, resourceGroupName, vmScaleSetName, parameters, options)
+ if err != nil {
+ return VirtualMachineScaleSetsClientConvertToSinglePlacementGroupResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineScaleSetsClientConvertToSinglePlacementGroupResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineScaleSetsClientConvertToSinglePlacementGroupResponse{}, err
+ }
+ return VirtualMachineScaleSetsClientConvertToSinglePlacementGroupResponse{}, nil
+}
+
+// convertToSinglePlacementGroupCreateRequest creates the ConvertToSinglePlacementGroup request.
+func (client *VirtualMachineScaleSetsClient) convertToSinglePlacementGroupCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters VMScaleSetConvertToSinglePlacementGroupInput, options *VirtualMachineScaleSetsClientConvertToSinglePlacementGroupOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/convertToSinglePlacementGroup"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginCreateOrUpdate - Create or update a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set to create or update.
+// - parameters - The scale set object.
+// - options - VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginCreateOrUpdate
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters VirtualMachineScaleSet, options *VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualMachineScaleSetsClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, vmScaleSetName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - Create or update a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters VirtualMachineScaleSet, options *VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vmScaleSetName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *VirtualMachineScaleSetsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters VirtualMachineScaleSet, options *VirtualMachineScaleSetsClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.IfMatch != nil {
+ req.Raw().Header["If-Match"] = []string{*options.IfMatch}
+ }
+ if options != nil && options.IfNoneMatch != nil {
+ req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
+ }
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDeallocate - Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases
+// the compute resources. You are not billed for the compute resources that this virtual machine
+// scale set deallocates.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientBeginDeallocateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDeallocate
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginDeallocate(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginDeallocateOptions) (*runtime.Poller[VirtualMachineScaleSetsClientDeallocateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deallocate(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientDeallocateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientDeallocateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Deallocate - Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the
+// compute resources. You are not billed for the compute resources that this virtual machine
+// scale set deallocates.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) deallocate(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginDeallocateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginDeallocate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deallocateCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deallocateCreateRequest creates the Deallocate request.
+func (client *VirtualMachineScaleSetsClient) deallocateCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginDeallocateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.Hibernate != nil {
+ reqQP.Set("hibernate", strconv.FormatBool(*options.Hibernate))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.VMInstanceIDs != nil {
+ if err := runtime.MarshalAsJSON(req, *options.VMInstanceIDs); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// BeginDelete - Deletes a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDelete
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginDelete(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginDeleteOptions) (*runtime.Poller[VirtualMachineScaleSetsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Deletes a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *VirtualMachineScaleSetsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.ForceDeletion != nil {
+ reqQP.Set("forceDeletion", strconv.FormatBool(*options.ForceDeletion))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginDeleteInstances - Deletes virtual machines in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - vmInstanceIDs - A list of virtual machine instance IDs from the VM scale set.
+// - options - VirtualMachineScaleSetsClientBeginDeleteInstancesOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginDeleteInstances
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginDeleteInstances(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, options *VirtualMachineScaleSetsClientBeginDeleteInstancesOptions) (*runtime.Poller[VirtualMachineScaleSetsClientDeleteInstancesResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteInstances(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientDeleteInstancesResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientDeleteInstancesResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// DeleteInstances - Deletes virtual machines in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) deleteInstances(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, options *VirtualMachineScaleSetsClientBeginDeleteInstancesOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginDeleteInstances"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteInstancesCreateRequest(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteInstancesCreateRequest creates the DeleteInstances request.
+func (client *VirtualMachineScaleSetsClient) deleteInstancesCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, options *VirtualMachineScaleSetsClientBeginDeleteInstancesOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.ForceDeletion != nil {
+ reqQP.Set("forceDeletion", strconv.FormatBool(*options.ForceDeletion))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, vmInstanceIDs); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// ForceRecoveryServiceFabricPlatformUpdateDomainWalk - Manual platform update domain walk to update virtual machines in a
+// service fabric virtual machine scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - platformUpdateDomain - The platform update domain for which a manual recovery walk is requested
+// - options - VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkOptions contains the optional
+// parameters for the VirtualMachineScaleSetsClient.ForceRecoveryServiceFabricPlatformUpdateDomainWalk method.
+func (client *VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalk(ctx context.Context, resourceGroupName string, vmScaleSetName string, platformUpdateDomain int32, options *VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkOptions) (VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.ForceRecoveryServiceFabricPlatformUpdateDomainWalk"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.forceRecoveryServiceFabricPlatformUpdateDomainWalkCreateRequest(ctx, resourceGroupName, vmScaleSetName, platformUpdateDomain, options)
+ if err != nil {
+ return VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse{}, err
+ }
+ resp, err := client.forceRecoveryServiceFabricPlatformUpdateDomainWalkHandleResponse(httpResp)
+ return resp, err
+}
+
+// forceRecoveryServiceFabricPlatformUpdateDomainWalkCreateRequest creates the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request.
+func (client *VirtualMachineScaleSetsClient) forceRecoveryServiceFabricPlatformUpdateDomainWalkCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, platformUpdateDomain int32, options *VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.PlacementGroupID != nil {
+ reqQP.Set("placementGroupId", *options.PlacementGroupID)
+ }
+ reqQP.Set("platformUpdateDomain", strconv.FormatInt(int64(platformUpdateDomain), 10))
+ if options != nil && options.Zone != nil {
+ reqQP.Set("zone", *options.Zone)
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// forceRecoveryServiceFabricPlatformUpdateDomainWalkHandleResponse handles the ForceRecoveryServiceFabricPlatformUpdateDomainWalk response.
+func (client *VirtualMachineScaleSetsClient) forceRecoveryServiceFabricPlatformUpdateDomainWalkHandleResponse(resp *http.Response) (VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse, error) {
+ result := VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RecoveryWalkResponse); err != nil {
+ return VirtualMachineScaleSetsClientForceRecoveryServiceFabricPlatformUpdateDomainWalkResponse{}, err
+ }
+ return result, nil
+}
+
+// Get - Display information about a virtual machine scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetsClient.Get
+// method.
+func (client *VirtualMachineScaleSetsClient) Get(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientGetOptions) (VirtualMachineScaleSetsClientGetResponse, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return VirtualMachineScaleSetsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineScaleSetsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineScaleSetsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *VirtualMachineScaleSetsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *VirtualMachineScaleSetsClient) getHandleResponse(resp *http.Response) (VirtualMachineScaleSetsClientGetResponse, error) {
+ result := VirtualMachineScaleSetsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineScaleSet); err != nil {
+ return VirtualMachineScaleSetsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// GetInstanceView - Gets the status of a VM scale set instance.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientGetInstanceViewOptions contains the optional parameters for the VirtualMachineScaleSetsClient.GetInstanceView
+// method.
+func (client *VirtualMachineScaleSetsClient) GetInstanceView(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientGetInstanceViewOptions) (VirtualMachineScaleSetsClientGetInstanceViewResponse, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.GetInstanceView"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getInstanceViewCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return VirtualMachineScaleSetsClientGetInstanceViewResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineScaleSetsClientGetInstanceViewResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineScaleSetsClientGetInstanceViewResponse{}, err
+ }
+ resp, err := client.getInstanceViewHandleResponse(httpResp)
+ return resp, err
+}
+
+// getInstanceViewCreateRequest creates the GetInstanceView request.
+func (client *VirtualMachineScaleSetsClient) getInstanceViewCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientGetInstanceViewOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getInstanceViewHandleResponse handles the GetInstanceView response.
+func (client *VirtualMachineScaleSetsClient) getInstanceViewHandleResponse(resp *http.Response) (VirtualMachineScaleSetsClientGetInstanceViewResponse, error) {
+ result := VirtualMachineScaleSetsClientGetInstanceViewResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineScaleSetInstanceView); err != nil {
+ return VirtualMachineScaleSetsClientGetInstanceViewResponse{}, err
+ }
+ return result, nil
+}
+
+// NewGetOSUpgradeHistoryPager - Gets list of OS upgrades on a VM scale set instance.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientGetOSUpgradeHistoryOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewGetOSUpgradeHistoryPager
+// method.
+func (client *VirtualMachineScaleSetsClient) NewGetOSUpgradeHistoryPager(resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientGetOSUpgradeHistoryOptions) *runtime.Pager[VirtualMachineScaleSetsClientGetOSUpgradeHistoryResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachineScaleSetsClientGetOSUpgradeHistoryResponse]{
+ More: func(page VirtualMachineScaleSetsClientGetOSUpgradeHistoryResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachineScaleSetsClientGetOSUpgradeHistoryResponse) (VirtualMachineScaleSetsClientGetOSUpgradeHistoryResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachineScaleSetsClient.NewGetOSUpgradeHistoryPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.getOSUpgradeHistoryCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ }, nil)
+ if err != nil {
+ return VirtualMachineScaleSetsClientGetOSUpgradeHistoryResponse{}, err
+ }
+ return client.getOSUpgradeHistoryHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// getOSUpgradeHistoryCreateRequest creates the GetOSUpgradeHistory request.
+func (client *VirtualMachineScaleSetsClient) getOSUpgradeHistoryCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientGetOSUpgradeHistoryOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getOSUpgradeHistoryHandleResponse handles the GetOSUpgradeHistory response.
+func (client *VirtualMachineScaleSetsClient) getOSUpgradeHistoryHandleResponse(resp *http.Response) (VirtualMachineScaleSetsClientGetOSUpgradeHistoryResponse, error) {
+ result := VirtualMachineScaleSetsClientGetOSUpgradeHistoryResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineScaleSetListOSUpgradeHistory); err != nil {
+ return VirtualMachineScaleSetsClientGetOSUpgradeHistoryResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - Gets a list of all VM scale sets under a resource group.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - options - VirtualMachineScaleSetsClientListOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListPager
+// method.
+func (client *VirtualMachineScaleSetsClient) NewListPager(resourceGroupName string, options *VirtualMachineScaleSetsClientListOptions) *runtime.Pager[VirtualMachineScaleSetsClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachineScaleSetsClientListResponse]{
+ More: func(page VirtualMachineScaleSetsClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachineScaleSetsClientListResponse) (VirtualMachineScaleSetsClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachineScaleSetsClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, resourceGroupName, options)
+ }, nil)
+ if err != nil {
+ return VirtualMachineScaleSetsClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *VirtualMachineScaleSetsClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *VirtualMachineScaleSetsClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *VirtualMachineScaleSetsClient) listHandleResponse(resp *http.Response) (VirtualMachineScaleSetsClientListResponse, error) {
+ result := VirtualMachineScaleSetsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineScaleSetListResult); err != nil {
+ return VirtualMachineScaleSetsClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListAllPager - Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use
+// nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is
+// null to fetch all the VM Scale Sets.
+//
+// Generated from API version 2024-03-01
+// - options - VirtualMachineScaleSetsClientListAllOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListAllPager
+// method.
+func (client *VirtualMachineScaleSetsClient) NewListAllPager(options *VirtualMachineScaleSetsClientListAllOptions) *runtime.Pager[VirtualMachineScaleSetsClientListAllResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachineScaleSetsClientListAllResponse]{
+ More: func(page VirtualMachineScaleSetsClientListAllResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachineScaleSetsClientListAllResponse) (VirtualMachineScaleSetsClientListAllResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachineScaleSetsClient.NewListAllPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listAllCreateRequest(ctx, options)
+ }, nil)
+ if err != nil {
+ return VirtualMachineScaleSetsClientListAllResponse{}, err
+ }
+ return client.listAllHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listAllCreateRequest creates the ListAll request.
+func (client *VirtualMachineScaleSetsClient) listAllCreateRequest(ctx context.Context, options *VirtualMachineScaleSetsClientListAllOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets"
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listAllHandleResponse handles the ListAll response.
+func (client *VirtualMachineScaleSetsClient) listAllHandleResponse(resp *http.Response) (VirtualMachineScaleSetsClientListAllResponse, error) {
+ result := VirtualMachineScaleSetsClientListAllResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineScaleSetListWithLinkResult); err != nil {
+ return VirtualMachineScaleSetsClientListAllResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListByLocationPager - Gets all the VM scale sets under the specified subscription for the specified location.
+//
+// Generated from API version 2024-03-01
+// - location - The location for which VM scale sets under the subscription are queried.
+// - options - VirtualMachineScaleSetsClientListByLocationOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListByLocationPager
+// method.
+func (client *VirtualMachineScaleSetsClient) NewListByLocationPager(location string, options *VirtualMachineScaleSetsClientListByLocationOptions) *runtime.Pager[VirtualMachineScaleSetsClientListByLocationResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachineScaleSetsClientListByLocationResponse]{
+ More: func(page VirtualMachineScaleSetsClientListByLocationResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachineScaleSetsClientListByLocationResponse) (VirtualMachineScaleSetsClientListByLocationResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachineScaleSetsClient.NewListByLocationPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listByLocationCreateRequest(ctx, location, options)
+ }, nil)
+ if err != nil {
+ return VirtualMachineScaleSetsClientListByLocationResponse{}, err
+ }
+ return client.listByLocationHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listByLocationCreateRequest creates the ListByLocation request.
+func (client *VirtualMachineScaleSetsClient) listByLocationCreateRequest(ctx context.Context, location string, options *VirtualMachineScaleSetsClientListByLocationOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachineScaleSets"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listByLocationHandleResponse handles the ListByLocation response.
+func (client *VirtualMachineScaleSetsClient) listByLocationHandleResponse(resp *http.Response) (VirtualMachineScaleSetsClientListByLocationResponse, error) {
+ result := VirtualMachineScaleSetsClientListByLocationResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineScaleSetListResult); err != nil {
+ return VirtualMachineScaleSetsClientListByLocationResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListSKUsPager - Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances
+// allowed for each SKU.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientListSKUsOptions contains the optional parameters for the VirtualMachineScaleSetsClient.NewListSKUsPager
+// method.
+func (client *VirtualMachineScaleSetsClient) NewListSKUsPager(resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientListSKUsOptions) *runtime.Pager[VirtualMachineScaleSetsClientListSKUsResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachineScaleSetsClientListSKUsResponse]{
+ More: func(page VirtualMachineScaleSetsClientListSKUsResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachineScaleSetsClientListSKUsResponse) (VirtualMachineScaleSetsClientListSKUsResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachineScaleSetsClient.NewListSKUsPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listSKUsCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ }, nil)
+ if err != nil {
+ return VirtualMachineScaleSetsClientListSKUsResponse{}, err
+ }
+ return client.listSKUsHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listSKUsCreateRequest creates the ListSKUs request.
+func (client *VirtualMachineScaleSetsClient) listSKUsCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientListSKUsOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listSKUsHandleResponse handles the ListSKUs response.
+func (client *VirtualMachineScaleSetsClient) listSKUsHandleResponse(resp *http.Response) (VirtualMachineScaleSetsClientListSKUsResponse, error) {
+ result := VirtualMachineScaleSetsClientListSKUsResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineScaleSetListSKUsResult); err != nil {
+ return VirtualMachineScaleSetsClientListSKUsResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginPerformMaintenance - Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances
+// which are not eligible for perform maintenance will be failed. Please refer to best practices for more
+// details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginPerformMaintenance
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginPerformMaintenance(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions) (*runtime.Poller[VirtualMachineScaleSetsClientPerformMaintenanceResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.performMaintenance(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientPerformMaintenanceResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientPerformMaintenanceResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// PerformMaintenance - Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which
+// are not eligible for perform maintenance will be failed. Please refer to best practices for more
+// details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) performMaintenance(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginPerformMaintenance"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.performMaintenanceCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// performMaintenanceCreateRequest creates the PerformMaintenance request.
+func (client *VirtualMachineScaleSetsClient) performMaintenanceCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginPerformMaintenanceOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.VMInstanceIDs != nil {
+ if err := runtime.MarshalAsJSON(req, *options.VMInstanceIDs); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// BeginPowerOff - Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached
+// and you are getting charged for the resources. Instead, use deallocate to release resources and
+// avoid charges.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientBeginPowerOffOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginPowerOff
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginPowerOff(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginPowerOffOptions) (*runtime.Poller[VirtualMachineScaleSetsClientPowerOffResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.powerOff(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientPowerOffResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientPowerOffResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// PowerOff - Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and
+// you are getting charged for the resources. Instead, use deallocate to release resources and
+// avoid charges.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) powerOff(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginPowerOffOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginPowerOff"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.powerOffCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// powerOffCreateRequest creates the PowerOff request.
+func (client *VirtualMachineScaleSetsClient) powerOffCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginPowerOffOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.SkipShutdown != nil {
+ reqQP.Set("skipShutdown", strconv.FormatBool(*options.SkipShutdown))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.VMInstanceIDs != nil {
+ if err := runtime.MarshalAsJSON(req, *options.VMInstanceIDs); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// BeginReapply - Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientBeginReapplyOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReapply
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginReapply(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReapplyOptions) (*runtime.Poller[VirtualMachineScaleSetsClientReapplyResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.reapply(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientReapplyResponse]{
+ FinalStateVia: runtime.FinalStateViaLocation,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientReapplyResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Reapply - Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) reapply(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReapplyOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginReapply"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.reapplyCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// reapplyCreateRequest creates the Reapply request.
+func (client *VirtualMachineScaleSetsClient) reapplyCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReapplyOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reapply"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginRedeploy - Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers
+// them back on.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientBeginRedeployOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginRedeploy
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginRedeploy(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginRedeployOptions) (*runtime.Poller[VirtualMachineScaleSetsClientRedeployResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.redeploy(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientRedeployResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientRedeployResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Redeploy - Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them
+// back on.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) redeploy(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginRedeployOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginRedeploy"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.redeployCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// redeployCreateRequest creates the Redeploy request.
+func (client *VirtualMachineScaleSetsClient) redeployCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginRedeployOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.VMInstanceIDs != nil {
+ if err := runtime.MarshalAsJSON(req, *options.VMInstanceIDs); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// BeginReimage - Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have
+// a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is
+// reset to initial state.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientBeginReimageOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReimage
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginReimage(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReimageOptions) (*runtime.Poller[VirtualMachineScaleSetsClientReimageResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.reimage(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientReimageResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientReimageResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Reimage - Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral
+// OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is
+// reset to initial state.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) reimage(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReimageOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginReimage"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.reimageCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// reimageCreateRequest creates the Reimage request.
+func (client *VirtualMachineScaleSetsClient) reimageCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReimageOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.VMScaleSetReimageInput != nil {
+ if err := runtime.MarshalAsJSON(req, *options.VMScaleSetReimageInput); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// BeginReimageAll - Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation
+// is only supported for managed disks.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientBeginReimageAllOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginReimageAll
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginReimageAll(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReimageAllOptions) (*runtime.Poller[VirtualMachineScaleSetsClientReimageAllResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.reimageAll(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientReimageAllResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientReimageAllResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// ReimageAll - Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation
+// is only supported for managed disks.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) reimageAll(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReimageAllOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginReimageAll"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.reimageAllCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// reimageAllCreateRequest creates the ReimageAll request.
+func (client *VirtualMachineScaleSetsClient) reimageAllCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginReimageAllOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.VMInstanceIDs != nil {
+ if err := runtime.MarshalAsJSON(req, *options.VMInstanceIDs); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// BeginRestart - Restarts one or more virtual machines in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientBeginRestartOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginRestart
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginRestart(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginRestartOptions) (*runtime.Poller[VirtualMachineScaleSetsClientRestartResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.restart(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientRestartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientRestartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Restart - Restarts one or more virtual machines in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) restart(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginRestartOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginRestart"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.restartCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// restartCreateRequest creates the Restart request.
+func (client *VirtualMachineScaleSetsClient) restartCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginRestartOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.VMInstanceIDs != nil {
+ if err := runtime.MarshalAsJSON(req, *options.VMInstanceIDs); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// BeginSetOrchestrationServiceState - Changes ServiceState property for a given service
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the virtual machine scale set to create or update.
+// - parameters - The input object for SetOrchestrationServiceState API.
+// - options - VirtualMachineScaleSetsClientBeginSetOrchestrationServiceStateOptions contains the optional parameters for the
+// VirtualMachineScaleSetsClient.BeginSetOrchestrationServiceState method.
+func (client *VirtualMachineScaleSetsClient) BeginSetOrchestrationServiceState(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters OrchestrationServiceStateInput, options *VirtualMachineScaleSetsClientBeginSetOrchestrationServiceStateOptions) (*runtime.Poller[VirtualMachineScaleSetsClientSetOrchestrationServiceStateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.setOrchestrationServiceState(ctx, resourceGroupName, vmScaleSetName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientSetOrchestrationServiceStateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientSetOrchestrationServiceStateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// SetOrchestrationServiceState - Changes ServiceState property for a given service
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) setOrchestrationServiceState(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters OrchestrationServiceStateInput, options *VirtualMachineScaleSetsClientBeginSetOrchestrationServiceStateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginSetOrchestrationServiceState"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.setOrchestrationServiceStateCreateRequest(ctx, resourceGroupName, vmScaleSetName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// setOrchestrationServiceStateCreateRequest creates the SetOrchestrationServiceState request.
+func (client *VirtualMachineScaleSetsClient) setOrchestrationServiceStateCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters OrchestrationServiceStateInput, options *VirtualMachineScaleSetsClientBeginSetOrchestrationServiceStateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/setOrchestrationServiceState"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginStart - Starts one or more virtual machines in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetsClientBeginStartOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginStart
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginStart(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginStartOptions) (*runtime.Poller[VirtualMachineScaleSetsClientStartResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.start(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientStartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientStartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Start - Starts one or more virtual machines in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) start(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginStartOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginStart"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.startCreateRequest(ctx, resourceGroupName, vmScaleSetName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// startCreateRequest creates the Start request.
+func (client *VirtualMachineScaleSetsClient) startCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, options *VirtualMachineScaleSetsClientBeginStartOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.VMInstanceIDs != nil {
+ if err := runtime.MarshalAsJSON(req, *options.VMInstanceIDs); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// BeginUpdate - Update a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set to create or update.
+// - parameters - The scale set object.
+// - options - VirtualMachineScaleSetsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginUpdate
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters VirtualMachineScaleSetUpdate, options *VirtualMachineScaleSetsClientBeginUpdateOptions) (*runtime.Poller[VirtualMachineScaleSetsClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, vmScaleSetName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Update a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters VirtualMachineScaleSetUpdate, options *VirtualMachineScaleSetsClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, vmScaleSetName, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *VirtualMachineScaleSetsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters VirtualMachineScaleSetUpdate, options *VirtualMachineScaleSetsClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.IfMatch != nil {
+ req.Raw().Header["If-Match"] = []string{*options.IfMatch}
+ }
+ if options != nil && options.IfNoneMatch != nil {
+ req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
+ }
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginUpdateInstances - Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - vmInstanceIDs - A list of virtual machine instance IDs from the VM scale set.
+// - options - VirtualMachineScaleSetsClientBeginUpdateInstancesOptions contains the optional parameters for the VirtualMachineScaleSetsClient.BeginUpdateInstances
+// method.
+func (client *VirtualMachineScaleSetsClient) BeginUpdateInstances(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, options *VirtualMachineScaleSetsClientBeginUpdateInstancesOptions) (*runtime.Poller[VirtualMachineScaleSetsClientUpdateInstancesResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.updateInstances(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetsClientUpdateInstancesResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetsClientUpdateInstancesResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// UpdateInstances - Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetsClient) updateInstances(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, options *VirtualMachineScaleSetsClientBeginUpdateInstancesOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetsClient.BeginUpdateInstances"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateInstancesCreateRequest(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateInstancesCreateRequest creates the UpdateInstances request.
+func (client *VirtualMachineScaleSetsClient) updateInstancesCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, options *VirtualMachineScaleSetsClientBeginUpdateInstancesOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, vmInstanceIDs); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetvmextensions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetvmextensions_client.go
new file mode 100644
index 000000000..c16821d83
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetvmextensions_client.go
@@ -0,0 +1,462 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// VirtualMachineScaleSetVMExtensionsClient contains the methods for the VirtualMachineScaleSetVMExtensions group.
+// Don't use this type directly, use NewVirtualMachineScaleSetVMExtensionsClient() instead.
+type VirtualMachineScaleSetVMExtensionsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewVirtualMachineScaleSetVMExtensionsClient creates a new instance of VirtualMachineScaleSetVMExtensionsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewVirtualMachineScaleSetVMExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetVMExtensionsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &VirtualMachineScaleSetVMExtensionsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - The operation to create or update the VMSS VM extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - vmExtensionName - The name of the virtual machine extension.
+// - extensionParameters - Parameters supplied to the Create Virtual Machine Extension operation.
+// - options - VirtualMachineScaleSetVMExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.BeginCreateOrUpdate
+// method.
+func (client *VirtualMachineScaleSetVMExtensionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, extensionParameters VirtualMachineScaleSetVMExtension, options *VirtualMachineScaleSetVMExtensionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualMachineScaleSetVMExtensionsClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, vmScaleSetName, instanceID, vmExtensionName, extensionParameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMExtensionsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMExtensionsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - The operation to create or update the VMSS VM extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMExtensionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, extensionParameters VirtualMachineScaleSetVMExtension, options *VirtualMachineScaleSetVMExtensionsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMExtensionsClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, vmExtensionName, extensionParameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *VirtualMachineScaleSetVMExtensionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, extensionParameters VirtualMachineScaleSetVMExtension, options *VirtualMachineScaleSetVMExtensionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if vmExtensionName == "" {
+ return nil, errors.New("parameter vmExtensionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmExtensionName}", url.PathEscape(vmExtensionName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - The operation to delete the VMSS VM extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - vmExtensionName - The name of the virtual machine extension.
+// - options - VirtualMachineScaleSetVMExtensionsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.BeginDelete
+// method.
+func (client *VirtualMachineScaleSetVMExtensionsClient) BeginDelete(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, options *VirtualMachineScaleSetVMExtensionsClientBeginDeleteOptions) (*runtime.Poller[VirtualMachineScaleSetVMExtensionsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, vmScaleSetName, instanceID, vmExtensionName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMExtensionsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMExtensionsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - The operation to delete the VMSS VM extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMExtensionsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, options *VirtualMachineScaleSetVMExtensionsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMExtensionsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, vmExtensionName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *VirtualMachineScaleSetVMExtensionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, options *VirtualMachineScaleSetVMExtensionsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if vmExtensionName == "" {
+ return nil, errors.New("parameter vmExtensionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmExtensionName}", url.PathEscape(vmExtensionName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - The operation to get the VMSS VM extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - vmExtensionName - The name of the virtual machine extension.
+// - options - VirtualMachineScaleSetVMExtensionsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.Get
+// method.
+func (client *VirtualMachineScaleSetVMExtensionsClient) Get(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, options *VirtualMachineScaleSetVMExtensionsClientGetOptions) (VirtualMachineScaleSetVMExtensionsClientGetResponse, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMExtensionsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, vmExtensionName, options)
+ if err != nil {
+ return VirtualMachineScaleSetVMExtensionsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineScaleSetVMExtensionsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineScaleSetVMExtensionsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *VirtualMachineScaleSetVMExtensionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, options *VirtualMachineScaleSetVMExtensionsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if vmExtensionName == "" {
+ return nil, errors.New("parameter vmExtensionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmExtensionName}", url.PathEscape(vmExtensionName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", *options.Expand)
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *VirtualMachineScaleSetVMExtensionsClient) getHandleResponse(resp *http.Response) (VirtualMachineScaleSetVMExtensionsClientGetResponse, error) {
+ result := VirtualMachineScaleSetVMExtensionsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineScaleSetVMExtension); err != nil {
+ return VirtualMachineScaleSetVMExtensionsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// List - The operation to get all extensions of an instance in Virtual Machine Scaleset.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMExtensionsClientListOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.List
+// method.
+func (client *VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMExtensionsClientListOptions) (VirtualMachineScaleSetVMExtensionsClientListResponse, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMExtensionsClient.List"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.listCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return VirtualMachineScaleSetVMExtensionsClientListResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineScaleSetVMExtensionsClientListResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineScaleSetVMExtensionsClientListResponse{}, err
+ }
+ resp, err := client.listHandleResponse(httpResp)
+ return resp, err
+}
+
+// listCreateRequest creates the List request.
+func (client *VirtualMachineScaleSetVMExtensionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMExtensionsClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", *options.Expand)
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *VirtualMachineScaleSetVMExtensionsClient) listHandleResponse(resp *http.Response) (VirtualMachineScaleSetVMExtensionsClientListResponse, error) {
+ result := VirtualMachineScaleSetVMExtensionsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineScaleSetVMExtensionsListResult); err != nil {
+ return VirtualMachineScaleSetVMExtensionsClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginUpdate - The operation to update the VMSS VM extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - vmExtensionName - The name of the virtual machine extension.
+// - extensionParameters - Parameters supplied to the Update Virtual Machine Extension operation.
+// - options - VirtualMachineScaleSetVMExtensionsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMExtensionsClient.BeginUpdate
+// method.
+func (client *VirtualMachineScaleSetVMExtensionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, extensionParameters VirtualMachineScaleSetVMExtensionUpdate, options *VirtualMachineScaleSetVMExtensionsClientBeginUpdateOptions) (*runtime.Poller[VirtualMachineScaleSetVMExtensionsClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, vmScaleSetName, instanceID, vmExtensionName, extensionParameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMExtensionsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMExtensionsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - The operation to update the VMSS VM extension.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMExtensionsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, extensionParameters VirtualMachineScaleSetVMExtensionUpdate, options *VirtualMachineScaleSetVMExtensionsClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMExtensionsClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, vmExtensionName, extensionParameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *VirtualMachineScaleSetVMExtensionsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, vmExtensionName string, extensionParameters VirtualMachineScaleSetVMExtensionUpdate, options *VirtualMachineScaleSetVMExtensionsClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if vmExtensionName == "" {
+ return nil, errors.New("parameter vmExtensionName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmExtensionName}", url.PathEscape(vmExtensionName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, extensionParameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetvmruncommands_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetvmruncommands_client.go
new file mode 100644
index 000000000..85e67fc55
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetvmruncommands_client.go
@@ -0,0 +1,462 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// VirtualMachineScaleSetVMRunCommandsClient contains the methods for the VirtualMachineScaleSetVMRunCommands group.
+// Don't use this type directly, use NewVirtualMachineScaleSetVMRunCommandsClient() instead.
+type VirtualMachineScaleSetVMRunCommandsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewVirtualMachineScaleSetVMRunCommandsClient creates a new instance of VirtualMachineScaleSetVMRunCommandsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewVirtualMachineScaleSetVMRunCommandsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetVMRunCommandsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &VirtualMachineScaleSetVMRunCommandsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginCreateOrUpdate - The operation to create or update the VMSS VM run command.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - runCommandName - The name of the virtual machine run command.
+// - runCommand - Parameters supplied to the Create Virtual Machine RunCommand operation.
+// - options - VirtualMachineScaleSetVMRunCommandsClientBeginCreateOrUpdateOptions contains the optional parameters for the
+// VirtualMachineScaleSetVMRunCommandsClient.BeginCreateOrUpdate method.
+func (client *VirtualMachineScaleSetVMRunCommandsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommand, options *VirtualMachineScaleSetVMRunCommandsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualMachineScaleSetVMRunCommandsClientCreateOrUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.createOrUpdate(ctx, resourceGroupName, vmScaleSetName, instanceID, runCommandName, runCommand, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMRunCommandsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMRunCommandsClientCreateOrUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// CreateOrUpdate - The operation to create or update the VMSS VM run command.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMRunCommandsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommand, options *VirtualMachineScaleSetVMRunCommandsClientBeginCreateOrUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMRunCommandsClient.BeginCreateOrUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, runCommandName, runCommand, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// createOrUpdateCreateRequest creates the CreateOrUpdate request.
+func (client *VirtualMachineScaleSetVMRunCommandsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommand, options *VirtualMachineScaleSetVMRunCommandsClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if runCommandName == "" {
+ return nil, errors.New("parameter runCommandName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{runCommandName}", url.PathEscape(runCommandName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json, text/json"}
+ if err := runtime.MarshalAsJSON(req, runCommand); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDelete - The operation to delete the VMSS VM run command.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - runCommandName - The name of the virtual machine run command.
+// - options - VirtualMachineScaleSetVMRunCommandsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.BeginDelete
+// method.
+func (client *VirtualMachineScaleSetVMRunCommandsClient) BeginDelete(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, options *VirtualMachineScaleSetVMRunCommandsClientBeginDeleteOptions) (*runtime.Poller[VirtualMachineScaleSetVMRunCommandsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, vmScaleSetName, instanceID, runCommandName, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMRunCommandsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMRunCommandsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - The operation to delete the VMSS VM run command.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMRunCommandsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, options *VirtualMachineScaleSetVMRunCommandsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMRunCommandsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, runCommandName, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *VirtualMachineScaleSetVMRunCommandsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, options *VirtualMachineScaleSetVMRunCommandsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if runCommandName == "" {
+ return nil, errors.New("parameter runCommandName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{runCommandName}", url.PathEscape(runCommandName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json, text/json"}
+ return req, nil
+}
+
+// Get - The operation to get the VMSS VM run command.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - runCommandName - The name of the virtual machine run command.
+// - options - VirtualMachineScaleSetVMRunCommandsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.Get
+// method.
+func (client *VirtualMachineScaleSetVMRunCommandsClient) Get(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, options *VirtualMachineScaleSetVMRunCommandsClientGetOptions) (VirtualMachineScaleSetVMRunCommandsClientGetResponse, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMRunCommandsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, runCommandName, options)
+ if err != nil {
+ return VirtualMachineScaleSetVMRunCommandsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineScaleSetVMRunCommandsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineScaleSetVMRunCommandsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *VirtualMachineScaleSetVMRunCommandsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, options *VirtualMachineScaleSetVMRunCommandsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if runCommandName == "" {
+ return nil, errors.New("parameter runCommandName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{runCommandName}", url.PathEscape(runCommandName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", *options.Expand)
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json, text/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *VirtualMachineScaleSetVMRunCommandsClient) getHandleResponse(resp *http.Response) (VirtualMachineScaleSetVMRunCommandsClientGetResponse, error) {
+ result := VirtualMachineScaleSetVMRunCommandsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineRunCommand); err != nil {
+ return VirtualMachineScaleSetVMRunCommandsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - The operation to get all run commands of an instance in Virtual Machine Scaleset.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMRunCommandsClientListOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.NewListPager
+// method.
+func (client *VirtualMachineScaleSetVMRunCommandsClient) NewListPager(resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMRunCommandsClientListOptions) *runtime.Pager[VirtualMachineScaleSetVMRunCommandsClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachineScaleSetVMRunCommandsClientListResponse]{
+ More: func(page VirtualMachineScaleSetVMRunCommandsClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachineScaleSetVMRunCommandsClientListResponse) (VirtualMachineScaleSetVMRunCommandsClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachineScaleSetVMRunCommandsClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ }, nil)
+ if err != nil {
+ return VirtualMachineScaleSetVMRunCommandsClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *VirtualMachineScaleSetVMRunCommandsClient) listCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMRunCommandsClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", *options.Expand)
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json, text/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *VirtualMachineScaleSetVMRunCommandsClient) listHandleResponse(resp *http.Response) (VirtualMachineScaleSetVMRunCommandsClientListResponse, error) {
+ result := VirtualMachineScaleSetVMRunCommandsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineRunCommandsListResult); err != nil {
+ return VirtualMachineScaleSetVMRunCommandsClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginUpdate - The operation to update the VMSS VM run command.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - runCommandName - The name of the virtual machine run command.
+// - runCommand - Parameters supplied to the Update Virtual Machine RunCommand operation.
+// - options - VirtualMachineScaleSetVMRunCommandsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMRunCommandsClient.BeginUpdate
+// method.
+func (client *VirtualMachineScaleSetVMRunCommandsClient) BeginUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommandUpdate, options *VirtualMachineScaleSetVMRunCommandsClientBeginUpdateOptions) (*runtime.Poller[VirtualMachineScaleSetVMRunCommandsClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, vmScaleSetName, instanceID, runCommandName, runCommand, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMRunCommandsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMRunCommandsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - The operation to update the VMSS VM run command.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMRunCommandsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommandUpdate, options *VirtualMachineScaleSetVMRunCommandsClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMRunCommandsClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, runCommandName, runCommand, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *VirtualMachineScaleSetVMRunCommandsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommandUpdate, options *VirtualMachineScaleSetVMRunCommandsClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if runCommandName == "" {
+ return nil, errors.New("parameter runCommandName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{runCommandName}", url.PathEscape(runCommandName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json, text/json"}
+ if err := runtime.MarshalAsJSON(req, runCommand); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetvms_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetvms_client.go
new file mode 100644
index 000000000..379ae96b2
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinescalesetvms_client.go
@@ -0,0 +1,1494 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strconv"
+ "strings"
+)
+
+// VirtualMachineScaleSetVMsClient contains the methods for the VirtualMachineScaleSetVMs group.
+// Don't use this type directly, use NewVirtualMachineScaleSetVMsClient() instead.
+type VirtualMachineScaleSetVMsClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewVirtualMachineScaleSetVMsClient creates a new instance of VirtualMachineScaleSetVMsClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewVirtualMachineScaleSetVMsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineScaleSetVMsClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &VirtualMachineScaleSetVMsClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// BeginApproveRollingUpgrade - Approve upgrade on deferred rolling upgrade for OS disk on a VM scale set instance.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginApproveRollingUpgrade
+// method.
+func (client *VirtualMachineScaleSetVMsClient) BeginApproveRollingUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientApproveRollingUpgradeResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.approveRollingUpgrade(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientApproveRollingUpgradeResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientApproveRollingUpgradeResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// ApproveRollingUpgrade - Approve upgrade on deferred rolling upgrade for OS disk on a VM scale set instance.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMsClient) approveRollingUpgrade(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.BeginApproveRollingUpgrade"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.approveRollingUpgradeCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// approveRollingUpgradeCreateRequest creates the ApproveRollingUpgrade request.
+func (client *VirtualMachineScaleSetVMsClient) approveRollingUpgradeCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginApproveRollingUpgradeOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/approveRollingUpgrade"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginAttachDetachDataDisks - Attach and detach data disks to/from a virtual machine in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - parameters - Parameters supplied to the attach and detach data disks operation on a Virtual Machine Scale Sets VM.
+// - options - VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginAttachDetachDataDisks
+// method.
+func (client *VirtualMachineScaleSetVMsClient) BeginAttachDetachDataDisks(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters AttachDetachDataDisksRequest, options *VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientAttachDetachDataDisksResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.attachDetachDataDisks(ctx, resourceGroupName, vmScaleSetName, instanceID, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientAttachDetachDataDisksResponse]{
+ FinalStateVia: runtime.FinalStateViaLocation,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientAttachDetachDataDisksResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// AttachDetachDataDisks - Attach and detach data disks to/from a virtual machine in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMsClient) attachDetachDataDisks(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters AttachDetachDataDisksRequest, options *VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.BeginAttachDetachDataDisks"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.attachDetachDataDisksCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// attachDetachDataDisksCreateRequest creates the AttachDetachDataDisks request.
+func (client *VirtualMachineScaleSetVMsClient) attachDetachDataDisksCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters AttachDetachDataDisksRequest, options *VirtualMachineScaleSetVMsClientBeginAttachDetachDataDisksOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/attachDetachDataDisks"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// BeginDeallocate - Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases
+// the compute resources it uses. You are not billed for the compute resources of this virtual
+// machine once it is deallocated.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMsClientBeginDeallocateOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginDeallocate
+// method.
+func (client *VirtualMachineScaleSetVMsClient) BeginDeallocate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginDeallocateOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientDeallocateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deallocate(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientDeallocateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientDeallocateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Deallocate - Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the
+// compute resources it uses. You are not billed for the compute resources of this virtual
+// machine once it is deallocated.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMsClient) deallocate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginDeallocateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.BeginDeallocate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deallocateCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deallocateCreateRequest creates the Deallocate request.
+func (client *VirtualMachineScaleSetVMsClient) deallocateCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginDeallocateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/deallocate"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginDelete - Deletes a virtual machine from a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMsClientBeginDeleteOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginDelete
+// method.
+func (client *VirtualMachineScaleSetVMsClient) BeginDelete(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginDeleteOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientDeleteResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.deleteOperation(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientDeleteResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Delete - Deletes a virtual machine from a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMsClient) deleteOperation(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginDeleteOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.BeginDelete"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.deleteCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// deleteCreateRequest creates the Delete request.
+func (client *VirtualMachineScaleSetVMsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginDeleteOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.ForceDeletion != nil {
+ reqQP.Set("forceDeletion", strconv.FormatBool(*options.ForceDeletion))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// Get - Gets a virtual machine from a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMsClientGetOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.Get
+// method.
+func (client *VirtualMachineScaleSetVMsClient) Get(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientGetOptions) (VirtualMachineScaleSetVMsClientGetResponse, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.Get"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return VirtualMachineScaleSetVMsClientGetResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineScaleSetVMsClientGetResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineScaleSetVMsClientGetResponse{}, err
+ }
+ resp, err := client.getHandleResponse(httpResp)
+ return resp, err
+}
+
+// getCreateRequest creates the Get request.
+func (client *VirtualMachineScaleSetVMsClient) getCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientGetOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", string(*options.Expand))
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getHandleResponse handles the Get response.
+func (client *VirtualMachineScaleSetVMsClient) getHandleResponse(resp *http.Response) (VirtualMachineScaleSetVMsClientGetResponse, error) {
+ result := VirtualMachineScaleSetVMsClientGetResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineScaleSetVM); err != nil {
+ return VirtualMachineScaleSetVMsClientGetResponse{}, err
+ }
+ return result, nil
+}
+
+// GetInstanceView - Gets the status of a virtual machine from a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMsClientGetInstanceViewOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.GetInstanceView
+// method.
+func (client *VirtualMachineScaleSetVMsClient) GetInstanceView(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientGetInstanceViewOptions) (VirtualMachineScaleSetVMsClientGetInstanceViewResponse, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.GetInstanceView"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.getInstanceViewCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return VirtualMachineScaleSetVMsClientGetInstanceViewResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineScaleSetVMsClientGetInstanceViewResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineScaleSetVMsClientGetInstanceViewResponse{}, err
+ }
+ resp, err := client.getInstanceViewHandleResponse(httpResp)
+ return resp, err
+}
+
+// getInstanceViewCreateRequest creates the GetInstanceView request.
+func (client *VirtualMachineScaleSetVMsClient) getInstanceViewCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientGetInstanceViewOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/instanceView"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// getInstanceViewHandleResponse handles the GetInstanceView response.
+func (client *VirtualMachineScaleSetVMsClient) getInstanceViewHandleResponse(resp *http.Response) (VirtualMachineScaleSetVMsClientGetInstanceViewResponse, error) {
+ result := VirtualMachineScaleSetVMsClientGetInstanceViewResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineScaleSetVMInstanceView); err != nil {
+ return VirtualMachineScaleSetVMsClientGetInstanceViewResponse{}, err
+ }
+ return result, nil
+}
+
+// NewListPager - Gets a list of all virtual machines in a VM scale sets.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - virtualMachineScaleSetName - The name of the VM scale set.
+// - options - VirtualMachineScaleSetVMsClientListOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.NewListPager
+// method.
+func (client *VirtualMachineScaleSetVMsClient) NewListPager(resourceGroupName string, virtualMachineScaleSetName string, options *VirtualMachineScaleSetVMsClientListOptions) *runtime.Pager[VirtualMachineScaleSetVMsClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachineScaleSetVMsClientListResponse]{
+ More: func(page VirtualMachineScaleSetVMsClientListResponse) bool {
+ return page.NextLink != nil && len(*page.NextLink) > 0
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachineScaleSetVMsClientListResponse) (VirtualMachineScaleSetVMsClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachineScaleSetVMsClient.NewListPager")
+ nextLink := ""
+ if page != nil {
+ nextLink = *page.NextLink
+ }
+ resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) {
+ return client.listCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, options)
+ }, nil)
+ if err != nil {
+ return VirtualMachineScaleSetVMsClientListResponse{}, err
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *VirtualMachineScaleSetVMsClient) listCreateRequest(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, options *VirtualMachineScaleSetVMsClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if virtualMachineScaleSetName == "" {
+ return nil, errors.New("parameter virtualMachineScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{virtualMachineScaleSetName}", url.PathEscape(virtualMachineScaleSetName))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ if options != nil && options.Expand != nil {
+ reqQP.Set("$expand", *options.Expand)
+ }
+ if options != nil && options.Filter != nil {
+ reqQP.Set("$filter", *options.Filter)
+ }
+ if options != nil && options.Select != nil {
+ reqQP.Set("$select", *options.Select)
+ }
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *VirtualMachineScaleSetVMsClient) listHandleResponse(resp *http.Response) (VirtualMachineScaleSetVMsClientListResponse, error) {
+ result := VirtualMachineScaleSetVMsClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineScaleSetVMListResult); err != nil {
+ return VirtualMachineScaleSetVMsClientListResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginPerformMaintenance - Performs maintenance on a virtual machine in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMsClientBeginPerformMaintenanceOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginPerformMaintenance
+// method.
+func (client *VirtualMachineScaleSetVMsClient) BeginPerformMaintenance(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginPerformMaintenanceOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientPerformMaintenanceResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.performMaintenance(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientPerformMaintenanceResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientPerformMaintenanceResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// PerformMaintenance - Performs maintenance on a virtual machine in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMsClient) performMaintenance(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginPerformMaintenanceOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.BeginPerformMaintenance"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.performMaintenanceCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// performMaintenanceCreateRequest creates the PerformMaintenance request.
+func (client *VirtualMachineScaleSetVMsClient) performMaintenanceCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginPerformMaintenanceOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginPowerOff - Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are
+// getting charged for the resources. Instead, use deallocate to release resources and avoid
+// charges.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMsClientBeginPowerOffOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginPowerOff
+// method.
+func (client *VirtualMachineScaleSetVMsClient) BeginPowerOff(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginPowerOffOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientPowerOffResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.powerOff(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientPowerOffResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientPowerOffResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// PowerOff - Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting
+// charged for the resources. Instead, use deallocate to release resources and avoid
+// charges.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMsClient) powerOff(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginPowerOffOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.BeginPowerOff"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.powerOffCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// powerOffCreateRequest creates the PowerOff request.
+func (client *VirtualMachineScaleSetVMsClient) powerOffCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginPowerOffOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.SkipShutdown != nil {
+ reqQP.Set("skipShutdown", strconv.FormatBool(*options.SkipShutdown))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginRedeploy - Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it
+// back on.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMsClientBeginRedeployOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginRedeploy
+// method.
+func (client *VirtualMachineScaleSetVMsClient) BeginRedeploy(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginRedeployOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientRedeployResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.redeploy(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientRedeployResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientRedeployResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Redeploy - Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back
+// on.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMsClient) redeploy(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginRedeployOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.BeginRedeploy"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.redeployCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// redeployCreateRequest creates the Redeploy request.
+func (client *VirtualMachineScaleSetVMsClient) redeployCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginRedeployOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginReimage - Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMsClientBeginReimageOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginReimage
+// method.
+func (client *VirtualMachineScaleSetVMsClient) BeginReimage(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginReimageOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientReimageResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.reimage(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientReimageResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientReimageResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Reimage - Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMsClient) reimage(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginReimageOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.BeginReimage"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.reimageCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// reimageCreateRequest creates the Reimage request.
+func (client *VirtualMachineScaleSetVMsClient) reimageCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginReimageOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/reimage"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.VMScaleSetVMReimageInput != nil {
+ if err := runtime.MarshalAsJSON(req, *options.VMScaleSetVMReimageInput); err != nil {
+ return nil, err
+ }
+ return req, nil
+ }
+ return req, nil
+}
+
+// BeginReimageAll - Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation
+// is only supported for managed disks.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMsClientBeginReimageAllOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginReimageAll
+// method.
+func (client *VirtualMachineScaleSetVMsClient) BeginReimageAll(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginReimageAllOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientReimageAllResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.reimageAll(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientReimageAllResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientReimageAllResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// ReimageAll - Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation
+// is only supported for managed disks.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMsClient) reimageAll(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginReimageAllOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.BeginReimageAll"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.reimageAllCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// reimageAllCreateRequest creates the ReimageAll request.
+func (client *VirtualMachineScaleSetVMsClient) reimageAllCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginReimageAllOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/reimageall"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginRestart - Restarts a virtual machine in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMsClientBeginRestartOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginRestart
+// method.
+func (client *VirtualMachineScaleSetVMsClient) BeginRestart(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginRestartOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientRestartResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.restart(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientRestartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientRestartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Restart - Restarts a virtual machine in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMsClient) restart(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginRestartOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.BeginRestart"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.restartCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// restartCreateRequest creates the Restart request.
+func (client *VirtualMachineScaleSetVMsClient) restartCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginRestartOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// RetrieveBootDiagnosticsData - The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM
+// scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.RetrieveBootDiagnosticsData
+// method.
+func (client *VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsData(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataOptions) (VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataResponse, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.RetrieveBootDiagnosticsData"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.retrieveBootDiagnosticsDataCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataResponse{}, err
+ }
+ resp, err := client.retrieveBootDiagnosticsDataHandleResponse(httpResp)
+ return resp, err
+}
+
+// retrieveBootDiagnosticsDataCreateRequest creates the RetrieveBootDiagnosticsData request.
+func (client *VirtualMachineScaleSetVMsClient) retrieveBootDiagnosticsDataCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/retrieveBootDiagnosticsData"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ if options != nil && options.SasURIExpirationTimeInMinutes != nil {
+ reqQP.Set("sasUriExpirationTimeInMinutes", strconv.FormatInt(int64(*options.SasURIExpirationTimeInMinutes), 10))
+ }
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// retrieveBootDiagnosticsDataHandleResponse handles the RetrieveBootDiagnosticsData response.
+func (client *VirtualMachineScaleSetVMsClient) retrieveBootDiagnosticsDataHandleResponse(resp *http.Response) (VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataResponse, error) {
+ result := VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.RetrieveBootDiagnosticsDataResult); err != nil {
+ return VirtualMachineScaleSetVMsClientRetrieveBootDiagnosticsDataResponse{}, err
+ }
+ return result, nil
+}
+
+// BeginRunCommand - Run command on a virtual machine in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - parameters - Parameters supplied to the Run command operation.
+// - options - VirtualMachineScaleSetVMsClientBeginRunCommandOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginRunCommand
+// method.
+func (client *VirtualMachineScaleSetVMsClient) BeginRunCommand(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters RunCommandInput, options *VirtualMachineScaleSetVMsClientBeginRunCommandOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientRunCommandResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.runCommand(ctx, resourceGroupName, vmScaleSetName, instanceID, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientRunCommandResponse]{
+ FinalStateVia: runtime.FinalStateViaLocation,
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientRunCommandResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// RunCommand - Run command on a virtual machine in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMsClient) runCommand(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters RunCommandInput, options *VirtualMachineScaleSetVMsClientBeginRunCommandOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.BeginRunCommand"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.runCommandCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// runCommandCreateRequest creates the RunCommand request.
+func (client *VirtualMachineScaleSetVMsClient) runCommandCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters RunCommandInput, options *VirtualMachineScaleSetVMsClientBeginRunCommandOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json, text/json"}
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
+
+// SimulateEviction - The operation to simulate the eviction of spot virtual machine in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMsClientSimulateEvictionOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.SimulateEviction
+// method.
+func (client *VirtualMachineScaleSetVMsClient) SimulateEviction(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientSimulateEvictionOptions) (VirtualMachineScaleSetVMsClientSimulateEvictionResponse, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.SimulateEviction"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.simulateEvictionCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return VirtualMachineScaleSetVMsClientSimulateEvictionResponse{}, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineScaleSetVMsClientSimulateEvictionResponse{}, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusNoContent) {
+ err = runtime.NewResponseError(httpResp)
+ return VirtualMachineScaleSetVMsClientSimulateEvictionResponse{}, err
+ }
+ return VirtualMachineScaleSetVMsClientSimulateEvictionResponse{}, nil
+}
+
+// simulateEvictionCreateRequest creates the SimulateEviction request.
+func (client *VirtualMachineScaleSetVMsClient) simulateEvictionCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientSimulateEvictionOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/simulateEviction"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginStart - Starts a virtual machine in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set.
+// - instanceID - The instance ID of the virtual machine.
+// - options - VirtualMachineScaleSetVMsClientBeginStartOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginStart
+// method.
+func (client *VirtualMachineScaleSetVMsClient) BeginStart(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginStartOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientStartResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.start(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientStartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientStartResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Start - Starts a virtual machine in a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMsClient) start(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginStartOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.BeginStart"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.startCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// startCreateRequest creates the Start request.
+func (client *VirtualMachineScaleSetVMsClient) startCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, options *VirtualMachineScaleSetVMsClientBeginStartOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// BeginUpdate - Updates a virtual machine of a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+// - resourceGroupName - The name of the resource group.
+// - vmScaleSetName - The name of the VM scale set where the extension should be create or updated.
+// - instanceID - The instance ID of the virtual machine.
+// - parameters - Parameters supplied to the Update Virtual Machine Scale Sets VM operation.
+// - options - VirtualMachineScaleSetVMsClientBeginUpdateOptions contains the optional parameters for the VirtualMachineScaleSetVMsClient.BeginUpdate
+// method.
+func (client *VirtualMachineScaleSetVMsClient) BeginUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters VirtualMachineScaleSetVM, options *VirtualMachineScaleSetVMsClientBeginUpdateOptions) (*runtime.Poller[VirtualMachineScaleSetVMsClientUpdateResponse], error) {
+ if options == nil || options.ResumeToken == "" {
+ resp, err := client.update(ctx, resourceGroupName, vmScaleSetName, instanceID, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[VirtualMachineScaleSetVMsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ return poller, err
+ } else {
+ return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[VirtualMachineScaleSetVMsClientUpdateResponse]{
+ Tracer: client.internal.Tracer(),
+ })
+ }
+}
+
+// Update - Updates a virtual machine of a VM scale set.
+// If the operation fails it returns an *azcore.ResponseError type.
+//
+// Generated from API version 2024-03-01
+func (client *VirtualMachineScaleSetVMsClient) update(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters VirtualMachineScaleSetVM, options *VirtualMachineScaleSetVMsClientBeginUpdateOptions) (*http.Response, error) {
+ var err error
+ const operationName = "VirtualMachineScaleSetVMsClient.BeginUpdate"
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName)
+ ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil)
+ defer func() { endSpan(err) }()
+ req, err := client.updateCreateRequest(ctx, resourceGroupName, vmScaleSetName, instanceID, parameters, options)
+ if err != nil {
+ return nil, err
+ }
+ httpResp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return nil, err
+ }
+ if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) {
+ err = runtime.NewResponseError(httpResp)
+ return nil, err
+ }
+ return httpResp, nil
+}
+
+// updateCreateRequest creates the Update request.
+func (client *VirtualMachineScaleSetVMsClient) updateCreateRequest(ctx context.Context, resourceGroupName string, vmScaleSetName string, instanceID string, parameters VirtualMachineScaleSetVM, options *VirtualMachineScaleSetVMsClientBeginUpdateOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}"
+ if resourceGroupName == "" {
+ return nil, errors.New("parameter resourceGroupName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
+ if vmScaleSetName == "" {
+ return nil, errors.New("parameter vmScaleSetName cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{vmScaleSetName}", url.PathEscape(vmScaleSetName))
+ if instanceID == "" {
+ return nil, errors.New("parameter instanceID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{instanceId}", url.PathEscape(instanceID))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ if options != nil && options.IfMatch != nil {
+ req.Raw().Header["If-Match"] = []string{*options.IfMatch}
+ }
+ if options != nil && options.IfNoneMatch != nil {
+ req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch}
+ }
+ if err := runtime.MarshalAsJSON(req, parameters); err != nil {
+ return nil, err
+ }
+ return req, nil
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinesizes_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinesizes_client.go
new file mode 100644
index 000000000..80a7316ac
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6/virtualmachinesizes_client.go
@@ -0,0 +1,106 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+package armcompute
+
+import (
+ "context"
+ "errors"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// VirtualMachineSizesClient contains the methods for the VirtualMachineSizes group.
+// Don't use this type directly, use NewVirtualMachineSizesClient() instead.
+type VirtualMachineSizesClient struct {
+ internal *arm.Client
+ subscriptionID string
+}
+
+// NewVirtualMachineSizesClient creates a new instance of VirtualMachineSizesClient with the specified values.
+// - subscriptionID - Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+// part of the URI for every service call.
+// - credential - used to authorize requests. Usually a credential from azidentity.
+// - options - pass nil to accept the default values.
+func NewVirtualMachineSizesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineSizesClient, error) {
+ cl, err := arm.NewClient(moduleName, moduleVersion, credential, options)
+ if err != nil {
+ return nil, err
+ }
+ client := &VirtualMachineSizesClient{
+ subscriptionID: subscriptionID,
+ internal: cl,
+ }
+ return client, nil
+}
+
+// NewListPager - This API is deprecated. Use Resources Skus [https://docs.microsoft.com/rest/api/compute/resourceskus/list]
+//
+// Generated from API version 2024-03-01
+// - location - The location upon which virtual-machine-sizes is queried.
+// - options - VirtualMachineSizesClientListOptions contains the optional parameters for the VirtualMachineSizesClient.NewListPager
+// method.
+func (client *VirtualMachineSizesClient) NewListPager(location string, options *VirtualMachineSizesClientListOptions) *runtime.Pager[VirtualMachineSizesClientListResponse] {
+ return runtime.NewPager(runtime.PagingHandler[VirtualMachineSizesClientListResponse]{
+ More: func(page VirtualMachineSizesClientListResponse) bool {
+ return false
+ },
+ Fetcher: func(ctx context.Context, page *VirtualMachineSizesClientListResponse) (VirtualMachineSizesClientListResponse, error) {
+ ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "VirtualMachineSizesClient.NewListPager")
+ req, err := client.listCreateRequest(ctx, location, options)
+ if err != nil {
+ return VirtualMachineSizesClientListResponse{}, err
+ }
+ resp, err := client.internal.Pipeline().Do(req)
+ if err != nil {
+ return VirtualMachineSizesClientListResponse{}, err
+ }
+ if !runtime.HasStatusCode(resp, http.StatusOK) {
+ return VirtualMachineSizesClientListResponse{}, runtime.NewResponseError(resp)
+ }
+ return client.listHandleResponse(resp)
+ },
+ Tracer: client.internal.Tracer(),
+ })
+}
+
+// listCreateRequest creates the List request.
+func (client *VirtualMachineSizesClient) listCreateRequest(ctx context.Context, location string, options *VirtualMachineSizesClientListOptions) (*policy.Request, error) {
+ urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes"
+ if location == "" {
+ return nil, errors.New("parameter location cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location))
+ if client.subscriptionID == "" {
+ return nil, errors.New("parameter client.subscriptionID cannot be empty")
+ }
+ urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
+ req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath))
+ if err != nil {
+ return nil, err
+ }
+ reqQP := req.Raw().URL.Query()
+ reqQP.Set("api-version", "2024-03-01")
+ req.Raw().URL.RawQuery = reqQP.Encode()
+ req.Raw().Header["Accept"] = []string{"application/json"}
+ return req, nil
+}
+
+// listHandleResponse handles the List response.
+func (client *VirtualMachineSizesClient) listHandleResponse(resp *http.Response) (VirtualMachineSizesClientListResponse, error) {
+ result := VirtualMachineSizesClientListResponse{}
+ if err := runtime.UnmarshalAsJSON(resp, &result.VirtualMachineSizeListResult); err != nil {
+ return VirtualMachineSizesClientListResponse{}, err
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/LICENSE b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/LICENSE
new file mode 100644
index 000000000..67db85882
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/LICENSE
@@ -0,0 +1,175 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/NOTICE b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/NOTICE
new file mode 100644
index 000000000..0fca886eb
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/NOTICE
@@ -0,0 +1 @@
+Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/awsapi/selectorec2.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/awsapi/selectorec2.go
new file mode 100644
index 000000000..8523d2915
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/awsapi/selectorec2.go
@@ -0,0 +1,12 @@
+package awsapi
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/service/ec2"
+)
+
+type SelectorInterface interface {
+ ec2.DescribeInstanceTypeOfferingsAPIClient
+ ec2.DescribeInstanceTypesAPIClient
+ DescribeAvailabilityZones(ctx context.Context, params *ec2.DescribeAvailabilityZonesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeAvailabilityZonesOutput, error)
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity/bytequantity.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity/bytequantity.go
new file mode 100644
index 000000000..b442a2cd6
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity/bytequantity.go
@@ -0,0 +1,153 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+package bytequantity
+
+import (
+ "fmt"
+ "math"
+ "regexp"
+ "strconv"
+ "strings"
+)
+
+const (
+ /// Examples: 1mb, 1 gb, 1.0tb, 1mib, 2g, 2.001 t
+ byteQuantityRegex = `^([0-9]+\.?[0-9]{0,3})[ ]?(mi?b?|gi?b?|ti?b?)?$`
+ mib = "MiB"
+ gib = "GiB"
+ tib = "TiB"
+ gbConvert = 1 << 10
+ tbConvert = gbConvert << 10
+ maxGiB = math.MaxUint64 / gbConvert
+ maxTiB = math.MaxUint64 / tbConvert
+)
+
+// ByteQuantity is a data type representing a byte quantity
+type ByteQuantity struct {
+ Quantity uint64
+}
+
+// ParseToByteQuantity parses a string representation of a byte quantity to a ByteQuantity type.
+// A unit can be appended such as 16 GiB. If no unit is appended, GiB is assumed.
+func ParseToByteQuantity(byteQuantityStr string) (ByteQuantity, error) {
+ bqRegexp := regexp.MustCompile(byteQuantityRegex)
+ matches := bqRegexp.FindStringSubmatch(strings.ToLower(byteQuantityStr))
+ if len(matches) < 2 {
+ return ByteQuantity{}, fmt.Errorf("%s is not a valid byte quantity", byteQuantityStr)
+ }
+
+ quantityStr := matches[1]
+ unit := gib
+ if len(matches) > 2 && matches[2] != "" {
+ unit = matches[2]
+ }
+ quantity := uint64(0)
+ switch strings.ToLower(string(unit[0])) {
+ //mib
+ case "m":
+ inputDecSplit := strings.Split(quantityStr, ".")
+ if len(inputDecSplit) == 2 {
+ d, err := strconv.Atoi(inputDecSplit[1])
+ if err != nil {
+ return ByteQuantity{}, err
+ }
+ if d != 0 {
+ return ByteQuantity{}, fmt.Errorf("cannot accept floating point MB value, only integers are accepted")
+ }
+ }
+ // need error here so that this quantity doesn't bind in the local scope
+ var err error
+ quantity, err = strconv.ParseUint(inputDecSplit[0], 10, 64)
+ if err != nil {
+ return ByteQuantity{}, err
+ }
+ //gib
+ case "g":
+ quantityDec, err := strconv.ParseFloat(quantityStr, 10)
+ if err != nil {
+ return ByteQuantity{}, err
+ }
+ if quantityDec > maxGiB {
+ return ByteQuantity{}, fmt.Errorf("error GiB value is too large")
+ }
+ quantity = uint64(quantityDec * gbConvert)
+ //tib
+ case "t":
+ quantityDec, err := strconv.ParseFloat(quantityStr, 10)
+ if err != nil {
+ return ByteQuantity{}, err
+ }
+ if quantityDec > maxTiB {
+ return ByteQuantity{}, fmt.Errorf("error TiB value is too large")
+ }
+ quantity = uint64(quantityDec * tbConvert)
+ default:
+ return ByteQuantity{}, fmt.Errorf("error unit %s is not supported", unit)
+ }
+
+ return ByteQuantity{
+ Quantity: quantity,
+ }, nil
+}
+
+// FromTiB returns a byte quantity of the passed in tebibytes quantity
+func FromTiB(tib uint64) ByteQuantity {
+ return ByteQuantity{
+ Quantity: tib * tbConvert,
+ }
+}
+
+// FromGiB returns a byte quantity of the passed in gibibytes quantity
+func FromGiB(gib uint64) ByteQuantity {
+ return ByteQuantity{
+ Quantity: gib * gbConvert,
+ }
+}
+
+// FromMiB returns a byte quantity of the passed in mebibytes quantity
+func FromMiB(mib uint64) ByteQuantity {
+ return ByteQuantity{
+ Quantity: mib,
+ }
+}
+
+// StringMiB returns a byte quantity in a mebibytes string representation
+func (bq ByteQuantity) StringMiB() string {
+ return fmt.Sprintf("%.0f %s", bq.MiB(), mib)
+}
+
+// StringGiB returns a byte quantity in a gibibytes string representation
+func (bq ByteQuantity) StringGiB() string {
+ return fmt.Sprintf("%.3f %s", bq.GiB(), gib)
+}
+
+// StringTiB returns a byte quantity in a tebibytes string representation
+func (bq ByteQuantity) StringTiB() string {
+ return fmt.Sprintf("%.3f %s", bq.TiB(), tib)
+}
+
+// MiB returns a byte quantity in mebibytes
+func (bq ByteQuantity) MiB() float64 {
+ return float64(bq.Quantity)
+}
+
+// GiB returns a byte quantity in gibibytes
+func (bq ByteQuantity) GiB() float64 {
+ return float64(bq.Quantity) * 1 / gbConvert
+}
+
+// TiB returns a byte quantity in tebibytes
+func (bq ByteQuantity) TiB() float64 {
+ return float64(bq.Quantity) * 1 / tbConvert
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing/ec2pricing.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing/ec2pricing.go
new file mode 100644
index 000000000..18e7f5fc1
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing/ec2pricing.go
@@ -0,0 +1,128 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+package ec2pricing
+
+import (
+ "context"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/service/ec2"
+ ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ "github.com/aws/aws-sdk-go-v2/service/pricing"
+ "go.uber.org/multierr"
+)
+
+const (
+ productDescription = "Linux/UNIX (Amazon VPC)"
+ serviceCode = "AmazonEC2"
+)
+
+var (
+ DefaultSpotDaysBack = 30
+)
+
+// EC2Pricing is the public struct to interface with AWS pricing APIs
+type EC2Pricing struct {
+ ODPricing *OnDemandPricing
+ SpotPricing *SpotPricing
+}
+
+// EC2PricingIface is the EC2Pricing interface mainly used to mock out ec2pricing during testing
+type EC2PricingIface interface {
+ GetOnDemandInstanceTypeCost(ctx context.Context, instanceType ec2types.InstanceType) (float64, error)
+ GetSpotInstanceTypeNDayAvgCost(ctx context.Context, instanceType ec2types.InstanceType, availabilityZones []string, days int) (float64, error)
+ RefreshOnDemandCache(ctx context.Context) error
+ RefreshSpotCache(ctx context.Context, days int) error
+ OnDemandCacheCount() int
+ SpotCacheCount() int
+ Save() error
+}
+
+// use us-east-1 since pricing only has endpoints in us-east-1 and ap-south-1
+// TODO: In the future we may want to allow the client to select which endpoint is used through some mechanism
+// but that would likely happen through overriding this entire function as its signature is fixed
+func modifyPricingRegion(opt *pricing.Options) {
+ opt.Region = "us-east-1"
+}
+
+// New creates an instance of instance-selector EC2Pricing
+func New(ctx context.Context, cfg aws.Config) (*EC2Pricing, error) {
+ pricingClient := pricing.NewFromConfig(cfg, modifyPricingRegion)
+ ec2Client := ec2.NewFromConfig(cfg)
+ return &EC2Pricing{
+ ODPricing: LoadODCacheOrNew(ctx, pricingClient, cfg.Region, 0, ""),
+ SpotPricing: LoadSpotCacheOrNew(ctx, ec2Client, cfg.Region, 0, "", DefaultSpotDaysBack),
+ }, nil
+}
+
+func NewWithCache(ctx context.Context, cfg aws.Config, ttl time.Duration, cacheDir string) (*EC2Pricing, error) {
+ pricingClient := pricing.NewFromConfig(cfg, modifyPricingRegion)
+ ec2Client := ec2.NewFromConfig(cfg)
+ return &EC2Pricing{
+ ODPricing: LoadODCacheOrNew(ctx, pricingClient, cfg.Region, ttl, cacheDir),
+ SpotPricing: LoadSpotCacheOrNew(ctx, ec2Client, cfg.Region, ttl, cacheDir, DefaultSpotDaysBack),
+ }, nil
+}
+
+// OnDemandCacheCount returns the number of items in the OD cache
+func (p *EC2Pricing) OnDemandCacheCount() int {
+ return p.ODPricing.Count()
+}
+
+// SpotCacheCount returns the number of items in the spot cache
+func (p *EC2Pricing) SpotCacheCount() int {
+ return p.SpotPricing.Count()
+}
+
+// GetSpotInstanceTypeNDayAvgCost retrieves the spot price history for a given AZ from the past N days and averages the price
+// Passing an empty list for availabilityZones will retrieve avg cost for all AZs in the current AWSSession's region
+func (p *EC2Pricing) GetSpotInstanceTypeNDayAvgCost(ctx context.Context, instanceType ec2types.InstanceType, availabilityZones []string, days int) (float64, error) {
+ if len(availabilityZones) == 0 {
+ return p.SpotPricing.Get(ctx, instanceType, "", days)
+ }
+ costs := []float64{}
+ var errs error
+ for _, zone := range availabilityZones {
+ cost, err := p.SpotPricing.Get(ctx, instanceType, zone, days)
+ if err != nil {
+ errs = multierr.Append(errs, err)
+ }
+ costs = append(costs, cost)
+ }
+
+ if len(multierr.Errors(errs)) == len(availabilityZones) {
+ return -1, errs
+ }
+ return costs[0], nil
+}
+
+// GetOnDemandInstanceTypeCost retrieves the on-demand hourly cost for the specified instance type
+func (p *EC2Pricing) GetOnDemandInstanceTypeCost(ctx context.Context, instanceType ec2types.InstanceType) (float64, error) {
+ return p.ODPricing.Get(ctx, instanceType)
+}
+
+// RefreshOnDemandCache makes a bulk request to the pricing api to retrieve all instance type pricing and stores them in a local cache
+func (p *EC2Pricing) RefreshOnDemandCache(ctx context.Context) error {
+ return p.ODPricing.Refresh(ctx)
+}
+
+// RefreshSpotCache makes a bulk request to the ec2 api to retrieve all spot instance type pricing and stores them in a local cache
+func (p *EC2Pricing) RefreshSpotCache(ctx context.Context, days int) error {
+ return p.SpotPricing.Refresh(ctx, days)
+}
+
+func (p *EC2Pricing) Save() error {
+ return multierr.Append(p.ODPricing.Save(), p.SpotPricing.Save())
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing/odpricing.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing/odpricing.go
new file mode 100644
index 000000000..19cde3c7c
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing/odpricing.go
@@ -0,0 +1,326 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+package ec2pricing
+
+import (
+ "context"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io/ioutil"
+ "log"
+ "os"
+ "path/filepath"
+ "strconv"
+ "strings"
+ "sync"
+ "time"
+
+ ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ "github.com/aws/aws-sdk-go-v2/service/pricing"
+ pricingtypes "github.com/aws/aws-sdk-go-v2/service/pricing/types"
+ "github.com/aws/aws-sdk-go/aws/endpoints"
+ "github.com/mitchellh/go-homedir"
+ "github.com/patrickmn/go-cache"
+ "go.uber.org/multierr"
+)
+
+const (
+ ODCacheFileName = "on-demand-pricing-cache.json"
+)
+
+type OnDemandPricing struct {
+ Region string
+ FullRefreshTTL time.Duration
+ DirectoryPath string
+ cache *cache.Cache
+ pricingClient pricing.GetProductsAPIClient
+ sync.RWMutex
+}
+
+type PricingList struct {
+ Product PricingListProduct `json:"product"`
+ ServiceCode string `json:"serviceCode"`
+ Terms ProductTerms `json:"terms"`
+ Version string `json:"version"`
+ PublicationDate string `json:"publicationDate"`
+}
+
+type PricingListProduct struct {
+ ProductFamily string `json:"productFamily"`
+ ProductAttributes map[string]string `json:"attributes"`
+ SKU string `json:"sku"`
+}
+
+type ProductTerms struct {
+ OnDemand map[string]ProductPricingInfo `json:"OnDemand"`
+ Reserved map[string]ProductPricingInfo `json:"Reserved"`
+}
+
+type ProductPricingInfo struct {
+ PriceDimensions map[string]PriceDimensionInfo `json:"priceDimensions"`
+ SKU string `json:"sku"`
+ EffectiveDate string `json:"effectiveDate"`
+ OfferTermCode string `json:"offerTermCode"`
+ TermAttributes map[string]string `json:"termAttributes"`
+}
+
+type PriceDimensionInfo struct {
+ Unit string `json:"unit"`
+ EndRange string `json:"endRange"`
+ Description string `json:"description"`
+ AppliesTo []string `json:"appliesTo"`
+ RateCode string `json:"rateCode"`
+ BeginRange string `json:"beginRange"`
+ PricePerUnit map[string]string `json:"pricePerUnit"`
+}
+
+func LoadODCacheOrNew(ctx context.Context, pricingClient pricing.GetProductsAPIClient, region string, fullRefreshTTL time.Duration, directoryPath string) *OnDemandPricing {
+ expandedDirPath, err := homedir.Expand(directoryPath)
+ if err != nil {
+ log.Printf("Unable to load on-demand pricing cache directory %s: %v", expandedDirPath, err)
+ return &OnDemandPricing{
+ Region: region,
+ FullRefreshTTL: 0,
+ DirectoryPath: directoryPath,
+ cache: cache.New(fullRefreshTTL, fullRefreshTTL),
+ pricingClient: pricingClient,
+ }
+ }
+ odPricing := &OnDemandPricing{
+ Region: region,
+ FullRefreshTTL: fullRefreshTTL,
+ DirectoryPath: expandedDirPath,
+ pricingClient: pricingClient,
+ cache: cache.New(fullRefreshTTL, fullRefreshTTL),
+ }
+ if fullRefreshTTL <= 0 {
+ odPricing.Clear()
+ return odPricing
+ }
+ // Start the cache refresh job
+ go odCacheRefreshJob(ctx, odPricing)
+ odCache, err := loadODCacheFrom(fullRefreshTTL, region, expandedDirPath)
+ if err != nil {
+ if !errors.Is(err, os.ErrNotExist) {
+ log.Printf("An on-demand pricing cache file could not be loaded: %v", err)
+ }
+ return odPricing
+ }
+ odPricing.cache = odCache
+ return odPricing
+}
+
+func loadODCacheFrom(itemTTL time.Duration, region string, expandedDirPath string) (*cache.Cache, error) {
+ cacheBytes, err := os.ReadFile(getODCacheFilePath(region, expandedDirPath))
+ if err != nil {
+ return nil, err
+ }
+ odCache := &map[string]cache.Item{}
+ if err := json.Unmarshal(cacheBytes, odCache); err != nil {
+ return nil, err
+ }
+ c := cache.NewFrom(itemTTL, itemTTL, *odCache)
+ c.DeleteExpired()
+ return c, nil
+}
+
+func getODCacheFilePath(region string, directoryPath string) string {
+ return filepath.Join(directoryPath, fmt.Sprintf("%s-%s", region, ODCacheFileName))
+}
+
+func odCacheRefreshJob(ctx context.Context, odPricing *OnDemandPricing) {
+ if odPricing.FullRefreshTTL <= 0 {
+ return
+ }
+ refreshTicker := time.NewTicker(odPricing.FullRefreshTTL)
+ for range refreshTicker.C {
+ if err := odPricing.Refresh(ctx); err != nil {
+ log.Println(err)
+ }
+ }
+}
+
+func (c *OnDemandPricing) Refresh(ctx context.Context) error {
+ c.Lock()
+ defer c.Unlock()
+ odInstanceTypeCosts, err := c.fetchOnDemandPricing(ctx, "")
+ if err != nil {
+ return fmt.Errorf("there was a problem refreshing the on-demand instance type pricing cache: %v", err)
+ }
+ for instanceType, cost := range odInstanceTypeCosts {
+ c.cache.SetDefault(instanceType, cost)
+ }
+ if err := c.Save(); err != nil {
+ return fmt.Errorf("unable to save the refreshed on-demand instance type pricing cache file: %v", err)
+ }
+ return nil
+}
+
+func (c *OnDemandPricing) Get(ctx context.Context, instanceType ec2types.InstanceType) (float64, error) {
+ if cost, ok := c.cache.Get(string(instanceType)); ok {
+ return cost.(float64), nil
+ }
+ c.RLock()
+ defer c.RUnlock()
+ costs, err := c.fetchOnDemandPricing(ctx, instanceType)
+ if err != nil {
+ return 0, fmt.Errorf("there was a problem fetching on-demand instance type pricing for %s: %v", instanceType, err)
+ }
+ c.cache.SetDefault(string(instanceType), costs[string(instanceType)])
+ return costs[string(instanceType)], nil
+}
+
+// Count of items in the cache
+func (c *OnDemandPricing) Count() int {
+ return c.cache.ItemCount()
+}
+
+func (c *OnDemandPricing) Save() error {
+ if c.FullRefreshTTL == 0 || c.Count() == 0 {
+ return nil
+ }
+ cacheBytes, err := json.Marshal(c.cache.Items())
+ if err != nil {
+ return err
+ }
+ if err := os.Mkdir(c.DirectoryPath, 0755); err != nil && !errors.Is(err, os.ErrExist) {
+ return err
+ }
+ return ioutil.WriteFile(getODCacheFilePath(c.Region, c.DirectoryPath), cacheBytes, 0644)
+}
+
+func (c *OnDemandPricing) Clear() error {
+ c.Lock()
+ defer c.Unlock()
+ c.cache.Flush()
+ return os.Remove(getODCacheFilePath(c.Region, c.DirectoryPath))
+}
+
+// fetchOnDemandPricing makes a bulk request to the pricing api to retrieve all instance type pricing if the instanceType is the empty string
+//
+// or, if instanceType is specified, it can request a specific instance type pricing
+func (c *OnDemandPricing) fetchOnDemandPricing(ctx context.Context, instanceType ec2types.InstanceType) (map[string]float64, error) {
+ odPricing := map[string]float64{}
+ productInput := pricing.GetProductsInput{
+ ServiceCode: c.StringMe(serviceCode),
+ Filters: c.getProductsInputFilters(instanceType),
+ }
+ var processingErr error
+
+ p := pricing.NewGetProductsPaginator(c.pricingClient, &productInput)
+
+ for p.HasMorePages() {
+ pricingOutput, err := p.NextPage(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("failed to get a page, %w", err)
+ }
+
+ for _, priceDoc := range pricingOutput.PriceList {
+ instanceTypeName, price, errParse := c.parseOndemandUnitPrice(priceDoc)
+ if errParse != nil {
+ processingErr = multierr.Append(processingErr, errParse)
+ continue
+ }
+ odPricing[instanceTypeName] = price
+ }
+ }
+ return odPricing, processingErr
+}
+
+// StringMe takes an interface and returns a pointer to a string value
+// If the underlying interface kind is not string or *string then nil is returned
+func (*OnDemandPricing) StringMe(i interface{}) *string {
+ if i == nil {
+ return nil
+ }
+ switch v := i.(type) {
+ case *string:
+ return v
+ case string:
+ return &v
+ default:
+ log.Printf("%s cannot be converted to a string", i)
+ return nil
+ }
+}
+
+func (c *OnDemandPricing) getProductsInputFilters(instanceType ec2types.InstanceType) []pricingtypes.Filter {
+ regionDescription := c.getRegionForPricingAPI()
+ filters := []pricingtypes.Filter{
+ {Type: pricingtypes.FilterTypeTermMatch, Field: c.StringMe("ServiceCode"), Value: c.StringMe(serviceCode)},
+ {Type: pricingtypes.FilterTypeTermMatch, Field: c.StringMe("operatingSystem"), Value: c.StringMe("linux")},
+ {Type: pricingtypes.FilterTypeTermMatch, Field: c.StringMe("location"), Value: c.StringMe(regionDescription)},
+ {Type: pricingtypes.FilterTypeTermMatch, Field: c.StringMe("capacitystatus"), Value: c.StringMe("used")},
+ {Type: pricingtypes.FilterTypeTermMatch, Field: c.StringMe("preInstalledSw"), Value: c.StringMe("NA")},
+ {Type: pricingtypes.FilterTypeTermMatch, Field: c.StringMe("tenancy"), Value: c.StringMe("shared")},
+ }
+ if instanceType != "" {
+ filters = append(filters, pricingtypes.Filter{Type: pricingtypes.FilterTypeTermMatch, Field: c.StringMe("instanceType"), Value: c.StringMe(string(instanceType))})
+ }
+ return filters
+}
+
+// getRegionForPricingAPI attempts to retrieve the region description based on the AWS session used to create
+// the ec2pricing struct. It then uses the endpoints package in the aws sdk to retrieve the region description
+// This is necessary because the pricing API uses the region description rather than a region ID
+func (c *OnDemandPricing) getRegionForPricingAPI() string {
+ endpointResolver := endpoints.DefaultResolver()
+ partitions := endpointResolver.(endpoints.EnumPartitions).Partitions()
+
+ // use us-east-1 as the default
+ regionDescription := "US East (N. Virginia)"
+ for _, partition := range partitions {
+ regions := partition.Regions()
+ if region, ok := regions[c.Region]; ok {
+ regionDescription = region.Description()
+ }
+ }
+
+ // endpoints package returns European regions with the word "Europe," but the pricing API expects the word "EU."
+ // This formatting mismatch is only present with European regions.
+ // So replace "Europe" with "EU" if it exists in the regionDescription string.
+ regionDescription = strings.ReplaceAll(regionDescription, "Europe", "EU")
+
+ return regionDescription
+}
+
+// parseOndemandUnitPrice takes a priceList from the pricing API and parses its weirdness
+func (c *OnDemandPricing) parseOndemandUnitPrice(priceList string) (string, float64, error) {
+ var productPriceList PricingList
+ err := json.Unmarshal([]byte(priceList), &productPriceList)
+ if err != nil {
+ return "", float64(-1.0), fmt.Errorf("unable to parse pricing doc: %w", err)
+ }
+ attributes := productPriceList.Product.ProductAttributes
+ instanceTypeName := attributes["instanceType"]
+
+ for _, priceDimensions := range productPriceList.Terms.OnDemand {
+ dim := priceDimensions.PriceDimensions
+ for _, dimension := range dim {
+ pricePerUnit := dimension.PricePerUnit
+ pricePerUnitInUSDStr, ok := pricePerUnit["USD"]
+ if !ok {
+ return instanceTypeName, float64(-1.0), fmt.Errorf("unable to find on-demand price per unit in USD")
+ }
+ var err error
+ pricePerUnitInUSD, err := strconv.ParseFloat(pricePerUnitInUSDStr, 64)
+ if err != nil {
+ return instanceTypeName, float64(-1.0), fmt.Errorf("could not convert price per unit in USD to a float64")
+ }
+ return instanceTypeName, pricePerUnitInUSD, nil
+ }
+ }
+ return instanceTypeName, float64(-1.0), fmt.Errorf("unable to parse pricing doc")
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing/spotpricing.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing/spotpricing.go
new file mode 100644
index 000000000..cbf56e9fc
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing/spotpricing.go
@@ -0,0 +1,281 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+package ec2pricing
+
+import (
+ "context"
+ "encoding/gob"
+ "errors"
+ "fmt"
+ "log"
+ "math"
+ "os"
+ "path/filepath"
+ "sort"
+ "strconv"
+ "sync"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/service/ec2"
+ ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ "github.com/mitchellh/go-homedir"
+ "github.com/patrickmn/go-cache"
+ "go.uber.org/multierr"
+)
+
+const (
+ SpotCacheFileName = "spot-pricing-cache.gob"
+)
+
+type SpotPricing struct {
+ Region string
+ FullRefreshTTL time.Duration
+ DirectoryPath string
+ cache *cache.Cache
+ ec2Client ec2.DescribeSpotPriceHistoryAPIClient
+ sync.RWMutex
+}
+
+type spotPricingEntry struct {
+ Timestamp time.Time
+ SpotPrice float64
+ Zone string
+}
+
+func LoadSpotCacheOrNew(ctx context.Context, ec2Client ec2.DescribeSpotPriceHistoryAPIClient, region string, fullRefreshTTL time.Duration, directoryPath string, days int) *SpotPricing {
+ expandedDirPath, err := homedir.Expand(directoryPath)
+ if err != nil {
+ log.Printf("Unable to load spot pricing cache directory %s: %v", expandedDirPath, err)
+ return &SpotPricing{
+ Region: region,
+ FullRefreshTTL: 0,
+ DirectoryPath: directoryPath,
+ cache: cache.New(fullRefreshTTL, fullRefreshTTL),
+ ec2Client: ec2Client,
+ }
+ }
+ spotPricing := &SpotPricing{
+ Region: region,
+ FullRefreshTTL: fullRefreshTTL,
+ DirectoryPath: expandedDirPath,
+ ec2Client: ec2Client,
+ cache: cache.New(fullRefreshTTL, fullRefreshTTL),
+ }
+ if fullRefreshTTL <= 0 {
+ spotPricing.Clear()
+ return spotPricing
+ }
+ gob.Register([]*spotPricingEntry{})
+ // Start the cache refresh job
+ go spotCacheRefreshJob(ctx, spotPricing, days)
+ spotCache, err := loadSpotCacheFrom(fullRefreshTTL, region, expandedDirPath)
+ if err != nil {
+ if !errors.Is(err, os.ErrNotExist) {
+ log.Printf("A spot pricing cache file could not be loaded: %v", err)
+ }
+ return spotPricing
+ }
+ spotPricing.cache = spotCache
+ return spotPricing
+}
+
+func loadSpotCacheFrom(itemTTL time.Duration, region string, expandedDirPath string) (*cache.Cache, error) {
+ file, err := os.Open(getSpotCacheFilePath(region, expandedDirPath))
+ if err != nil {
+ return nil, err
+ }
+ decoder := gob.NewDecoder(file)
+ spotTimeSeries := &map[string]cache.Item{}
+ if err := decoder.Decode(spotTimeSeries); err != nil {
+ return nil, err
+ }
+ c := cache.NewFrom(itemTTL, itemTTL, *spotTimeSeries)
+ c.DeleteExpired()
+ return c, nil
+}
+
+func getSpotCacheFilePath(region string, directoryPath string) string {
+ return filepath.Join(directoryPath, fmt.Sprintf("%s-%s", region, SpotCacheFileName))
+}
+
+func spotCacheRefreshJob(ctx context.Context, spotPricing *SpotPricing, days int) {
+ if spotPricing.FullRefreshTTL <= 0 {
+ return
+ }
+ refreshTicker := time.NewTicker(spotPricing.FullRefreshTTL)
+ for range refreshTicker.C {
+ if err := spotPricing.Refresh(ctx, days); err != nil {
+ log.Println(err)
+ }
+ }
+}
+
+func (c *SpotPricing) Refresh(ctx context.Context, days int) error {
+ c.Lock()
+ defer c.Unlock()
+ spotInstanceTypeCosts, err := c.fetchSpotPricingTimeSeries(ctx, "", days)
+ if err != nil {
+ return fmt.Errorf("there was a problem refreshing the spot instance type pricing cache: %v", err)
+ }
+ for instanceTypeAndZone, cost := range spotInstanceTypeCosts {
+ c.cache.SetDefault(instanceTypeAndZone, cost)
+ }
+ if err := c.Save(); err != nil {
+ return fmt.Errorf("unable to save the refreshed spot instance type pricing cache file: %v", err)
+ }
+ return nil
+}
+
+func (c *SpotPricing) Get(ctx context.Context, instanceType ec2types.InstanceType, zone string, days int) (float64, error) {
+ entries, ok := c.cache.Get(string(instanceType))
+ if zone != "" && ok {
+ if !c.contains(zone, entries.([]*spotPricingEntry)) {
+ ok = false
+ }
+ }
+ if !ok {
+ c.RLock()
+ defer c.RUnlock()
+ zonalSpotPricing, err := c.fetchSpotPricingTimeSeries(ctx, instanceType, days)
+ if err != nil {
+ return -1, fmt.Errorf("there was a problem fetching spot instance type pricing for %s: %v", instanceType, err)
+ }
+ for instanceType, costs := range zonalSpotPricing {
+ c.cache.SetDefault(instanceType, costs)
+ }
+ }
+
+ entries, ok = c.cache.Get(string(instanceType))
+ if !ok {
+ return -1, fmt.Errorf("unable to get spot pricing for %s in zone %s for %d days back", instanceType, zone, days)
+ }
+ return c.calculateSpotAggregate(c.filterOn(zone, entries.([]*spotPricingEntry))), nil
+}
+
+func (c *SpotPricing) contains(zone string, entries []*spotPricingEntry) bool {
+ for _, entry := range entries {
+ if entry.Zone == zone {
+ return true
+ }
+ }
+ return false
+}
+
+func (c *SpotPricing) calculateSpotAggregate(spotPriceEntries []*spotPricingEntry) float64 {
+ if len(spotPriceEntries) == 0 {
+ return 0.0
+ }
+ if len(spotPriceEntries) == 1 {
+ return spotPriceEntries[0].SpotPrice
+ }
+ // Sort slice by timestamp in descending order from the end time (most likely, now)
+ sort.Slice(spotPriceEntries, func(i, j int) bool {
+ return spotPriceEntries[i].Timestamp.After(spotPriceEntries[j].Timestamp)
+ })
+
+ endTime := spotPriceEntries[0].Timestamp
+ startTime := spotPriceEntries[len(spotPriceEntries)-1].Timestamp
+ totalDuration := endTime.Sub(startTime).Minutes()
+
+ priceSum := float64(0)
+ for i, entry := range spotPriceEntries {
+ duration := spotPriceEntries[int(math.Max(float64(i-1), 0))].Timestamp.Sub(entry.Timestamp).Minutes()
+ priceSum += duration * entry.SpotPrice
+ }
+ return priceSum / totalDuration
+}
+
+func (c *SpotPricing) filterOn(zone string, pricingEntries []*spotPricingEntry) []*spotPricingEntry {
+ filtered := []*spotPricingEntry{}
+ for _, entry := range pricingEntries {
+ // this takes the first zone, might be better to do all zones instead...
+ if zone == "" {
+ zone = entry.Zone
+ }
+ if entry.Zone == zone {
+ filtered = append(filtered, entry)
+ }
+ }
+ return filtered
+}
+
+// Count of items in the cache
+func (c *SpotPricing) Count() int {
+ return c.cache.ItemCount()
+}
+
+func (c *SpotPricing) Save() error {
+ if c.FullRefreshTTL <= 0 || c.Count() == 0 {
+ return nil
+ }
+ if err := os.Mkdir(c.DirectoryPath, 0755); err != nil && !errors.Is(err, os.ErrExist) {
+ return err
+ }
+ file, err := os.Create(getSpotCacheFilePath(c.Region, c.DirectoryPath))
+ if err != nil {
+ return err
+ }
+ defer file.Close()
+ encoder := gob.NewEncoder(file)
+ return encoder.Encode(c.cache.Items())
+}
+
+func (c *SpotPricing) Clear() error {
+ c.Lock()
+ defer c.Unlock()
+ c.cache.Flush()
+ return os.Remove(getSpotCacheFilePath(c.Region, c.DirectoryPath))
+}
+
+// fetchSpotPricingTimeSeries makes a bulk request to the ec2 api to retrieve all spot instance type pricing for the past n days
+// If instanceType is empty, it will fetch for all instance types
+func (c *SpotPricing) fetchSpotPricingTimeSeries(ctx context.Context, instanceType ec2types.InstanceType, days int) (map[string][]*spotPricingEntry, error) {
+ spotTimeSeries := map[string][]*spotPricingEntry{}
+ endTime := time.Now().UTC()
+ startTime := endTime.Add(time.Hour * time.Duration(24*-1*days))
+ spotPriceHistInput := ec2.DescribeSpotPriceHistoryInput{
+ ProductDescriptions: []string{productDescription},
+ StartTime: &startTime,
+ EndTime: &endTime,
+ }
+ if instanceType != "" {
+ spotPriceHistInput.InstanceTypes = append(spotPriceHistInput.InstanceTypes, instanceType)
+ }
+ var processingErr error
+
+ p := ec2.NewDescribeSpotPriceHistoryPaginator(c.ec2Client, &spotPriceHistInput)
+
+ // Iterate through the Amazon S3 object pages.
+ for p.HasMorePages() {
+ spotHistoryOutput, err := p.NextPage(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("failed to get a page, %w", err)
+ }
+
+ for _, history := range spotHistoryOutput.SpotPriceHistory {
+ spotPrice, errFloat := strconv.ParseFloat(*history.SpotPrice, 64)
+ if errFloat != nil {
+ processingErr = multierr.Append(processingErr, errFloat)
+ continue
+ }
+ spotTimeSeries[string(history.InstanceType)] = append(spotTimeSeries[string(history.InstanceType)], &spotPricingEntry{
+ Timestamp: *history.Timestamp,
+ SpotPrice: spotPrice,
+ Zone: *history.AvailabilityZone,
+ })
+ }
+ }
+
+ return spotTimeSeries, processingErr
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes/instancetypes.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes/instancetypes.go
new file mode 100644
index 000000000..f38512d37
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes/instancetypes.go
@@ -0,0 +1,180 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+package instancetypes
+
+import (
+ "context"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io/ioutil"
+ "log"
+ "os"
+ "path/filepath"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/service/ec2"
+ ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ "github.com/mitchellh/go-homedir"
+ "github.com/patrickmn/go-cache"
+)
+
+var (
+ CacheFileName = "ec2-instance-types.json"
+)
+
+// Details hold all the information on an ec2 instance type
+type Details struct {
+ ec2types.InstanceTypeInfo
+ OndemandPricePerHour *float64
+ SpotPrice *float64
+}
+
+type Provider struct {
+ Region string
+ DirectoryPath string
+ FullRefreshTTL time.Duration
+ lastFullRefresh *time.Time
+ ec2Client ec2.DescribeInstanceTypesAPIClient
+ cache *cache.Cache
+}
+
+func NewProvider(directoryPath string, region string, ttl time.Duration, ec2Client ec2.DescribeInstanceTypesAPIClient) *Provider {
+ expandedDirPath, err := homedir.Expand(directoryPath)
+ if err != nil {
+ log.Printf("Unable to expand instance type cache directory %s: %v", directoryPath, err)
+ }
+ return &Provider{
+ Region: region,
+ DirectoryPath: expandedDirPath,
+ FullRefreshTTL: ttl,
+ ec2Client: ec2Client,
+ cache: cache.New(ttl, ttl),
+ }
+}
+
+func LoadFromOrNew(directoryPath string, region string, ttl time.Duration, ec2Client ec2.DescribeInstanceTypesAPIClient) *Provider {
+ expandedDirPath, err := homedir.Expand(directoryPath)
+ if err != nil {
+ log.Printf("Unable to load instance-type cache directory %s: %v", expandedDirPath, err)
+ return NewProvider(directoryPath, region, ttl, ec2Client)
+ }
+ if ttl <= 0 {
+ provider := NewProvider(directoryPath, region, ttl, ec2Client)
+ provider.Clear()
+ return provider
+ }
+ itCache, err := loadFrom(ttl, region, expandedDirPath)
+ if err != nil {
+ if !errors.Is(err, os.ErrNotExist) {
+ log.Printf("Unable to load instance-type cache from %s: %v", expandedDirPath, err)
+ }
+ return NewProvider(directoryPath, region, ttl, ec2Client)
+ }
+ return &Provider{
+ Region: region,
+ DirectoryPath: expandedDirPath,
+ ec2Client: ec2Client,
+ cache: itCache,
+ }
+}
+
+func loadFrom(ttl time.Duration, region string, expandedDirPath string) (*cache.Cache, error) {
+ itemTTL := ttl + time.Second
+ cacheBytes, err := os.ReadFile(getCacheFilePath(region, expandedDirPath))
+ if err != nil {
+ return nil, err
+ }
+ itCache := &map[string]cache.Item{}
+ if err := json.Unmarshal(cacheBytes, itCache); err != nil {
+ return nil, err
+ }
+ return cache.NewFrom(itemTTL, itemTTL, *itCache), nil
+}
+
+func getCacheFilePath(region string, expandedDirPath string) string {
+ return filepath.Join(expandedDirPath, fmt.Sprintf("%s-%s", region, CacheFileName))
+}
+
+func (p *Provider) Get(ctx context.Context, instanceTypes []ec2types.InstanceType) ([]*Details, error) {
+ instanceTypeDetails := []*Details{}
+ describeInstanceTypeOpts := &ec2.DescribeInstanceTypesInput{}
+ if len(instanceTypes) != 0 {
+ for _, it := range instanceTypes {
+ if cachedIT, ok := p.cache.Get(string(it)); ok {
+ instanceTypeDetails = append(instanceTypeDetails, cachedIT.(*Details))
+ } else {
+ // need to reassign, so we're not sharing the loop iterators memory space
+ instanceType := it
+ describeInstanceTypeOpts.InstanceTypes = append(describeInstanceTypeOpts.InstanceTypes, instanceType)
+ }
+ }
+ } else if p.lastFullRefresh != nil && !p.isFullRefreshNeeded() {
+ for _, item := range p.cache.Items() {
+ instanceTypeDetails = append(instanceTypeDetails, item.Object.(*Details))
+ }
+ return instanceTypeDetails, nil
+ }
+
+ s := ec2.NewDescribeInstanceTypesPaginator(p.ec2Client, &ec2.DescribeInstanceTypesInput{})
+
+ for s.HasMorePages() {
+ instanceTypeOutput, err := s.NextPage(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("failed to get a page, %w", err)
+ }
+
+ for _, instanceTypeInfo := range instanceTypeOutput.InstanceTypes {
+ itDetails := &Details{InstanceTypeInfo: instanceTypeInfo}
+ instanceTypeDetails = append(instanceTypeDetails, itDetails)
+ p.cache.SetDefault(string(instanceTypeInfo.InstanceType), itDetails)
+ }
+ }
+
+ if len(instanceTypes) == 0 {
+ now := time.Now().UTC()
+ p.lastFullRefresh = &now
+ if err := p.Save(); err != nil {
+ return instanceTypeDetails, err
+ }
+ }
+ return instanceTypeDetails, nil
+}
+
+func (p *Provider) isFullRefreshNeeded() bool {
+ return time.Since(*p.lastFullRefresh) > p.FullRefreshTTL
+}
+
+func (p *Provider) Save() error {
+ if p.FullRefreshTTL <= 0 || p.cache.ItemCount() == 0 {
+ return nil
+ }
+ cacheBytes, err := json.Marshal(p.cache.Items())
+ if err != nil {
+ return err
+ }
+ if err := os.Mkdir(p.DirectoryPath, 0755); err != nil && !errors.Is(err, os.ErrExist) {
+ return err
+ }
+ return ioutil.WriteFile(getCacheFilePath(p.Region, p.DirectoryPath), cacheBytes, 0644)
+}
+
+func (p *Provider) Clear() error {
+ p.cache.Flush()
+ return os.Remove(getCacheFilePath(p.Region, p.DirectoryPath))
+}
+
+func (p *Provider) CacheCount() int {
+ return p.cache.ItemCount()
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/aggregates.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/aggregates.go
new file mode 100644
index 000000000..b5f3e613b
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/aggregates.go
@@ -0,0 +1,122 @@
+package selector
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity"
+ "github.com/aws/aws-sdk-go-v2/service/ec2"
+ ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ "regexp"
+)
+
+const (
+ // AggregateLowPercentile is the default lower percentile for resource ranges on similar instance type comparisons
+ AggregateLowPercentile = 0.9
+ // AggregateHighPercentile is the default upper percentile for resource ranges on similar instance type comparisons
+ AggregateHighPercentile = 1.2
+)
+
+// FiltersTransform can be implemented to provide custom transforms
+type FiltersTransform interface {
+ Transform(context.Context, Filters) (Filters, error)
+}
+
+// TransformFn is the func type definition for a FiltersTransform
+type TransformFn func(context.Context, Filters) (Filters, error)
+
+// Transform implements FiltersTransform interface on TransformFn
+// This allows any TransformFn to be passed into funcs accepting FiltersTransform interface
+func (fn TransformFn) Transform(ctx context.Context, filters Filters) (Filters, error) {
+ return fn(ctx, filters)
+}
+
+// TransformBaseInstanceType transforms lower level filters based on the instanceTypeBase specs
+func (itf Selector) TransformBaseInstanceType(ctx context.Context, filters Filters) (Filters, error) {
+ if filters.InstanceTypeBase == nil {
+ return filters, nil
+ }
+ instanceTypesOutput, err := itf.EC2.DescribeInstanceTypes(ctx, &ec2.DescribeInstanceTypesInput{
+ InstanceTypes: []ec2types.InstanceType{
+ ec2types.InstanceType(*filters.InstanceTypeBase),
+ },
+ })
+ if err != nil {
+ return filters, err
+ }
+ if len(instanceTypesOutput.InstanceTypes) == 0 {
+ return filters, fmt.Errorf("error instance type %s is not a valid instance type", *filters.InstanceTypeBase)
+ }
+ instanceTypeInfo := instanceTypesOutput.InstanceTypes[0]
+ if filters.BareMetal == nil {
+ filters.BareMetal = instanceTypeInfo.BareMetal
+ }
+ if filters.CPUArchitecture == nil && len(instanceTypeInfo.ProcessorInfo.SupportedArchitectures) == 1 {
+ filters.CPUArchitecture = &instanceTypeInfo.ProcessorInfo.SupportedArchitectures[0]
+ }
+ if filters.Fpga == nil {
+ isFpgaSupported := instanceTypeInfo.FpgaInfo != nil
+ filters.Fpga = &isFpgaSupported
+ }
+ if filters.GpusRange == nil {
+ gpuCount := int32(0)
+ if instanceTypeInfo.GpuInfo != nil {
+ gpuCount = *getTotalGpusCount(instanceTypeInfo.GpuInfo)
+ }
+ filters.GpusRange = &Int32RangeFilter{LowerBound: gpuCount, UpperBound: gpuCount}
+ }
+ if filters.MemoryRange == nil {
+ lowerBound := bytequantity.ByteQuantity{Quantity: uint64(float64(*instanceTypeInfo.MemoryInfo.SizeInMiB) * AggregateLowPercentile)}
+ upperBound := bytequantity.ByteQuantity{Quantity: uint64(float64(*instanceTypeInfo.MemoryInfo.SizeInMiB) * AggregateHighPercentile)}
+ filters.MemoryRange = &ByteQuantityRangeFilter{LowerBound: lowerBound, UpperBound: upperBound}
+ }
+ if filters.VCpusRange == nil {
+ lowerBound := int32(float32(*instanceTypeInfo.VCpuInfo.DefaultVCpus) * AggregateLowPercentile)
+ upperBound := int32(float32(*instanceTypeInfo.VCpuInfo.DefaultVCpus) * AggregateHighPercentile)
+ filters.VCpusRange = &Int32RangeFilter{LowerBound: lowerBound, UpperBound: upperBound}
+ }
+ if filters.VirtualizationType == nil && len(instanceTypeInfo.SupportedVirtualizationTypes) == 1 {
+ filters.VirtualizationType = &instanceTypeInfo.SupportedVirtualizationTypes[0]
+ }
+ filters.InstanceTypeBase = nil
+
+ return filters, nil
+}
+
+// TransformFlexible transforms lower level filters based on a set of opinions
+func (itf Selector) TransformFlexible(ctx context.Context, filters Filters) (Filters, error) {
+ if filters.Flexible == nil {
+ return filters, nil
+ }
+ if filters.CPUArchitecture == nil {
+ defaultArchitecture := ec2types.ArchitectureTypeX8664
+ filters.CPUArchitecture = &defaultArchitecture
+ }
+ if filters.BareMetal == nil {
+ bareMetalDefault := false
+ filters.BareMetal = &bareMetalDefault
+ }
+ if filters.Fpga == nil {
+ fpgaDefault := false
+ filters.Fpga = &fpgaDefault
+ }
+
+ if filters.AllowList == nil {
+ baseAllowedInstanceTypes, err := regexp.Compile("^[cmr][3-9][ag]?\\..*$|^a[1-9]\\..*$|^t[2-9]\\..*$")
+ if err != nil {
+ return filters, err
+ }
+ filters.AllowList = baseAllowedInstanceTypes
+ }
+
+ if filters.VCpusRange == nil && filters.MemoryRange == nil {
+ defaultVcpus := int32(4)
+ filters.VCpusRange = &Int32RangeFilter{LowerBound: defaultVcpus, UpperBound: defaultVcpus}
+ }
+
+ return filters, nil
+}
+
+// TransformForService transforms lower level filters based on the service
+func (itf Selector) TransformForService(ctx context.Context, filters Filters) (Filters, error) {
+ return itf.ServiceRegistry.ExecuteTransforms(filters)
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/comparators.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/comparators.go
new file mode 100644
index 000000000..eb639ecf9
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/comparators.go
@@ -0,0 +1,425 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+package selector
+
+import (
+ "log"
+ "math"
+ "reflect"
+ "regexp"
+ "strconv"
+ "strings"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+)
+
+const (
+ supported = "supported"
+ required = "required"
+)
+
+var amdRegex = regexp.MustCompile("[a-zA-Z0-9]+a\\.[a-zA-Z0-9]")
+
+func isSupportedFromString(instanceTypeValue *string, target *string) bool {
+ if target == nil {
+ return true
+ }
+ if instanceTypeValue == nil {
+ return false
+ }
+ return *instanceTypeValue == *target
+}
+
+func isSupportedFromStrings(instanceTypeValues []*string, target *string) bool {
+ if target == nil {
+ return true
+ }
+ return contains(instanceTypeValues, *target)
+}
+
+func isSupportedWithRangeInt(instanceTypeValue *int, target *IntRangeFilter) bool {
+ var instanceTypeValueInt64 *int64
+ if instanceTypeValue != nil {
+ nonPtr := int64(*instanceTypeValue)
+ instanceTypeValueInt64 = &nonPtr
+ }
+ return isSupportedWithRangeInt64(instanceTypeValueInt64, target)
+}
+
+func isSupportedWithFloat64(instanceTypeValue *float64, target *float64) bool {
+ if target == nil {
+ return true
+ }
+ if instanceTypeValue == nil {
+ return false
+ }
+ // compare up to values' two decimal floor
+ return math.Floor(*instanceTypeValue*100)/100 == math.Floor(*target*100)/100
+}
+
+func isSupportedUsageClassType(instanceTypeValue []ec2types.UsageClassType, target *ec2types.UsageClassType) bool {
+ if target == nil {
+ return true
+ }
+ if instanceTypeValue == nil {
+ return false
+ }
+ if reflect.ValueOf(*target).IsZero() {
+ return true
+ }
+
+ for _, potentialType := range instanceTypeValue {
+ if potentialType == *target {
+ return true
+ }
+ }
+ return false
+}
+
+func isSupportedArchitectureType(instanceTypeValue []ec2types.ArchitectureType, target *ec2types.ArchitectureType) bool {
+ if target == nil {
+ return true
+ }
+ if instanceTypeValue == nil {
+ return false
+ }
+ if reflect.ValueOf(*target).IsZero() {
+ return true
+ }
+
+ for _, potentialType := range instanceTypeValue {
+ if potentialType == *target {
+ return true
+ }
+ }
+ return false
+}
+
+func isSupportedVirtualizationType(instanceTypeValue []ec2types.VirtualizationType, target *ec2types.VirtualizationType) bool {
+ if target == nil {
+ return true
+ }
+ if instanceTypeValue == nil {
+ return false
+ }
+ if reflect.ValueOf(*target).IsZero() {
+ return true
+ }
+ for _, potentialType := range instanceTypeValue {
+ if potentialType == *target {
+ return true
+ }
+ }
+ return false
+}
+
+func isSupportedInstanceTypeHypervisorType(instanceTypeValue ec2types.InstanceTypeHypervisor, target *ec2types.InstanceTypeHypervisor) bool {
+ if target == nil {
+ return true
+ }
+ if reflect.ValueOf(*target).IsZero() {
+ return true
+ }
+ if instanceTypeValue == *target {
+ return true
+ }
+ return false
+}
+
+func isSupportedRootDeviceType(instanceTypeValue []ec2types.RootDeviceType, target *ec2types.RootDeviceType) bool {
+ if target == nil {
+ return true
+ }
+ if instanceTypeValue == nil {
+ return false
+ }
+ if reflect.ValueOf(*target).IsZero() {
+ return true
+ }
+ for _, potentialType := range instanceTypeValue {
+ if potentialType == *target {
+ return true
+ }
+ }
+ return false
+}
+
+func isMatchingCpuArchitecture(instanceTypeValue CPUManufacturer, target *CPUManufacturer) bool {
+ if target == nil {
+ return true
+ }
+ if reflect.ValueOf(*target).IsZero() {
+ return true
+ }
+ if instanceTypeValue == *target {
+ return true
+ }
+ return false
+}
+
+func isSupportedWithRangeInt64(instanceTypeValue *int64, target *IntRangeFilter) bool {
+ if target == nil {
+ return true
+ } else if instanceTypeValue == nil && target.LowerBound == 0 && target.UpperBound == 0 {
+ return true
+ } else if instanceTypeValue == nil {
+ return false
+ }
+ return int(*instanceTypeValue) >= target.LowerBound && int(*instanceTypeValue) <= target.UpperBound
+}
+
+func isSupportedWithRangeInt32(instanceTypeValue *int32, target *Int32RangeFilter) bool {
+ if target == nil {
+ return true
+ } else if instanceTypeValue == nil && target.LowerBound == 0 && target.UpperBound == 0 {
+ return true
+ } else if instanceTypeValue == nil {
+ return false
+ }
+ return *instanceTypeValue >= target.LowerBound && *instanceTypeValue <= target.UpperBound
+}
+
+func isSupportedWithRangeUint64(instanceTypeValue *int64, target *Uint64RangeFilter) bool {
+ if target == nil {
+ return true
+ } else if instanceTypeValue == nil && target.LowerBound == 0 && target.UpperBound == 0 {
+ return true
+ } else if instanceTypeValue == nil {
+ return false
+ }
+ if target.UpperBound > math.MaxInt64 {
+ target.UpperBound = math.MaxInt64
+ }
+ return uint64(*instanceTypeValue) >= target.LowerBound && uint64(*instanceTypeValue) <= target.UpperBound
+}
+
+func isSupportedWithRangeFloat64(instanceTypeValue *float64, target *Float64RangeFilter) bool {
+ if target == nil {
+ return true
+ } else if instanceTypeValue == nil && target.LowerBound == 0.0 && target.UpperBound == 0.0 {
+ return true
+ } else if instanceTypeValue == nil {
+ return false
+ }
+ return float64(*instanceTypeValue) >= target.LowerBound && float64(*instanceTypeValue) <= target.UpperBound
+}
+
+func isSupportedWithBool(instanceTypeValue *bool, target *bool) bool {
+ if target == nil {
+ return true
+ }
+ return *target == *instanceTypeValue
+}
+
+// Helper functions for aggregating data parsed from AWS API calls
+
+func getTotalAcceleratorsCount(acceleratorInfo *ec2types.InferenceAcceleratorInfo) *int32 {
+ if acceleratorInfo == nil {
+ return nil
+ }
+ total := int32(0)
+ for _, accel := range acceleratorInfo.Accelerators {
+ total = total + *accel.Count
+ }
+ return &total
+}
+
+func getTotalGpusCount(gpusInfo *ec2types.GpuInfo) *int32 {
+ if gpusInfo == nil {
+ return nil
+ }
+ total := int32(0)
+ for _, gpu := range gpusInfo.Gpus {
+ total = total + *gpu.Count
+ }
+ return &total
+}
+
+func getTotalGpuMemory(gpusInfo *ec2types.GpuInfo) *int64 {
+ if gpusInfo == nil {
+ return nil
+ }
+ return aws.Int64(int64(*gpusInfo.TotalGpuMemoryInMiB))
+}
+
+func getGPUManufacturers(gpusInfo *ec2types.GpuInfo) []*string {
+ if gpusInfo == nil {
+ return nil
+ }
+ var manufacturers []*string
+ for _, info := range gpusInfo.Gpus {
+ manufacturers = append(manufacturers, info.Manufacturer)
+ }
+ return manufacturers
+}
+
+func getGPUModels(gpusInfo *ec2types.GpuInfo) []*string {
+ if gpusInfo == nil {
+ return nil
+ }
+ var models []*string
+ for _, info := range gpusInfo.Gpus {
+ models = append(models, info.Name)
+ }
+ return models
+}
+
+func getInferenceAcceleratorManufacturers(acceleratorInfo *ec2types.InferenceAcceleratorInfo) []*string {
+ if acceleratorInfo == nil {
+ return nil
+ }
+ var manufacturers []*string
+ for _, info := range acceleratorInfo.Accelerators {
+ manufacturers = append(manufacturers, info.Manufacturer)
+ }
+ return manufacturers
+}
+
+func getInferenceAcceleratorModels(acceleratorInfo *ec2types.InferenceAcceleratorInfo) []*string {
+ if acceleratorInfo == nil {
+ return nil
+ }
+ var models []*string
+ for _, info := range acceleratorInfo.Accelerators {
+ models = append(models, info.Name)
+ }
+ return models
+}
+
+func getNetworkPerformance(networkPerformance *string) *int {
+ if networkPerformance == nil {
+ return aws.Int(-1)
+ }
+ re, err := regexp.Compile(`[0-9]+ Gigabit`)
+ if err != nil {
+ log.Printf("Unable to compile regexp to parse network performance: %s\n", *networkPerformance)
+ return nil
+ }
+ networkBandwidth := re.FindString(*networkPerformance)
+ if networkBandwidth == "" {
+ return aws.Int(-1)
+ }
+ bandwidthAndUnit := strings.Split(networkBandwidth, " ")
+ if len(bandwidthAndUnit) != 2 {
+ return aws.Int(-1)
+ }
+ bandwidthNumber, err := strconv.Atoi(bandwidthAndUnit[0])
+ if err != nil {
+ return aws.Int(-1)
+ }
+ return aws.Int(bandwidthNumber)
+}
+
+func getInstanceStorage(instanceStorageInfo *ec2types.InstanceStorageInfo) *int64 {
+ if instanceStorageInfo == nil {
+ return aws.Int64(0)
+ }
+ return aws.Int64(*instanceStorageInfo.TotalSizeInGB * 1024)
+}
+
+func getDiskType(instanceStorageInfo *ec2types.InstanceStorageInfo) *string {
+ if instanceStorageInfo == nil || len(instanceStorageInfo.Disks) == 0 {
+ return nil
+ }
+ return aws.String(string(instanceStorageInfo.Disks[0].Type))
+}
+
+func getNVMESupport(instanceStorageInfo *ec2types.InstanceStorageInfo, ebsInfo *ec2types.EbsInfo) *bool {
+ if instanceStorageInfo != nil {
+ return supportSyntaxToBool(aws.String(string(instanceStorageInfo.NvmeSupport)))
+ }
+ if ebsInfo != nil {
+ return supportSyntaxToBool(aws.String(string(ebsInfo.EbsOptimizedSupport)))
+ }
+ return aws.Bool(false)
+}
+
+func getDiskEncryptionSupport(instanceStorageInfo *ec2types.InstanceStorageInfo, ebsInfo *ec2types.EbsInfo) *bool {
+ if instanceStorageInfo != nil {
+ encryptionSupport := string(instanceStorageInfo.EncryptionSupport)
+ return supportSyntaxToBool(&encryptionSupport)
+ }
+ if ebsInfo != nil {
+ ebsEncryptionSupport := string(ebsInfo.EncryptionSupport)
+ return supportSyntaxToBool(&ebsEncryptionSupport)
+ }
+ return aws.Bool(false)
+}
+
+func getEBSOptimizedBaselineBandwidth(ebsInfo *ec2types.EbsInfo) *int32 {
+ if ebsInfo == nil || ebsInfo.EbsOptimizedInfo == nil {
+ return nil
+ }
+ return ebsInfo.EbsOptimizedInfo.BaselineBandwidthInMbps
+}
+
+func getEBSOptimizedBaselineThroughput(ebsInfo *ec2types.EbsInfo) *float64 {
+ if ebsInfo == nil || ebsInfo.EbsOptimizedInfo == nil {
+ return nil
+ }
+ return ebsInfo.EbsOptimizedInfo.BaselineThroughputInMBps
+}
+
+func getEBSOptimizedBaselineIOPS(ebsInfo *ec2types.EbsInfo) *int32 {
+ if ebsInfo == nil || ebsInfo.EbsOptimizedInfo == nil {
+ return nil
+ }
+ return ebsInfo.EbsOptimizedInfo.BaselineIops
+}
+
+func getCPUManufacturer(instanceTypeInfo *ec2types.InstanceTypeInfo) CPUManufacturer {
+ for _, it := range instanceTypeInfo.ProcessorInfo.SupportedArchitectures {
+ if it == ec2types.ArchitectureTypeArm64 {
+ return CPUManufacturerAWS
+ }
+ }
+
+ if amdRegex.Match([]byte(instanceTypeInfo.InstanceType)) {
+ return CPUManufacturerAMD
+ }
+ return CPUManufacturerIntel
+}
+
+// supportSyntaxToBool takes an instance spec field that uses ["unsupported", "supported", "required", or "default"]
+// and transforms it to a *bool to use in filter execution
+func supportSyntaxToBool(instanceTypeSupport *string) *bool {
+ if instanceTypeSupport == nil {
+ return nil
+ }
+ if strings.ToLower(*instanceTypeSupport) == required || strings.ToLower(*instanceTypeSupport) == supported || strings.ToLower(*instanceTypeSupport) == "default" {
+ return aws.Bool(true)
+ }
+ return aws.Bool(false)
+}
+
+func calculateVCpusToMemoryRatio(vcpusVal *int32, memoryVal *int64) *float64 {
+ if vcpusVal == nil || *vcpusVal == 0 || memoryVal == nil {
+ return nil
+ }
+ // normalize vcpus to a mebivcpu value
+ result := math.Ceil(float64(*memoryVal) / float64(*vcpusVal*1024))
+ return &result
+}
+
+// Slice helper function
+
+func contains(slice []*string, target string) bool {
+ for _, it := range slice {
+ if it != nil && strings.EqualFold(*it, target) {
+ return true
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/emr.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/emr.go
new file mode 100644
index 000000000..212f16f61
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/emr.go
@@ -0,0 +1,428 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+package selector
+
+import (
+ "fmt"
+ "strings"
+
+ ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ "github.com/blang/semver/v4"
+)
+
+const (
+ fallbackVersion = "5.20.0"
+)
+
+// EMR is a Service type for a custom service filter transform
+type EMR struct{}
+
+// Filters implements the Service interface contract for EMR
+func (e EMR) Filters(version string) (Filters, error) {
+ filters := Filters{}
+ if version == "" {
+ version = fallbackVersion
+ }
+ semanticVersion, err := semver.Make(version)
+ if err != nil {
+ return filters, err
+ }
+ if err := semanticVersion.Validate(); err != nil {
+ return filters, fmt.Errorf("Invalid semantic version passed for EMR")
+ }
+ instanceTypes, err := e.getEMRInstanceTypes(semanticVersion)
+ if err != nil {
+ return filters, err
+ }
+ filters.InstanceTypes = &instanceTypes
+ ebsType := ec2types.RootDeviceTypeEbs
+ filters.RootDeviceType = &ebsType
+ hvmType := ec2types.VirtualizationTypeHvm
+ filters.VirtualizationType = &hvmType
+ return filters, nil
+}
+
+// getEMRInstanceTypes returns a list of instance types that emr supports
+func (e EMR) getEMRInstanceTypes(version semver.Version) ([]string, error) {
+ instanceTypes := []string{}
+
+ for _, instanceType := range e.getAllEMRInstanceTypes() {
+ if semver.MustParseRange(">=5.33.0")(version) {
+ instanceTypes = append(instanceTypes, instanceType)
+ } else if semver.MustParseRange(">=5.25.0 <5.33.0")(version) {
+ if e.isOnlyEMR_5_33_0_plus(instanceType) {
+ continue
+ }
+ instanceTypes = append(instanceTypes, instanceType)
+ } else if semver.MustParseRange(">=5.20.0 <5.25.0")(version) {
+ if e.isOnlyEMR_5_25_0_plus(instanceType) {
+ continue
+ }
+ if e.isOnlyEMR_5_33_0_plus(instanceType) {
+ continue
+ }
+ instanceTypes = append(instanceTypes, instanceType)
+ } else if semver.MustParseRange(">=5.15.0 <5.20.0")(version) {
+ if instanceType == "c1.medium" {
+ continue
+ }
+ if e.isOnlyEMR_5_20_0_plus(instanceType) {
+ continue
+ }
+ if e.isOnlyEMR_5_25_0_plus(instanceType) {
+ continue
+ }
+ if e.isOnlyEMR_5_33_0_plus(instanceType) {
+ continue
+ }
+ instanceTypes = append(instanceTypes, instanceType)
+ } else if semver.MustParseRange(">=5.13.0 <5.15.0")(version) {
+ if e.isOnlyEMR_5_20_0_plus(instanceType) {
+ continue
+ }
+ if e.isOnlyEMR_5_25_0_plus(instanceType) {
+ continue
+ }
+ if e.isOnlyEMR_5_33_0_plus(instanceType) {
+ continue
+ }
+ instanceTypes = append(instanceTypes, instanceType)
+ } else if semver.MustParseRange(">=5.9.0 <5.13.0")(version) {
+ if e.isEMR_5_13_0_plus(instanceType) {
+ continue
+ }
+ if e.isOnlyEMR_5_20_0_plus(instanceType) {
+ continue
+ }
+ if e.isOnlyEMR_5_25_0_plus(instanceType) {
+ continue
+ }
+ if e.isOnlyEMR_5_33_0_plus(instanceType) {
+ continue
+ }
+ instanceTypes = append(instanceTypes, instanceType)
+ } else {
+ if e.isEMR_5_13_0_plus(instanceType) {
+ continue
+ }
+ if e.isOnlyEMR_5_20_0_plus(instanceType) {
+ continue
+ }
+ if e.isOnlyEMR_5_25_0_plus(instanceType) {
+ continue
+ }
+ if e.isOnlyEMR_5_33_0_plus(instanceType) {
+ continue
+ }
+ if strings.HasPrefix(instanceType, "i3") {
+ continue
+ }
+ instanceTypes = append(instanceTypes, instanceType)
+ }
+ }
+ return instanceTypes, nil
+}
+
+func (EMR) isEMR_5_13_0_plus(instanceType string) bool {
+ prefixes := []string{
+ "m5.",
+ "m5d.",
+ "c5.",
+ "c5d.",
+ "r5.",
+ "r5d.",
+ }
+ for _, prefix := range prefixes {
+ if strings.HasPrefix(instanceType, prefix) {
+ return true
+ }
+ }
+ return false
+}
+
+func (EMR) isOnlyEMR_5_20_0_plus(instanceType string) bool {
+ prefixes := []string{
+ "m5a.",
+ "c5n.",
+ "r5a.",
+ }
+ for _, prefix := range prefixes {
+ if strings.HasPrefix(instanceType, prefix) {
+ return true
+ }
+ }
+ return false
+}
+
+func (EMR) isOnlyEMR_5_25_0_plus(instanceType string) bool {
+ prefixes := []string{
+ "i3en.",
+ }
+ for _, prefix := range prefixes {
+ if strings.HasPrefix(instanceType, prefix) {
+ return true
+ }
+ }
+ return false
+}
+
+func (EMR) isOnlyEMR_5_33_0_plus(instanceType string) bool {
+ prefixes := []string{
+ "m5zn.",
+ "m6gd",
+ "r5b",
+ "r6gd",
+ }
+ for _, prefix := range prefixes {
+ if strings.HasPrefix(instanceType, prefix) {
+ return true
+ }
+ }
+ return false
+}
+
+func (EMR) getAllEMRInstanceTypes() []string {
+ return []string{
+ "c1.medium",
+ "c1.xlarge",
+ "c3.2xlarge",
+ "c3.4xlarge",
+ "c3.8xlarge",
+ "c3.xlarge",
+ "c4.2xlarge",
+ "c4.4xlarge",
+ "c4.8xlarge",
+ "c4.large",
+ "c4.xlarge",
+ "c5.12xlarge",
+ "c5.18xlarge",
+ "c5.24xlarge",
+ "c5.2xlarge",
+ "c5.4xlarge",
+ "c5.9xlarge",
+ "c5.xlarge",
+ "c5a.12xlarge",
+ "c5a.16xlarge",
+ "c5a.2xlarge",
+ "c5a.4xlarge",
+ "c5a.8xlarge",
+ "c5a.xlarge",
+ "c5ad.12xlarge",
+ "c5ad.16xlarge",
+ "c5ad.24xlarge",
+ "c5ad.2xlarge",
+ "c5ad.4xlarge",
+ "c5ad.8xlarge",
+ "c5ad.xlarge",
+ "c5d.12xlarge",
+ "c5d.18xlarge",
+ "c5d.24xlarge",
+ "c5d.2xlarge",
+ "c5d.4xlarge",
+ "c5d.9xlarge",
+ "c5d.xlarge",
+ "c5n.18xlarge",
+ "c5n.2xlarge",
+ "c5n.4xlarge",
+ "c5n.9xlarge",
+ "c5n.xlarge",
+ "c6g.12xlarge",
+ "c6g.16xlarge",
+ "c6g.2xlarge",
+ "c6g.4xlarge",
+ "c6g.8xlarge",
+ "c6g.xlarge",
+ "c6gd.12xlarge",
+ "c6gd.16xlarge",
+ "c6gd.2xlarge",
+ "c6gd.4xlarge",
+ "c6gd.8xlarge",
+ "c6gd.xlarge",
+ "c6gn.12xlarge",
+ "c6gn.16xlarge",
+ "c6gn.2xlarge",
+ "c6gn.4xlarge",
+ "c6gn.8xlarge",
+ "c6gn.xlarge",
+ "cc2.8xlarge",
+ "cr1.8xlarge",
+ "d2.2xlarge",
+ "d2.4xlarge",
+ "d2.8xlarge",
+ "d2.xlarge",
+ "d3.2xlarge",
+ "d3.4xlarge",
+ "d3.8xlarge",
+ "d3.xlarge",
+ "d3en.2xlarge",
+ "d3en.4xlarge",
+ "d3en.6xlarge",
+ "d3en.8xlarge",
+ "d3en.12xlarge",
+ "d3en.xlarge",
+ "g2.2xlarge",
+ "g3.16xlarge",
+ "g3.4xlarge",
+ "g3.8xlarge",
+ "g3s.xlarge",
+ "g4dn.12xlarge",
+ "g4dn.16xlarge",
+ "g4dn.2xlarge",
+ "g4dn.4xlarge",
+ "g4dn.8xlarge",
+ "g4dn.xlarge",
+ "h1.16xlarge",
+ "h1.2xlarge",
+ "h1.4xlarge",
+ "h1.8xlarge",
+ "hs1.8xlarge",
+ "i2.2xlarge",
+ "i2.4xlarge",
+ "i2.8xlarge",
+ "i2.xlarge",
+ "i3.16xlarge",
+ "i3.2xlarge",
+ "i3.4xlarge",
+ "i3.8xlarge",
+ "i3.xlarge",
+ "i3en.12xlarge",
+ "i3en.24xlarge",
+ "i3en.2xlarge",
+ "i3en.3xlarge",
+ "i3en.6xlarge",
+ "i3en.xlarge",
+ "m1.large",
+ "m1.medium",
+ "m1.small",
+ "m1.xlarge",
+ "m2.2xlarge",
+ "m2.4xlarge",
+ "m2.xlarge",
+ "m3.2xlarge",
+ "m3.xlarge",
+ "m4.10xlarge",
+ "m4.16xlarge",
+ "m4.2xlarge",
+ "m4.4xlarge",
+ "m4.large",
+ "m4.xlarge",
+ "m5.12xlarge",
+ "m5.16xlarge",
+ "m5.24xlarge",
+ "m5.2xlarge",
+ "m5.4xlarge",
+ "m5.8xlarge",
+ "m5.xlarge",
+ "m5a.12xlarge",
+ "m5a.16xlarge",
+ "m5a.24xlarge",
+ "m5a.2xlarge",
+ "m5a.4xlarge",
+ "m5a.8xlarge",
+ "m5a.xlarge",
+ "m5d.12xlarge",
+ "m5d.16xlarge",
+ "m5d.24xlarge",
+ "m5d.2xlarge",
+ "m5d.4xlarge",
+ "m5d.8xlarge",
+ "m5d.xlarge",
+ "m5zn.12xlarge",
+ "m5zn.2xlarge",
+ "m5zn.3xlarge",
+ "m5zn.6xlarge",
+ "m5zn.xlarge",
+ "m6g.12xlarge",
+ "m6g.16xlarge",
+ "m6g.2xlarge",
+ "m6g.4xlarge",
+ "m6g.8xlarge",
+ "m6g.xlarge",
+ "m6gd.12xlarge",
+ "m6gd.16xlarge",
+ "m6gd.2xlarge",
+ "m6gd.4xlarge",
+ "m6gd.8xlarge",
+ "m6gd.xlarge",
+ "p2.16xlarge",
+ "p2.8xlarge",
+ "p2.xlarge",
+ "p3.16xlarge",
+ "p3.2xlarge",
+ "p3.8xlarge",
+ "p3dn.24xlarge",
+ "r3.2xlarge",
+ "r3.4xlarge",
+ "r3.8xlarge",
+ "r3.xlarge",
+ "r4.16xlarge",
+ "r4.2xlarge",
+ "r4.4xlarge",
+ "r4.8xlarge",
+ "r4.xlarge",
+ "r5.12xlarge",
+ "r5.16xlarge",
+ "r5.24xlarge",
+ "r5.2xlarge",
+ "r5.4xlarge",
+ "r5.8xlarge",
+ "r5.xlarge",
+ "r5a.12xlarge",
+ "r5a.16xlarge",
+ "r5a.24xlarge",
+ "r5a.2xlarge",
+ "r5a.4xlarge",
+ "r5a.8xlarge",
+ "r5a.xlarge",
+ "r5b.12xlarge",
+ "r5b.16xlarge",
+ "r5b.24xlarge",
+ "r5b.2xlarge",
+ "r5b.4xlarge",
+ "r5b.8xlarge",
+ "r5b.xlarge",
+ "r5d.12xlarge",
+ "r5d.16xlarge",
+ "r5d.24xlarge",
+ "r5d.2xlarge",
+ "r5d.4xlarge",
+ "r5d.8xlarge",
+ "r5d.xlarge",
+ "r5dn.12xlarge",
+ "r5dn.16xlarge",
+ "r5dn.24xlarge",
+ "r5dn.2xlarge",
+ "r5dn.4xlarge",
+ "r5dn.8xlarge",
+ "r5dn.xlarge",
+ "r6g.12xlarge",
+ "r6g.16xlarge",
+ "r6g.2xlarge",
+ "r6g.4xlarge",
+ "r6g.8xlarge",
+ "r6g.xlarge",
+ "r6gd.12xlarge",
+ "r6gd.16xlarge",
+ "r6gd.2xlarge",
+ "r6gd.4xlarge",
+ "r6gd.8xlarge",
+ "r6gd.xlarge",
+ "x1.32xlarge",
+ "z1d.12xlarge",
+ "z1d.2xlarge",
+ "z1d.3xlarge",
+ "z1d.6xlarge",
+ "z1d.xlarge",
+ }
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/bubbletea.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/bubbletea.go
new file mode 100644
index 000000000..740768747
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/bubbletea.go
@@ -0,0 +1,200 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+package outputs
+
+import (
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter"
+ tea "github.com/charmbracelet/bubbletea"
+ "github.com/charmbracelet/lipgloss"
+ "github.com/muesli/termenv"
+)
+
+const (
+ // can't get terminal dimensions on startup, so use this
+ initialDimensionVal = 30
+
+ instanceTypeKey = "instance type"
+ selectedKey = "selected"
+)
+
+const (
+ // table states
+ stateTable = "table"
+ stateVerbose = "verbose"
+ stateSorting = "sorting"
+)
+
+var (
+ controlsStyle = lipgloss.NewStyle().Faint(true)
+)
+
+// BubbleTeaModel is used to hold the state of the bubble tea TUI
+type BubbleTeaModel struct {
+ // holds the output currentState of the model
+ currentState string
+
+ // the model for the table view
+ tableModel tableModel
+
+ // holds state for the verbose view
+ verboseModel verboseModel
+
+ // holds the state for the sorting view
+ sortingModel sortingModel
+}
+
+// NewBubbleTeaModel initializes a new bubble tea Model which represents
+// a stylized table to display instance types
+func NewBubbleTeaModel(instanceTypes []*instancetypes.Details) BubbleTeaModel {
+ return BubbleTeaModel{
+ currentState: stateTable,
+ tableModel: *initTableModel(instanceTypes),
+ verboseModel: *initVerboseModel(instanceTypes),
+ sortingModel: *initSortingModel(instanceTypes),
+ }
+}
+
+// Init is used by bubble tea to initialize a bubble tea table
+func (m BubbleTeaModel) Init() tea.Cmd {
+ return nil
+}
+
+// Update is used by bubble tea to update the state of the bubble
+// tea model based on user input
+func (m BubbleTeaModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
+ switch msg := msg.(type) {
+ case tea.KeyMsg:
+ // don't listen for input if currently typing into text field
+ if m.tableModel.filterTextInput.Focused() {
+ break
+ } else if m.sortingModel.sortTextInput.Focused() {
+ // see if we should sort and switch states to table
+ if m.currentState == stateSorting && msg.String() == "enter" {
+ jsonPath := m.sortingModel.sortTextInput.Value()
+
+ sortDirection := sorter.SortAscending
+ if m.sortingModel.isDescending {
+ sortDirection = sorter.SortDescending
+ }
+
+ var err error
+ m.tableModel, err = m.tableModel.sortTable(jsonPath, sortDirection)
+ if err != nil {
+ m.sortingModel.sortTextInput.SetValue(jsonPathError)
+ break
+ }
+
+ m.currentState = stateTable
+
+ m.sortingModel.sortTextInput.Blur()
+ }
+
+ break
+ }
+
+ // check for quit or change in state
+ switch msg.String() {
+ case "ctrl+c", "q":
+ return m, tea.Quit
+ case "e":
+ // switch from table state to verbose state
+ if m.currentState == stateTable {
+ // get focused instance type
+ focusedRow := m.tableModel.table.HighlightedRow()
+ focusedInstance, ok := focusedRow.Data[instanceTypeKey].(*instancetypes.Details)
+ if !ok {
+ break
+ }
+
+ // set content of view
+ m.verboseModel.focusedInstanceName = focusedInstance.InstanceType
+ m.verboseModel.viewport.SetContent(VerboseInstanceTypeOutput([]*instancetypes.Details{focusedInstance})[0])
+
+ // move viewport to top of printout
+ m.verboseModel.viewport.SetYOffset(0)
+
+ // switch from table state to verbose state
+ m.currentState = stateVerbose
+ }
+ case "s":
+ // switch from table view to sorting view
+ if m.currentState == stateTable {
+ m.currentState = stateSorting
+ }
+ case "enter":
+ // sort and switch states to table
+ if m.currentState == stateSorting {
+ sortFilter := string(m.sortingModel.shorthandList.SelectedItem().(item))
+
+ sortDirection := sorter.SortAscending
+ if m.sortingModel.isDescending {
+ sortDirection = sorter.SortDescending
+ }
+
+ var err error
+ m.tableModel, err = m.tableModel.sortTable(sortFilter, sortDirection)
+ if err != nil {
+ m.sortingModel.sortTextInput.SetValue("INVALID SHORTHAND VALUE")
+ break
+ }
+
+ m.currentState = stateTable
+
+ m.sortingModel.sortTextInput.Blur()
+ }
+ case "esc":
+ // switch from sorting state or verbose state to table state
+ if m.currentState == stateSorting || m.currentState == stateVerbose {
+ m.currentState = stateTable
+ }
+ }
+ case tea.WindowSizeMsg:
+ // This is needed to handle a bug with bubble tea
+ // where resizing causes misprints (https://github.com/Evertras/bubble-table/issues/121)
+ termenv.ClearScreen()
+
+ // handle screen resizing
+ m.tableModel = m.tableModel.resizeView(msg)
+ m.verboseModel = m.verboseModel.resizeView(msg)
+ m.sortingModel = m.sortingModel.resizeView(msg)
+ }
+
+ var cmd tea.Cmd
+ // update currently active state
+ switch m.currentState {
+ case stateTable:
+ m.tableModel, cmd = m.tableModel.update(msg)
+ case stateVerbose:
+ m.verboseModel, cmd = m.verboseModel.update(msg)
+ case stateSorting:
+ m.sortingModel, cmd = m.sortingModel.update(msg)
+ }
+
+ return m, cmd
+}
+
+// View is used by bubble tea to render the bubble tea model
+func (m BubbleTeaModel) View() string {
+ switch m.currentState {
+ case stateTable:
+ return m.tableModel.view()
+ case stateVerbose:
+ return m.verboseModel.view()
+ case stateSorting:
+ return m.sortingModel.view()
+ }
+
+ return ""
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/outputs.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/outputs.go
new file mode 100644
index 000000000..319cf9fc8
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/outputs.go
@@ -0,0 +1,285 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+// Package outputs provides types for implementing instance type output functions as well as prebuilt output functions.
+package outputs
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "log"
+ "reflect"
+ "strconv"
+ "strings"
+ "text/tabwriter"
+
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
+)
+
+const columnTag = "column"
+
+// wideColumnsData stores the data that should be displayed on each column
+// of a wide output row
+type wideColumnsData struct {
+ instanceName string `column:"Instance Type"`
+ vcpu int32 `column:"VCPUs"`
+ memory string `column:"Mem (GiB)"`
+ hypervisor string `column:"Hypervisor"`
+ currentGen bool `column:"Current Gen"`
+ hibernationSupport bool `column:"Hibernation Support"`
+ cpuArch string `column:"CPU Arch"`
+ networkPerformance string `column:"Network Performance"`
+ eni int32 `column:"ENIs"`
+ gpu int32 `column:"GPUs"`
+ gpuMemory string `column:"GPU Mem (GiB)"`
+ gpuInfo string `column:"GPU Info"`
+ odPrice string `column:"On-Demand Price/Hr"`
+ spotPrice string `column:"Spot Price/Hr (30d avg)"`
+}
+
+// SimpleInstanceTypeOutput is an OutputFn which outputs a slice of instance type names
+func SimpleInstanceTypeOutput(instanceTypeInfoSlice []*instancetypes.Details) []string {
+ instanceTypeStrings := []string{}
+ for _, instanceTypeInfo := range instanceTypeInfoSlice {
+ instanceTypeStrings = append(instanceTypeStrings, string(instanceTypeInfo.InstanceType))
+ }
+ return instanceTypeStrings
+}
+
+// VerboseInstanceTypeOutput is an OutputFn which outputs a slice of instance type names
+func VerboseInstanceTypeOutput(instanceTypeInfoSlice []*instancetypes.Details) []string {
+ output, err := json.MarshalIndent(instanceTypeInfoSlice, "", " ")
+ if err != nil {
+ log.Println("Unable to convert instance type info to JSON")
+ return []string{}
+ }
+ if string(output) == "[]" || string(output) == "null" {
+ return []string{}
+ }
+ return []string{string(output)}
+}
+
+// TableOutputShort is an OutputFn which returns a CLI table for easy reading
+func TableOutputShort(instanceTypeInfoSlice []*instancetypes.Details) []string {
+ if len(instanceTypeInfoSlice) == 0 {
+ return nil
+ }
+ w := new(tabwriter.Writer)
+ buf := new(bytes.Buffer)
+ w.Init(buf, 8, 8, 8, ' ', 0)
+ defer w.Flush()
+
+ headers := []interface{}{
+ "Instance Type",
+ "VCPUs",
+ "Mem (GiB)",
+ }
+ separators := []interface{}{}
+
+ headerFormat := ""
+ for _, header := range headers {
+ headerFormat = headerFormat + "%s\t"
+ separators = append(separators, strings.Repeat("-", len(header.(string))))
+ }
+ fmt.Fprintf(w, headerFormat, headers...)
+ fmt.Fprintf(w, "\n"+headerFormat, separators...)
+
+ for _, instanceTypeInfo := range instanceTypeInfoSlice {
+ fmt.Fprintf(w, "\n%s\t%d\t%s\t",
+ instanceTypeInfo.InstanceType,
+ *instanceTypeInfo.VCpuInfo.DefaultVCpus,
+ formatFloat(float64(*instanceTypeInfo.MemoryInfo.SizeInMiB)/1024.0),
+ )
+ }
+ w.Flush()
+ return []string{buf.String()}
+}
+
+// TableOutputWide is an OutputFn which returns a detailed CLI table for easy reading
+func TableOutputWide(instanceTypeInfoSlice []*instancetypes.Details) []string {
+ if len(instanceTypeInfoSlice) == 0 {
+ return nil
+ }
+ w := new(tabwriter.Writer)
+ buf := new(bytes.Buffer)
+ w.Init(buf, 8, 8, 2, ' ', 0)
+ defer w.Flush()
+
+ columnDataStruct := wideColumnsData{}
+ headers := []interface{}{}
+ structType := reflect.TypeOf(columnDataStruct)
+ for i := 0; i < structType.NumField(); i++ {
+ columnHeader := structType.Field(i).Tag.Get(columnTag)
+ headers = append(headers, columnHeader)
+ }
+ separators := make([]interface{}, 0)
+
+ headerFormat := ""
+ for _, header := range headers {
+ headerFormat = headerFormat + "%s\t"
+ separators = append(separators, strings.Repeat("-", len(header.(string))))
+ }
+ fmt.Fprintf(w, headerFormat, headers...)
+ fmt.Fprintf(w, "\n"+headerFormat, separators...)
+
+ columnsData := getWideColumnsData(instanceTypeInfoSlice)
+
+ for _, data := range columnsData {
+ fmt.Fprintf(w, "\n%s\t%d\t%s\t%s\t%t\t%t\t%s\t%s\t%d\t%d\t%s\t%s\t%s\t%s\t",
+ data.instanceName,
+ data.vcpu,
+ data.memory,
+ data.hypervisor,
+ data.currentGen,
+ data.hibernationSupport,
+ data.cpuArch,
+ data.networkPerformance,
+ data.eni,
+ data.gpu,
+ data.gpuMemory,
+ data.gpuInfo,
+ data.odPrice,
+ data.spotPrice,
+ )
+ }
+ w.Flush()
+ return []string{buf.String()}
+}
+
+// OneLineOutput is an output function which prints the instance type names on a single line separated by commas
+func OneLineOutput(instanceTypeInfoSlice []*instancetypes.Details) []string {
+ instanceTypeNames := []string{}
+ for _, instanceType := range instanceTypeInfoSlice {
+ instanceTypeNames = append(instanceTypeNames, string(instanceType.InstanceType))
+ }
+ if len(instanceTypeNames) == 0 {
+ return []string{}
+ }
+ return []string{strings.Join(instanceTypeNames, ",")}
+}
+
+func formatFloat(f float64) string {
+ s := strconv.FormatFloat(f, 'f', 5, 64)
+ parts := strings.Split(s, ".")
+ if len(parts) == 1 {
+ return s
+ }
+ reversed := reverse(parts[0])
+ withCommas := ""
+ for i, p := range reversed {
+ if i%3 == 0 && i != 0 {
+ withCommas += ","
+ }
+ withCommas += string(p)
+ }
+ s = strings.Join([]string{reverse(withCommas), parts[1]}, ".")
+ return strings.TrimRight(strings.TrimRight(s, "0"), ".")
+}
+
+func reverse(s string) string {
+ runes := []rune(s)
+ for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
+ runes[i], runes[j] = runes[j], runes[i]
+ }
+ return string(runes)
+}
+
+// getWideColumnsData returns the column data necessary for a wide output for each of
+// the given instance types
+func getWideColumnsData(instanceTypes []*instancetypes.Details) []*wideColumnsData {
+ columnsData := []*wideColumnsData{}
+
+ for _, instanceType := range instanceTypes {
+ none := "none"
+
+ cpuArchitectures := []string{}
+ for _, cpuArch := range instanceType.ProcessorInfo.SupportedArchitectures {
+ cpuArchitectures = append(cpuArchitectures, string(cpuArch))
+ }
+
+ gpus := int32(0)
+ gpuMemory := int32(0)
+ gpuType := []string{}
+ if instanceType.GpuInfo != nil {
+ gpuMemory = *instanceType.GpuInfo.TotalGpuMemoryInMiB
+ for _, gpuInfo := range instanceType.GpuInfo.Gpus {
+ gpus = gpus + *gpuInfo.Count
+ gpuType = append(gpuType, *gpuInfo.Manufacturer+" "+*gpuInfo.Name)
+ }
+ } else {
+ gpuType = append(gpuType, none)
+ }
+
+ onDemandPricePerHourStr := "-Not Fetched-"
+ spotPricePerHourStr := "-Not Fetched-"
+ if instanceType.OndemandPricePerHour != nil {
+ onDemandPricePerHourStr = "$" + formatFloat(*instanceType.OndemandPricePerHour)
+ }
+ if instanceType.SpotPrice != nil {
+ spotPricePerHourStr = "$" + formatFloat(*instanceType.SpotPrice)
+ }
+
+ newColumn := wideColumnsData{
+ instanceName: string(instanceType.InstanceType),
+ vcpu: *instanceType.VCpuInfo.DefaultVCpus,
+ memory: formatFloat(float64(*instanceType.MemoryInfo.SizeInMiB) / 1024.0),
+ hypervisor: string(instanceType.Hypervisor),
+ currentGen: *instanceType.CurrentGeneration,
+ hibernationSupport: *instanceType.HibernationSupported,
+ cpuArch: strings.Join(cpuArchitectures, ", "),
+ networkPerformance: *instanceType.NetworkInfo.NetworkPerformance,
+ eni: *instanceType.NetworkInfo.MaximumNetworkInterfaces,
+ gpu: gpus,
+ gpuMemory: formatFloat(float64(gpuMemory) / 1024.0),
+ gpuInfo: strings.Join(gpuType, ", "),
+ odPrice: onDemandPricePerHourStr,
+ spotPrice: spotPricePerHourStr,
+ }
+
+ columnsData = append(columnsData, &newColumn)
+ }
+
+ return columnsData
+}
+
+// getUnderlyingValue returns the underlying value of the given
+// reflect.Value type
+func getUnderlyingValue(value reflect.Value) interface{} {
+ var val interface{}
+
+ switch value.Kind() {
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ val = value.Int()
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+ val = value.Uint()
+ case reflect.Float32, reflect.Float64:
+ val = value.Float()
+ case reflect.String:
+ val = value.String()
+ case reflect.Pointer:
+ val = value.Pointer()
+ case reflect.Bool:
+ val = value.Bool()
+ case reflect.Complex128, reflect.Complex64:
+ val = value.Complex()
+ case reflect.Interface:
+ val = value.Interface()
+ case reflect.UnsafePointer:
+ val = value.UnsafePointer()
+ default:
+ val = nil
+ }
+
+ return val
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/sortingView.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/sortingView.go
new file mode 100644
index 000000000..671b4d4e4
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/sortingView.go
@@ -0,0 +1,260 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+package outputs
+
+import (
+ "fmt"
+ "io"
+ "strings"
+
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter"
+ "github.com/charmbracelet/bubbles/key"
+ "github.com/charmbracelet/bubbles/list"
+ "github.com/charmbracelet/bubbles/textinput"
+ tea "github.com/charmbracelet/bubbletea"
+ "github.com/charmbracelet/lipgloss"
+)
+
+const (
+ // formatting
+ sortDirectionPadding = 2
+ sortingTitlePadding = 3
+ sortingFooterPadding = 2
+
+ // controls
+ sortingListControls = "Controls: ↑/↓ - up/down • enter - select filter • tab - toggle direction • esc - return to table • q - quit"
+ sortingTextControls = "Controls: ↑/↓ - up/down • tab - toggle direction • enter - enter json path"
+
+ // sort direction text
+ ascendingText = "ASCENDING"
+ descendingText = "DESCENDING"
+)
+
+// sortingModel holds the state for the sorting view
+type sortingModel struct {
+ // list which holds the available shorting shorthands
+ shorthandList list.Model
+
+ // text input for json paths
+ sortTextInput textinput.Model
+
+ instanceTypes []*instancetypes.Details
+
+ isDescending bool
+}
+
+// format styles
+var (
+ // list
+ listTitleStyle = lipgloss.NewStyle().Bold(true).Underline(true)
+ listItemStyle = lipgloss.NewStyle().PaddingLeft(4)
+ selectedItemStyle = lipgloss.NewStyle().PaddingLeft(2).Foreground(lipgloss.Color("170"))
+
+ // text
+ descendingStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#0096FF"))
+ ascendingStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#DAF7A6"))
+ sortDirectionStyle = lipgloss.NewStyle().Bold(true).Underline(true).PaddingLeft(2)
+)
+
+// implement Item interface for list
+type item string
+
+func (i item) FilterValue() string { return "" }
+func (i item) Title() string { return string(i) }
+func (i item) Description() string { return "" }
+
+// implement ItemDelegate for list
+type itemDelegate struct{}
+
+func (d itemDelegate) Height() int { return 1 }
+func (d itemDelegate) Spacing() int { return 0 }
+func (d itemDelegate) Update(msg tea.Msg, m *list.Model) tea.Cmd { return nil }
+func (d itemDelegate) Render(w io.Writer, m list.Model, index int, listItem list.Item) {
+ i, ok := listItem.(item)
+ if !ok {
+ return
+ }
+
+ str := fmt.Sprintf("%d. %s", index+1, i)
+
+ fn := listItemStyle.Render
+ if index == m.Index() {
+ fn = func(s ...string) string {
+ t := make([]string, 0, len(s)+1)
+ t = append(t, "> ")
+ t = append(t, s...)
+ return selectedItemStyle.Render(t...)
+ }
+ }
+
+ fmt.Fprintf(w, fn(str))
+}
+
+// initSortingModel initializes and returns a new tableModel based on the given
+// instance type details
+func initSortingModel(instanceTypes []*instancetypes.Details) *sortingModel {
+ shorthandList := list.New(*createListItems(), itemDelegate{}, initialDimensionVal, initialDimensionVal)
+ shorthandList.Title = "Select sorting filter:"
+ shorthandList.Styles.Title = listTitleStyle
+ shorthandList.SetFilteringEnabled(false)
+ shorthandList.SetShowStatusBar(false)
+ shorthandList.SetShowHelp(false)
+ shorthandList.SetShowPagination(false)
+ shorthandList.KeyMap = createListKeyMap()
+
+ sortTextInput := textinput.New()
+ sortTextInput.Prompt = "JSON Path: "
+ sortTextInput.PromptStyle = lipgloss.NewStyle().Bold(true)
+
+ return &sortingModel{
+ shorthandList: shorthandList,
+ sortTextInput: sortTextInput,
+ instanceTypes: instanceTypes,
+ isDescending: false,
+ }
+}
+
+// createListKeyMap creates a KeyMap with the controls for the shorthand list
+func createListKeyMap() list.KeyMap {
+ return list.KeyMap{
+ CursorDown: key.NewBinding(
+ key.WithKeys("down"),
+ ),
+ CursorUp: key.NewBinding(
+ key.WithKeys("up"),
+ ),
+ }
+}
+
+// createListItems creates a list item for shorthand sorting flag
+func createListItems() *[]list.Item {
+ shorthandFlags := []string{
+ sorter.GPUCountField,
+ sorter.InferenceAcceleratorsField,
+ sorter.VCPUs,
+ sorter.Memory,
+ sorter.GPUMemoryTotal,
+ sorter.NetworkInterfaces,
+ sorter.SpotPrice,
+ sorter.ODPrice,
+ sorter.InstanceStorage,
+ sorter.EBSOptimizedBaselineBandwidth,
+ sorter.EBSOptimizedBaselineThroughput,
+ sorter.EBSOptimizedBaselineIOPS,
+ }
+
+ items := []list.Item{}
+
+ for _, flag := range shorthandFlags {
+ items = append(items, item(flag))
+ }
+
+ return &items
+}
+
+// resizeSortingView will change the dimensions of the sorting view
+// in order to accommodate the new window dimensions represented by
+// the given tea.WindowSizeMsg
+func (m sortingModel) resizeView(msg tea.WindowSizeMsg) sortingModel {
+ shorthandList := &m.shorthandList
+ shorthandList.SetWidth(msg.Width)
+ // ensure that text input is right below last option
+ if msg.Height >= len(shorthandList.Items())+sortingTitlePadding+sortingFooterPadding {
+ shorthandList.SetHeight(len(shorthandList.Items()) + sortingTitlePadding)
+ } else if msg.Height-sortingFooterPadding-sortDirectionPadding > 0 {
+ shorthandList.SetHeight(msg.Height - sortingFooterPadding - sortDirectionPadding)
+ } else {
+ shorthandList.SetHeight(1)
+ }
+
+ // ensure cursor of list is still hidden after resize
+ if m.sortTextInput.Focused() {
+ shorthandList.Select(len(m.shorthandList.Items()))
+ }
+
+ m.shorthandList = *shorthandList
+
+ return m
+}
+
+// update updates the state of the sortingModel
+func (m sortingModel) update(msg tea.Msg) (sortingModel, tea.Cmd) {
+ var cmd tea.Cmd
+ var cmds []tea.Cmd
+
+ switch msg := msg.(type) {
+ case tea.KeyMsg:
+ switch msg.String() {
+ case "down":
+ if m.shorthandList.Index() == len(m.shorthandList.Items())-1 {
+ // focus text input and hide cursor in shorthand list
+ m.shorthandList.Select(len(m.shorthandList.Items()))
+ m.sortTextInput.Focus()
+ }
+ case "up":
+ if m.sortTextInput.Focused() {
+ // go back to list from text input
+ m.shorthandList.Select(len(m.shorthandList.Items()))
+ m.sortTextInput.Blur()
+ }
+ case "tab":
+ m.isDescending = !m.isDescending
+ }
+
+ if m.sortTextInput.Focused() {
+ m.sortTextInput, cmd = m.sortTextInput.Update(msg)
+ cmds = append(cmds, cmd)
+ }
+ }
+
+ if !m.sortTextInput.Focused() {
+ m.shorthandList, cmd = m.shorthandList.Update(msg)
+ cmds = append(cmds, cmd)
+ }
+
+ return m, tea.Batch(cmds...)
+}
+
+// view returns a string representing the sorting view
+func (m sortingModel) view() string {
+ outputStr := strings.Builder{}
+
+ // draw sort direction
+ outputStr.WriteString(sortDirectionStyle.Render("Sort Direction:"))
+ outputStr.WriteString(" ")
+ if m.isDescending {
+ outputStr.WriteString(descendingStyle.Render(descendingText))
+ } else {
+ outputStr.WriteString(ascendingStyle.Render(ascendingText))
+ }
+ outputStr.WriteString("\n\n")
+
+ // draw list
+ outputStr.WriteString(m.shorthandList.View())
+ outputStr.WriteString("\n")
+
+ // draw text input
+ outputStr.WriteString(m.sortTextInput.View())
+ outputStr.WriteString("\n")
+
+ // draw controls
+ if m.sortTextInput.Focused() {
+ outputStr.WriteString(controlsStyle.Render(sortingTextControls))
+ } else {
+ outputStr.WriteString(controlsStyle.Render(sortingListControls))
+ }
+
+ return outputStr.String()
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/tableView.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/tableView.go
new file mode 100644
index 000000000..9dc05bcee
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/tableView.go
@@ -0,0 +1,473 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+package outputs
+
+import (
+ "fmt"
+ "reflect"
+ "strings"
+
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter"
+ "github.com/charmbracelet/bubbles/key"
+ "github.com/charmbracelet/bubbles/textinput"
+ tea "github.com/charmbracelet/bubbletea"
+ "github.com/charmbracelet/lipgloss"
+ "github.com/evertras/bubble-table/table"
+)
+
+const (
+ // table formatting
+ headerAndFooterPadding = 8
+ headerPadding = 2
+
+ // controls
+ tableControls = "Controls: ↑/↓ - up/down • ←/→ - left/right • shift + ←/→ - pg up/down • e - expand • f - filter • t - trim toggle • space - select • s - sort • q - quit"
+ ellipses = "..."
+
+ jsonPathError = "INVALID JSON PATH"
+)
+
+type tableModel struct {
+ // the model for the table output
+ table table.Model
+
+ // width and rows per page are inaccessible through
+ // bubble tea implementation, so expose them here
+ tableWidth int
+ tableRowsPerPage int
+
+ // the model for the filtering text input
+ filterTextInput textinput.Model
+
+ // shows whether the rows are currently trimmed or not
+ isTrimmed bool
+
+ // the rows that existed on the table's creation
+ originalRows []table.Row
+
+ canSelectRows bool
+}
+
+var (
+ customBorder = table.Border{
+ Top: "─",
+ Left: "│",
+ Right: "│",
+ Bottom: "─",
+
+ TopRight: "╮",
+ TopLeft: "╭",
+ BottomRight: "╯",
+ BottomLeft: "╰",
+
+ TopJunction: "┬",
+ LeftJunction: "├",
+ RightJunction: "┤",
+ BottomJunction: "┴",
+ InnerJunction: "┼",
+
+ InnerDivider: "│",
+ }
+)
+
+// initTableModel initializes and returns a new tableModel based on the given
+// instance type details
+func initTableModel(instanceTypes []*instancetypes.Details) *tableModel {
+ table := createTable(instanceTypes)
+
+ return &tableModel{
+ table: table,
+ tableWidth: initialDimensionVal,
+ filterTextInput: createFilterTextInput(),
+ isTrimmed: false,
+ originalRows: table.GetVisibleRows(),
+ canSelectRows: true,
+ }
+}
+
+// createFilterTextInput creates and styles a text input for filtering
+func createFilterTextInput() textinput.Model {
+ filterTextInput := textinput.New()
+ filterTextInput.Prompt = "Filter: "
+ filterTextInput.PromptStyle = lipgloss.NewStyle().Bold(true)
+
+ return filterTextInput
+}
+
+// createRows creates a row for each instance type in the passed in list
+func createRows(columnsData []*wideColumnsData, instanceTypes []*instancetypes.Details) *[]table.Row {
+ rows := []table.Row{}
+
+ // create a row for each instance type
+ for i, data := range columnsData {
+ rowData := table.RowData{}
+
+ // create a new row by iterating through the column data
+ // struct and using struct tags as column keys
+ structType := reflect.TypeOf(*data)
+ structValue := reflect.ValueOf(*data)
+ for i := 0; i < structType.NumField(); i++ {
+ currField := structType.Field(i)
+ columnName := currField.Tag.Get(columnTag)
+ colValue := structValue.Field(i)
+ rowData[columnName] = getUnderlyingValue(colValue)
+ }
+
+ // add instance type as metaData
+ rowData[instanceTypeKey] = instanceTypes[i]
+
+ // add selected flag as metadata
+ rowData[selectedKey] = false
+
+ newRow := table.NewRow(rowData)
+
+ rows = append(rows, newRow)
+ }
+
+ return &rows
+}
+
+// maxColWidth finds the maximum width element in the given column
+func maxColWidth(columnsData []*wideColumnsData, columnHeader string) int {
+ // default max width is the width of the header itself with padding
+ maxWidth := len(columnHeader) + headerPadding
+
+ for _, data := range columnsData {
+ // get data at given column
+ structType := reflect.TypeOf(*data)
+ structValue := reflect.ValueOf(*data)
+ var underlyingValue interface{}
+ for i := 0; i < structType.NumField(); i++ {
+ currField := structType.Field(i)
+ columnName := currField.Tag.Get(columnTag)
+ if columnName == columnHeader {
+ colValue := structValue.Field(i)
+ underlyingValue = getUnderlyingValue(colValue)
+ break
+ }
+ }
+
+ // see if the width of the current column element exceeds
+ // the previous max width
+ currWidth := len(fmt.Sprintf("%v", underlyingValue))
+ if currWidth > maxWidth {
+ maxWidth = currWidth
+ }
+ }
+
+ return maxWidth
+}
+
+// createColumns creates columns based on the tags in the wideColumnsData
+// struct
+func createColumns(columnsData []*wideColumnsData) *[]table.Column {
+ columns := []table.Column{}
+
+ // iterate through wideColumnsData struct and create a new column for each field tag
+ columnDataStruct := wideColumnsData{}
+ structType := reflect.TypeOf(columnDataStruct)
+ for i := 0; i < structType.NumField(); i++ {
+ columnHeader := structType.Field(i).Tag.Get(columnTag)
+ newCol := table.NewColumn(columnHeader, columnHeader, maxColWidth(columnsData, columnHeader)).
+ WithFiltered(true)
+
+ columns = append(columns, newCol)
+ }
+
+ return &columns
+}
+
+// createTableKeyMap creates a KeyMap with the controls for the table
+func createTableKeyMap() *table.KeyMap {
+ keys := table.KeyMap{
+ RowDown: key.NewBinding(
+ key.WithKeys("down"),
+ ),
+ RowUp: key.NewBinding(
+ key.WithKeys("up"),
+ ),
+ ScrollLeft: key.NewBinding(
+ key.WithKeys("left"),
+ ),
+ ScrollRight: key.NewBinding(
+ key.WithKeys("right"),
+ ),
+ PageDown: key.NewBinding(
+ key.WithKeys("shift+right"),
+ ),
+ PageUp: key.NewBinding(
+ key.WithKeys("shift+left"),
+ ),
+ }
+
+ return &keys
+}
+
+// createTable creates an intractable table which contains information about all of
+// the given instance types
+func createTable(instanceTypes []*instancetypes.Details) table.Model {
+ // calculate and fetch all column data from instance types
+ columnsData := getWideColumnsData(instanceTypes)
+
+ newTable := table.New(*createColumns(columnsData)).
+ WithRows(*createRows(columnsData, instanceTypes)).
+ WithKeyMap(*createTableKeyMap()).
+ WithPageSize(initialDimensionVal).
+ Focused(true).
+ Border(customBorder).
+ WithMaxTotalWidth(initialDimensionVal).
+ WithHorizontalFreezeColumnCount(1).
+ WithBaseStyle(
+ lipgloss.NewStyle().
+ Align((lipgloss.Left)),
+ ).
+ HeaderStyle(lipgloss.NewStyle().Align(lipgloss.Center).Bold(true)).
+ Filtered(true).
+ SelectableRows(true)
+
+ return newTable
+}
+
+// resizeView will change the dimensions of the table in order to accommodate
+// the new window dimensions represented by the given tea.WindowSizeMsg
+func (m tableModel) resizeView(msg tea.WindowSizeMsg) tableModel {
+ // handle width changes
+ m.table = m.table.WithMaxTotalWidth(msg.Width)
+ m.tableWidth = msg.Width
+
+ // handle height changes
+ if headerAndFooterPadding >= msg.Height {
+ // height too short to fit footer and header
+ // so only display 1 row
+ m.table = m.table.WithPageSize(1)
+ m.table = m.table.WithFooterVisibility(false)
+ m.table = m.table.WithHeaderVisibility(false)
+ m.tableRowsPerPage = 1
+ } else {
+ newRowsPerPage := msg.Height - headerAndFooterPadding
+ m.table = m.table.WithPageSize(newRowsPerPage)
+ m.table = m.table.WithFooterVisibility(true)
+ m.table = m.table.WithHeaderVisibility(true)
+ m.tableRowsPerPage = newRowsPerPage
+ }
+
+ return m
+}
+
+// updateFooter updates the page and controls string in the table footer
+func (m tableModel) updateFooter() tableModel {
+ controlsStr := tableControls
+
+ // prevent controls text from wrapping to avoid table misprints
+ pageStr := fmt.Sprintf("Page: %d/%d | ", m.table.CurrentPage(), m.table.MaxPages())
+ if m.tableWidth < len(pageStr)+len(controlsStr) {
+ controlsWidth := m.tableWidth - len(ellipses) - len(pageStr) - 2
+ if controlsWidth < 0 {
+ controlsWidth = 0
+ } else if controlsWidth > len(tableControls) {
+ controlsWidth = len(tableControls)
+ }
+ controlsStr = tableControls[0:controlsWidth] + ellipses
+ }
+
+ renderedControls := controlsStyle.Render(controlsStr)
+ footerStr := fmt.Sprintf("%s%s", pageStr, renderedControls)
+ m.table = m.table.WithStaticFooter(footerStr)
+
+ return m
+}
+
+// update updates the state of the tableModel
+func (m tableModel) update(msg tea.Msg) (tableModel, tea.Cmd) {
+ switch msg := msg.(type) {
+ case tea.KeyMsg:
+ // update filtering input field
+ if m.filterTextInput.Focused() {
+ var cmd tea.Cmd
+ if msg.String() == "enter" || msg.String() == "esc" {
+ // exit filter input and update controls string
+ m.filterTextInput.Blur()
+ m = m.updateFooter()
+ } else {
+ m.filterTextInput, cmd = m.filterTextInput.Update(msg)
+ }
+
+ m.table = m.table.WithFilterInput(m.filterTextInput)
+ return m, cmd
+ }
+
+ // listen for specific inputs
+ switch msg.String() {
+ case "f":
+ // focus filter input field
+ m.filterTextInput.Focus()
+ case "t":
+ // handle trimming to selected rows
+ if m.isTrimmed {
+ // undo trim
+ m = m.untrim()
+ m.isTrimmed = false
+ } else {
+ // trim
+ m = m.trim()
+ m.isTrimmed = true
+ }
+ case " ":
+ // custom toggling of selected rows because bubble tea implementation
+ // breaks trimming
+ if m.canSelectRows {
+ originalRows := m.getUnfilteredRows()
+
+ selectedRow := m.table.HighlightedRow()
+ isSelected, ok := selectedRow.Data[selectedKey].(bool)
+ if !ok {
+ break
+ }
+
+ // flip selected flag
+ selectedRow.Data[selectedKey] = !isSelected
+ selectedRow = selectedRow.Selected(!isSelected)
+
+ // update selected row with new selected state. Must iterate through
+ // original rows since the cursor index in the bubble tea table
+ // takes the filter into account and therefore returns an incorrect index
+ for i, row := range originalRows {
+ if row.Data[instanceTypeKey] == selectedRow.Data[instanceTypeKey] {
+ originalRows[i] = selectedRow
+ break
+ }
+ }
+
+ m.table = m.table.WithRows(originalRows)
+ }
+ }
+ }
+
+ var cmd tea.Cmd
+ m.table, cmd = m.table.Update(msg)
+
+ // update footer
+ m = m.updateFooter()
+
+ return m, cmd
+}
+
+// view returns a string representing the table view
+func (m tableModel) view() string {
+ outputStr := strings.Builder{}
+
+ outputStr.WriteString(m.table.View())
+ outputStr.WriteString("\n")
+
+ if m.table.GetIsFilterActive() || m.filterTextInput.Focused() {
+ outputStr.WriteString(m.filterTextInput.View())
+ outputStr.WriteString("\n")
+ }
+
+ return outputStr.String()
+}
+
+// sortTable sorts the table based on the sorting direction and sorting filter
+func (m tableModel) sortTable(sortFilter string, sortDirection string) (tableModel, error) {
+ instanceTypes, rowMap := m.getInstanceTypeFromRows()
+ _ = rowMap
+
+ // sort instance types
+ instanceTypes, err := sorter.Sort(instanceTypes, sortFilter, sortDirection)
+ if err != nil {
+ return m, err
+ }
+
+ // get sorted rows from sorted instance types
+ rows := []table.Row{}
+ for _, instance := range instanceTypes {
+ currRow := rowMap[string(instance.InstanceType)]
+ rows = append(rows, currRow)
+ }
+
+ m.table = m.table.WithRows(rows)
+
+ // apply truncation if needed
+ if m.isTrimmed {
+ m = m.trim()
+ }
+
+ return m, nil
+}
+
+// getInstanceTypeFromRows goes through the rows of the table model and returns both a list of instance
+// types and a mapping of instances to rows
+func (m tableModel) getInstanceTypeFromRows() ([]*instancetypes.Details, map[string]table.Row) {
+ instanceTypes := []*instancetypes.Details{}
+ rowMap := make(map[string]table.Row)
+
+ // get current rows
+ var rows []table.Row
+ if m.isTrimmed {
+ // if current table is trimmed, get the stored untrimmed rows
+ rows = m.originalRows
+ } else {
+ // since table isn't trimmed, we should get the unfiltered rows
+ // so that our rows have the most updated selected flags
+ rows = m.getUnfilteredRows()
+ }
+
+ for _, row := range rows {
+ currInstance, ok := row.Data[instanceTypeKey].(*instancetypes.Details)
+ if !ok {
+ continue
+ }
+
+ instanceTypes = append(instanceTypes, currInstance)
+ rowMap[string(currInstance.InstanceType)] = row
+ }
+
+ return instanceTypes, rowMap
+}
+
+// getUnfilteredRows gets the rows in the given table model without any filtering applied
+func (m tableModel) getUnfilteredRows() []table.Row {
+ m.table = m.table.Filtered(false)
+ rows := m.table.GetVisibleRows()
+
+ return rows
+}
+
+// trim will trim the table to only the selected rows
+func (m tableModel) trim() tableModel {
+ // store current state of rows before trimming
+ m.originalRows = m.getUnfilteredRows()
+
+ // prevent rows from being selected until trim is
+ // undone
+ m.table = m.table.SelectableRows(false)
+ m.canSelectRows = false
+
+ m.table = m.table.WithRows(m.table.SelectedRows())
+ m.isTrimmed = true
+
+ return m
+}
+
+// untrim will return the table to the original rows
+func (m tableModel) untrim() tableModel {
+ m.table = m.table.WithRows(m.originalRows)
+
+ // allow rows to be selected again
+ m.table = m.table.SelectableRows(true)
+ m.canSelectRows = true
+
+ return m
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/verboseView.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/verboseView.go
new file mode 100644
index 000000000..0852f73da
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs/verboseView.go
@@ -0,0 +1,119 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+package outputs
+
+import (
+ "fmt"
+ "math"
+ "strings"
+
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
+ ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ "github.com/charmbracelet/bubbles/viewport"
+ tea "github.com/charmbracelet/bubbletea"
+ "github.com/charmbracelet/lipgloss"
+)
+
+const (
+ // verbose view formatting
+ outlinePadding = 8
+
+ // controls
+ verboseControls = "Controls: ↑/↓ - up/down • esc - return to table • q - quit"
+)
+
+// verboseModel represents the current state of the verbose view
+type verboseModel struct {
+ // model for verbose output viewport
+ viewport viewport.Model
+
+ // the instance which the verbose output is focused on
+ focusedInstanceName ec2types.InstanceType
+}
+
+// styling for viewport
+var (
+ titleStyle = func() lipgloss.Style {
+ b := lipgloss.RoundedBorder()
+ b.Right = "├"
+ return lipgloss.NewStyle().BorderStyle(b).Padding(0, 1)
+ }()
+
+ infoStyle = func() lipgloss.Style {
+ b := lipgloss.RoundedBorder()
+ b.Left = "┤"
+ return titleStyle.Copy().BorderStyle(b)
+ }()
+)
+
+// initVerboseModel initializes and returns a new verboseModel based on the given
+// instance type details
+func initVerboseModel(instanceTypes []*instancetypes.Details) *verboseModel {
+ viewportModel := viewport.New(initialDimensionVal, initialDimensionVal)
+ viewportModel.MouseWheelEnabled = true
+
+ return &verboseModel{
+ viewport: viewportModel,
+ }
+}
+
+// resizeView will change the dimensions of the verbose viewport in order to accommodate
+// the new window dimensions represented by the given tea.WindowSizeMsg
+func (m verboseModel) resizeView(msg tea.WindowSizeMsg) verboseModel {
+ // handle width changes
+ m.viewport.Width = msg.Width
+
+ // handle height changes
+ if outlinePadding >= msg.Height {
+ // height too short to fit viewport
+ m.viewport.Height = 0
+ } else {
+ newHeight := msg.Height - outlinePadding
+ m.viewport.Height = newHeight
+ }
+
+ return m
+}
+
+// update updates the state of the verboseModel
+func (m verboseModel) update(msg tea.Msg) (verboseModel, tea.Cmd) {
+ var cmd tea.Cmd
+ m.viewport, cmd = m.viewport.Update(msg)
+ return m, cmd
+}
+
+func (m verboseModel) view() string {
+ outputStr := strings.Builder{}
+
+ // format header for viewport
+ instanceName := titleStyle.Render(string(m.focusedInstanceName))
+ line := strings.Repeat("─", int(math.Max(0, float64(m.viewport.Width-lipgloss.Width(instanceName)))))
+ outputStr.WriteString(lipgloss.JoinHorizontal(lipgloss.Center, instanceName, line))
+ outputStr.WriteString("\n")
+
+ outputStr.WriteString(m.viewport.View())
+ outputStr.WriteString("\n")
+
+ // format footer for viewport
+ pagePercentage := infoStyle.Render(fmt.Sprintf("%3.f%%", m.viewport.ScrollPercent()*100))
+ line = strings.Repeat("─", int(math.Max(0, float64(m.viewport.Width-lipgloss.Width(pagePercentage)))))
+ outputStr.WriteString(lipgloss.JoinHorizontal(lipgloss.Center, line, pagePercentage))
+ outputStr.WriteString("\n")
+
+ // controls
+ outputStr.WriteString(controlsStyle.Render(verboseControls))
+ outputStr.WriteString("\n")
+
+ return outputStr.String()
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/selector.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/selector.go
new file mode 100644
index 000000000..897864c34
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/selector.go
@@ -0,0 +1,706 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+// Package selector provides filtering logic for Amazon EC2 Instance Types based on declarative resource specfications.
+package selector
+
+import (
+ "context"
+ "fmt"
+ "log"
+ "reflect"
+ "regexp"
+ "sort"
+ "strings"
+ "sync"
+ "time"
+
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing"
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/ec2"
+ ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ "go.uber.org/multierr"
+)
+
+var (
+ // Version is overridden at compilation with the version based on the git tag
+ versionID = "dev"
+)
+
+const (
+ locationFilterKey = "location"
+ zoneIDLocationType = ec2types.LocationTypeAvailabilityZoneId
+ zoneNameLocationType = ec2types.LocationTypeAvailabilityZone
+ regionNameLocationType = ec2types.LocationTypeRegion
+ sdkName = "instance-selector"
+
+ // Filter Keys
+
+ cpuArchitecture = "cpuArchitecture"
+ cpuManufacturer = "cpuManufacturer"
+ usageClass = "usageClass"
+ rootDeviceType = "rootDeviceType"
+ hibernationSupported = "hibernationSupported"
+ vcpusRange = "vcpusRange"
+ memoryRange = "memoryRange"
+ gpuMemoryRange = "gpuMemoryRange"
+ gpusRange = "gpusRange"
+ gpuManufacturer = "gpuManufacturer"
+ gpuModel = "gpuModel"
+ inferenceAcceleratorsRange = "inferenceAcceleratorsRange"
+ inferenceAcceleratorManufacturer = "inferenceAcceleartorManufacturer"
+ inferenceAcceleratorModel = "inferenceAcceleratorModel"
+ placementGroupStrategy = "placementGroupStrategy"
+ hypervisor = "hypervisor"
+ baremetal = "baremetal"
+ burstable = "burstable"
+ fpga = "fpga"
+ enaSupport = "enaSupport"
+ efaSupport = "efaSupport"
+ vcpusToMemoryRatio = "vcpusToMemoryRatio"
+ currentGeneration = "currentGeneration"
+ networkInterfaces = "networkInterfaces"
+ networkPerformance = "networkPerformance"
+ networkEncryption = "networkEncryption"
+ ipv6 = "ipv6"
+ allowList = "allowList"
+ denyList = "denyList"
+ instanceTypes = "instanceTypes"
+ virtualizationType = "virtualizationType"
+ instanceStorageRange = "instanceStorageRange"
+ diskEncryption = "diskEncryption"
+ diskType = "diskType"
+ nvme = "nvme"
+ ebsOptimized = "ebsOptimized"
+ ebsOptimizedBaselineBandwidth = "ebsOptimizedBaselineBandwidth"
+ ebsOptimizedBaselineIOPS = "ebsOptimizedBaselineIOPS"
+ ebsOptimizedBaselineThroughput = "ebsOptimizedBaselineThroughput"
+ freeTier = "freeTier"
+ autoRecovery = "autoRecovery"
+ dedicatedHosts = "dedicatedHosts"
+
+ cpuArchitectureAMD64 = "amd64"
+
+ virtualizationTypePV = "pv"
+
+ pricePerHour = "pricePerHour"
+)
+
+// New creates an instance of Selector provided an aws session
+func New(ctx context.Context, cfg aws.Config) (*Selector, error) {
+ serviceRegistry := NewRegistry()
+ serviceRegistry.RegisterAWSServices()
+ ec2Client := ec2.NewFromConfig(cfg, func(options *ec2.Options) {
+ options.APIOptions = append(options.APIOptions, middleware.AddUserAgentKeyValue(sdkName, versionID))
+ })
+ pricingClient, err := ec2pricing.New(ctx, cfg)
+ if err != nil {
+ return nil, err
+ }
+
+ return &Selector{
+ EC2: ec2Client,
+ EC2Pricing: pricingClient,
+ InstanceTypesProvider: instancetypes.LoadFromOrNew("", cfg.Region, 0, ec2Client),
+ ServiceRegistry: serviceRegistry,
+ }, nil
+}
+
+func NewWithCache(ctx context.Context, cfg aws.Config, ttl time.Duration, cacheDir string) (*Selector, error) {
+ serviceRegistry := NewRegistry()
+ serviceRegistry.RegisterAWSServices()
+ ec2Client := ec2.NewFromConfig(cfg, func(options *ec2.Options) {
+ options.APIOptions = append(options.APIOptions, middleware.AddUserAgentKeyValue(sdkName, versionID))
+ })
+ pricingClient, err := ec2pricing.NewWithCache(ctx, cfg, ttl, cacheDir)
+ if err != nil {
+ return nil, err
+ }
+
+ return &Selector{
+ EC2: ec2Client,
+ EC2Pricing: pricingClient,
+ InstanceTypesProvider: instancetypes.LoadFromOrNew(cacheDir, cfg.Region, ttl, ec2Client),
+ ServiceRegistry: serviceRegistry,
+ }, nil
+}
+
+func (itf Selector) Save() error {
+ return multierr.Append(itf.EC2Pricing.Save(), itf.InstanceTypesProvider.Save())
+}
+
+// Filter accepts a Filters struct which is used to select the available instance types
+// matching the criteria within Filters and returns a simple list of instance type strings
+//
+// Deprecated: This function will be replaced with GetFilteredInstanceTypes() and
+// OutputInstanceTypes() in the next major version.
+func (itf Selector) Filter(ctx context.Context, filters Filters) ([]string, error) {
+ outputFn := InstanceTypesOutputFn(outputs.SimpleInstanceTypeOutput)
+ output, _, err := itf.FilterWithOutput(ctx, filters, outputFn)
+ return output, err
+}
+
+// FilterVerbose accepts a Filters struct which is used to select the available instance types
+// matching the criteria within Filters and returns a list instanceTypeInfo
+//
+// Deprecated: This function will be replaced with GetFilteredInstanceTypes() in the next
+// major version.
+func (itf Selector) FilterVerbose(ctx context.Context, filters Filters) ([]*instancetypes.Details, error) {
+ instanceTypeInfoSlice, err := itf.rawFilter(ctx, filters)
+ if err != nil {
+ return nil, err
+ }
+ instanceTypeInfoSlice, _ = itf.truncateResults(filters.MaxResults, instanceTypeInfoSlice)
+ return instanceTypeInfoSlice, nil
+}
+
+// FilterWithOutput accepts a Filters struct which is used to select the available instance types
+// matching the criteria within Filters and returns a list of strings based on the custom outputFn
+//
+// Deprecated: This function will be replaced with GetFilteredInstanceTypes() and
+// OutputInstanceTypes() in the next major version.
+func (itf Selector) FilterWithOutput(ctx context.Context, filters Filters, outputFn InstanceTypesOutput) ([]string, int, error) {
+ instanceTypeInfoSlice, err := itf.rawFilter(ctx, filters)
+ if err != nil {
+ return nil, 0, err
+ }
+ instanceTypeInfoSlice, numOfItemsTruncated := itf.truncateResults(filters.MaxResults, instanceTypeInfoSlice)
+ output := outputFn.Output(instanceTypeInfoSlice)
+ return output, numOfItemsTruncated, nil
+}
+
+func (itf Selector) truncateResults(maxResults *int, instanceTypeInfoSlice []*instancetypes.Details) ([]*instancetypes.Details, int) {
+ if maxResults == nil {
+ return instanceTypeInfoSlice, 0
+ }
+ upperIndex := *maxResults
+ if *maxResults > len(instanceTypeInfoSlice) {
+ upperIndex = len(instanceTypeInfoSlice)
+ }
+ return instanceTypeInfoSlice[0:upperIndex], len(instanceTypeInfoSlice) - upperIndex
+}
+
+// AggregateFilterTransform takes higher level filters which are used to affect multiple raw filters in an opinionated way.
+func (itf Selector) AggregateFilterTransform(ctx context.Context, filters Filters) (Filters, error) {
+ transforms := []FiltersTransform{
+ TransformFn(itf.TransformBaseInstanceType),
+ TransformFn(itf.TransformFlexible),
+ TransformFn(itf.TransformForService),
+ }
+ var err error
+ for _, transform := range transforms {
+ filters, err = transform.Transform(ctx, filters)
+ if err != nil {
+ return filters, err
+ }
+ }
+ return filters, nil
+}
+
+// rawFilter accepts a Filters struct which is used to select the available instance types
+// matching the criteria within Filters and returns the detailed specs of matching instance types
+func (itf Selector) rawFilter(ctx context.Context, filters Filters) ([]*instancetypes.Details, error) {
+ filters, err := itf.AggregateFilterTransform(ctx, filters)
+ if err != nil {
+ return nil, err
+ }
+ var locations, availabilityZones []string
+
+ if filters.CPUArchitecture != nil && *filters.CPUArchitecture == cpuArchitectureAMD64 {
+ *filters.CPUArchitecture = ec2types.ArchitectureTypeX8664
+ }
+ if filters.VirtualizationType != nil && *filters.VirtualizationType == virtualizationTypePV {
+ *filters.VirtualizationType = ec2types.VirtualizationTypeParavirtual
+ }
+ if filters.AvailabilityZones != nil {
+ availabilityZones = *filters.AvailabilityZones
+ locations = *filters.AvailabilityZones
+ } else if filters.Region != nil {
+ locations = []string{*filters.Region}
+ }
+ locationInstanceOfferings, err := itf.RetrieveInstanceTypesSupportedInLocations(ctx, locations)
+ if err != nil {
+ return nil, err
+ }
+
+ instanceTypeDetails, err := itf.InstanceTypesProvider.Get(ctx, nil)
+ if err != nil {
+ return nil, err
+ }
+ filteredInstanceTypes := []*instancetypes.Details{}
+ var wg sync.WaitGroup
+ instanceTypes := make(chan *instancetypes.Details, len(instanceTypeDetails))
+ for _, instanceTypeInfo := range instanceTypeDetails {
+ wg.Add(1)
+ go func(instanceTypeInfo instancetypes.Details) {
+ defer wg.Done()
+ it, err := itf.prepareFilter(ctx, filters, instanceTypeInfo, availabilityZones, locationInstanceOfferings)
+ if err != nil {
+ log.Println(err)
+ }
+ if it != nil {
+ instanceTypes <- it
+ }
+ }(*instanceTypeInfo)
+ }
+ wg.Wait()
+ close(instanceTypes)
+ for it := range instanceTypes {
+ filteredInstanceTypes = append(filteredInstanceTypes, it)
+ }
+ return sortInstanceTypeInfo(filteredInstanceTypes), nil
+}
+
+func (itf Selector) prepareFilter(ctx context.Context, filters Filters, instanceTypeInfo instancetypes.Details, availabilityZones []string, locationInstanceOfferings map[ec2types.InstanceType]string) (*instancetypes.Details, error) {
+ instanceTypeName := instanceTypeInfo.InstanceType
+ isFpga := instanceTypeInfo.FpgaInfo != nil
+ var instanceTypeHourlyPriceForFilter float64 // Price used to filter based on usage class
+ var instanceTypeHourlyPriceOnDemand, instanceTypeHourlyPriceSpot *float64
+ // If prices are fetched, populate the fields irrespective of the price filters
+ if itf.EC2Pricing.OnDemandCacheCount() > 0 {
+ price, err := itf.EC2Pricing.GetOnDemandInstanceTypeCost(ctx, instanceTypeName)
+ if err != nil {
+ log.Printf("Could not retrieve instantaneous hourly on-demand price for instance type %s - %s\n", instanceTypeName, err)
+ } else {
+ instanceTypeHourlyPriceOnDemand = &price
+ instanceTypeInfo.OndemandPricePerHour = instanceTypeHourlyPriceOnDemand
+ }
+ }
+
+ isSpotUsageClass := false
+ for _, it := range instanceTypeInfo.SupportedUsageClasses {
+ if it == ec2types.UsageClassTypeSpot {
+ isSpotUsageClass = true
+ }
+ }
+
+ if itf.EC2Pricing.SpotCacheCount() > 0 && isSpotUsageClass {
+ price, err := itf.EC2Pricing.GetSpotInstanceTypeNDayAvgCost(ctx, instanceTypeName, availabilityZones, 30)
+ if err != nil {
+ log.Printf("Could not retrieve 30 day avg hourly spot price for instance type %s\n", instanceTypeName)
+ } else {
+ instanceTypeHourlyPriceSpot = &price
+ instanceTypeInfo.SpotPrice = instanceTypeHourlyPriceSpot
+ }
+ }
+ if filters.PricePerHour != nil {
+ // If price filter is present, prices should be already fetched
+ // If prices are not fetched, filter should fail and the corresponding error is already printed
+ if filters.UsageClass != nil && *filters.UsageClass == ec2types.UsageClassTypeSpot && instanceTypeHourlyPriceSpot != nil {
+ instanceTypeHourlyPriceForFilter = *instanceTypeHourlyPriceSpot
+ } else if instanceTypeHourlyPriceOnDemand != nil {
+ instanceTypeHourlyPriceForFilter = *instanceTypeHourlyPriceOnDemand
+ }
+ }
+ eneaSupport := string(instanceTypeInfo.NetworkInfo.EnaSupport)
+ ebsOptimizedSupport := string(instanceTypeInfo.EbsInfo.EbsOptimizedSupport)
+
+ // filterToInstanceSpecMappingPairs is a map of filter name [key] to filter pair [value].
+ // A filter pair includes user input filter value and instance spec value retrieved from DescribeInstanceTypes
+ filterToInstanceSpecMappingPairs := map[string]filterPair{
+ cpuArchitecture: {filters.CPUArchitecture, instanceTypeInfo.ProcessorInfo.SupportedArchitectures},
+ cpuManufacturer: {filters.CPUManufacturer, getCPUManufacturer(&instanceTypeInfo.InstanceTypeInfo)},
+ usageClass: {filters.UsageClass, instanceTypeInfo.SupportedUsageClasses},
+ rootDeviceType: {filters.RootDeviceType, instanceTypeInfo.SupportedRootDeviceTypes},
+ hibernationSupported: {filters.HibernationSupported, instanceTypeInfo.HibernationSupported},
+ vcpusRange: {filters.VCpusRange, instanceTypeInfo.VCpuInfo.DefaultVCpus},
+ memoryRange: {filters.MemoryRange, instanceTypeInfo.MemoryInfo.SizeInMiB},
+ gpuMemoryRange: {filters.GpuMemoryRange, getTotalGpuMemory(instanceTypeInfo.GpuInfo)},
+ gpusRange: {filters.GpusRange, getTotalGpusCount(instanceTypeInfo.GpuInfo)},
+ inferenceAcceleratorsRange: {filters.InferenceAcceleratorsRange, getTotalAcceleratorsCount(instanceTypeInfo.InferenceAcceleratorInfo)},
+ placementGroupStrategy: {filters.PlacementGroupStrategy, instanceTypeInfo.PlacementGroupInfo.SupportedStrategies},
+ hypervisor: {filters.Hypervisor, instanceTypeInfo.Hypervisor},
+ baremetal: {filters.BareMetal, instanceTypeInfo.BareMetal},
+ burstable: {filters.Burstable, instanceTypeInfo.BurstablePerformanceSupported},
+ fpga: {filters.Fpga, &isFpga},
+ enaSupport: {filters.EnaSupport, supportSyntaxToBool(&eneaSupport)},
+ efaSupport: {filters.EfaSupport, instanceTypeInfo.NetworkInfo.EfaSupported},
+ vcpusToMemoryRatio: {filters.VCpusToMemoryRatio, calculateVCpusToMemoryRatio(instanceTypeInfo.VCpuInfo.DefaultVCpus, instanceTypeInfo.MemoryInfo.SizeInMiB)},
+ currentGeneration: {filters.CurrentGeneration, instanceTypeInfo.CurrentGeneration},
+ networkInterfaces: {filters.NetworkInterfaces, instanceTypeInfo.NetworkInfo.MaximumNetworkInterfaces},
+ networkPerformance: {filters.NetworkPerformance, getNetworkPerformance(instanceTypeInfo.NetworkInfo.NetworkPerformance)},
+ networkEncryption: {filters.NetworkEncryption, instanceTypeInfo.NetworkInfo.EncryptionInTransitSupported},
+ ipv6: {filters.IPv6, instanceTypeInfo.NetworkInfo.Ipv6Supported},
+ instanceTypes: {filters.InstanceTypes, instanceTypeInfo.InstanceType},
+ virtualizationType: {filters.VirtualizationType, instanceTypeInfo.SupportedVirtualizationTypes},
+ pricePerHour: {filters.PricePerHour, &instanceTypeHourlyPriceForFilter},
+ instanceStorageRange: {filters.InstanceStorageRange, getInstanceStorage(instanceTypeInfo.InstanceStorageInfo)},
+ diskType: {filters.DiskType, getDiskType(instanceTypeInfo.InstanceStorageInfo)},
+ nvme: {filters.NVME, getNVMESupport(instanceTypeInfo.InstanceStorageInfo, instanceTypeInfo.EbsInfo)},
+ ebsOptimized: {filters.EBSOptimized, supportSyntaxToBool(&ebsOptimizedSupport)},
+ diskEncryption: {filters.DiskEncryption, getDiskEncryptionSupport(instanceTypeInfo.InstanceStorageInfo, instanceTypeInfo.EbsInfo)},
+ ebsOptimizedBaselineBandwidth: {filters.EBSOptimizedBaselineBandwidth, getEBSOptimizedBaselineBandwidth(instanceTypeInfo.EbsInfo)},
+ ebsOptimizedBaselineThroughput: {filters.EBSOptimizedBaselineThroughput, getEBSOptimizedBaselineThroughput(instanceTypeInfo.EbsInfo)},
+ ebsOptimizedBaselineIOPS: {filters.EBSOptimizedBaselineIOPS, getEBSOptimizedBaselineIOPS(instanceTypeInfo.EbsInfo)},
+ freeTier: {filters.FreeTier, instanceTypeInfo.FreeTierEligible},
+ autoRecovery: {filters.AutoRecovery, instanceTypeInfo.AutoRecoverySupported},
+ gpuManufacturer: {filters.GPUManufacturer, getGPUManufacturers(instanceTypeInfo.GpuInfo)},
+ gpuModel: {filters.GPUModel, getGPUModels(instanceTypeInfo.GpuInfo)},
+ inferenceAcceleratorManufacturer: {filters.InferenceAcceleratorManufacturer, getInferenceAcceleratorManufacturers(instanceTypeInfo.InferenceAcceleratorInfo)},
+ inferenceAcceleratorModel: {filters.InferenceAcceleratorModel, getInferenceAcceleratorModels(instanceTypeInfo.InferenceAcceleratorInfo)},
+ dedicatedHosts: {filters.DedicatedHosts, instanceTypeInfo.DedicatedHostsSupported},
+ }
+
+ if isInDenyList(filters.DenyList, instanceTypeName) || !isInAllowList(filters.AllowList, instanceTypeName) {
+ return nil, nil
+ }
+
+ if !isSupportedInLocation(locationInstanceOfferings, instanceTypeName) {
+ return nil, nil
+ }
+
+ var isInstanceSupported bool
+ isInstanceSupported, err := itf.executeFilters(ctx, filterToInstanceSpecMappingPairs, instanceTypeName)
+ if err != nil {
+ return nil, err
+ }
+ if !isInstanceSupported {
+ return nil, nil
+ }
+ return &instanceTypeInfo, nil
+}
+
+// sortInstanceTypeInfo will sort based on instance type info alpha-numerically
+func sortInstanceTypeInfo(instanceTypeInfoSlice []*instancetypes.Details) []*instancetypes.Details {
+ if len(instanceTypeInfoSlice) < 2 {
+ return instanceTypeInfoSlice
+ }
+ sort.Slice(instanceTypeInfoSlice, func(i, j int) bool {
+ iInstanceInfo := instanceTypeInfoSlice[i]
+ jInstanceInfo := instanceTypeInfoSlice[j]
+ return strings.Compare(string(iInstanceInfo.InstanceType), string(jInstanceInfo.InstanceType)) <= 0
+ })
+ return instanceTypeInfoSlice
+}
+
+// executeFilters accepts a mapping of filter name to filter pairs which are iterated through
+// to determine if the instance type matches the filter values.
+func (itf Selector) executeFilters(ctx context.Context, filterToInstanceSpecMapping map[string]filterPair, instanceType ec2types.InstanceType) (bool, error) {
+ verdict := make(chan bool, len(filterToInstanceSpecMapping)+1)
+ errs := make(chan error)
+ ctx, cancel := context.WithCancel(ctx)
+ defer cancel()
+ var wg sync.WaitGroup
+ for filterName, filter := range filterToInstanceSpecMapping {
+ wg.Add(1)
+ go func(ctx context.Context, filterName string, filter filterPair) {
+ defer wg.Done()
+ select {
+ case <-ctx.Done():
+ return
+ default:
+ ok, err := exec(instanceType, filterName, filter)
+ if err != nil {
+ errs <- err
+ }
+ if !ok {
+ verdict <- false
+ }
+ }
+ }(ctx, filterName, filter)
+ }
+ go func() {
+ wg.Wait()
+ verdict <- true
+ }()
+
+ if <-verdict {
+ return true, nil
+ }
+ cancel()
+ var err error
+ for {
+ select {
+ case e := <-errs:
+ err = multierr.Append(err, e)
+ default:
+ return false, err
+ }
+ }
+}
+
+func exec(instanceType ec2types.InstanceType, filterName string, filter filterPair) (bool, error) {
+ filterVal := filter.filterValue
+ instanceSpec := filter.instanceSpec
+ filterValReflection := reflect.ValueOf(filterVal)
+ // if filter is nil, user did not specify a filter, so skip evaluation
+ if filterValReflection.IsNil() {
+ return true, nil
+ }
+ instanceSpecType := reflect.ValueOf(instanceSpec).Type()
+ filterType := filterValReflection.Type()
+ filterDetailsMsg := fmt.Sprintf("filter (%s: %s => %s) corresponding to instance spec (%s => %s) for instance type %s", filterName, filterVal, filterType, instanceSpec, instanceSpecType, instanceType)
+ invalidInstanceSpecTypeMsg := fmt.Sprintf("Unable to process for %s", filterDetailsMsg)
+
+ // Determine appropriate filter comparator by switching on filter type
+ switch filter := filterVal.(type) {
+ case *string:
+ switch iSpec := instanceSpec.(type) {
+ case []*string:
+ if !isSupportedFromStrings(iSpec, filter) {
+ return false, nil
+ }
+ case *string:
+ if !isSupportedFromString(iSpec, filter) {
+ return false, nil
+ }
+ default:
+ return false, fmt.Errorf(invalidInstanceSpecTypeMsg)
+ }
+ case *bool:
+ switch iSpec := instanceSpec.(type) {
+ case *bool:
+ if !isSupportedWithBool(iSpec, filter) {
+ return false, nil
+ }
+ default:
+ return false, fmt.Errorf(invalidInstanceSpecTypeMsg)
+ }
+ case *IntRangeFilter:
+ switch iSpec := instanceSpec.(type) {
+ case *int64:
+ if !isSupportedWithRangeInt64(iSpec, filter) {
+ return false, nil
+ }
+ case *int:
+ if !isSupportedWithRangeInt(iSpec, filter) {
+ return false, nil
+ }
+ default:
+ return false, fmt.Errorf(invalidInstanceSpecTypeMsg)
+ }
+ case *Int32RangeFilter:
+ switch iSpec := instanceSpec.(type) {
+ case *int32:
+ if !isSupportedWithRangeInt32(iSpec, filter) {
+ return false, nil
+ }
+ default:
+ return false, fmt.Errorf(invalidInstanceSpecTypeMsg)
+ }
+ case *Float64RangeFilter:
+ switch iSpec := instanceSpec.(type) {
+ case *float64:
+ if !isSupportedWithRangeFloat64(iSpec, filter) {
+ return false, nil
+ }
+ default:
+ return false, fmt.Errorf(invalidInstanceSpecTypeMsg)
+ }
+ case *ByteQuantityRangeFilter:
+ mibRange := Uint64RangeFilter{
+ LowerBound: filter.LowerBound.Quantity,
+ UpperBound: filter.UpperBound.Quantity,
+ }
+ switch iSpec := instanceSpec.(type) {
+ case *int:
+ var iSpec64 *int64
+ if iSpec != nil {
+ iSpecVal := int64(*iSpec)
+ iSpec64 = &iSpecVal
+ }
+ if !isSupportedWithRangeUint64(iSpec64, &mibRange) {
+ return false, nil
+ }
+ case *int64:
+ if !isSupportedWithRangeUint64(iSpec, &mibRange) {
+ return false, nil
+ }
+ case *float64:
+ floatMiBRange := Float64RangeFilter{
+ LowerBound: float64(filter.LowerBound.Quantity),
+ UpperBound: float64(filter.UpperBound.Quantity),
+ }
+ if !isSupportedWithRangeFloat64(iSpec, &floatMiBRange) {
+ return false, nil
+ }
+ default:
+ return false, fmt.Errorf(invalidInstanceSpecTypeMsg)
+ }
+ case *float64:
+ switch iSpec := instanceSpec.(type) {
+ case *float64:
+ if !isSupportedWithFloat64(iSpec, filter) {
+ return false, nil
+ }
+ default:
+ return false, fmt.Errorf(invalidInstanceSpecTypeMsg)
+ }
+ case *ec2types.ArchitectureType:
+ switch iSpec := instanceSpec.(type) {
+ case []ec2types.ArchitectureType:
+ if !isSupportedArchitectureType(iSpec, filter) {
+ return false, nil
+ }
+ default:
+ return false, fmt.Errorf(invalidInstanceSpecTypeMsg)
+ }
+ case *ec2types.UsageClassType:
+ switch iSpec := instanceSpec.(type) {
+ case []ec2types.UsageClassType:
+ if !isSupportedUsageClassType(iSpec, filter) {
+ return false, nil
+ }
+ default:
+ return false, fmt.Errorf(invalidInstanceSpecTypeMsg)
+ }
+ case *CPUManufacturer:
+ switch iSpec := instanceSpec.(type) {
+ case CPUManufacturer:
+ if !isMatchingCpuArchitecture(iSpec, filter) {
+ return false, nil
+ }
+ default:
+ return false, fmt.Errorf(invalidInstanceSpecTypeMsg)
+ }
+ case *ec2types.VirtualizationType:
+ switch iSpec := instanceSpec.(type) {
+ case []ec2types.VirtualizationType:
+ if !isSupportedVirtualizationType(iSpec, filter) {
+ return false, nil
+ }
+ default:
+ return false, fmt.Errorf(invalidInstanceSpecTypeMsg)
+ }
+ case *ec2types.InstanceTypeHypervisor:
+ switch iSpec := instanceSpec.(type) {
+ case ec2types.InstanceTypeHypervisor:
+ if !isSupportedInstanceTypeHypervisorType(iSpec, filter) {
+ return false, nil
+ }
+ default:
+ return false, fmt.Errorf(invalidInstanceSpecTypeMsg)
+ }
+ case *ec2types.RootDeviceType:
+ switch iSpec := instanceSpec.(type) {
+ case []ec2types.RootDeviceType:
+ if !isSupportedRootDeviceType(iSpec, filter) {
+ return false, nil
+ }
+ default:
+ return false, fmt.Errorf(invalidInstanceSpecTypeMsg)
+ }
+ case *[]string:
+ switch iSpec := instanceSpec.(type) {
+ case *string:
+ filterOfPtrs := []*string{}
+ for _, f := range *filter {
+ // this allows us to copy a static pointer to f into filterOfPtrs
+ // since the pointer to f is updated on each loop iteration
+ temp := f
+ filterOfPtrs = append(filterOfPtrs, &temp)
+ }
+ if !isSupportedFromStrings(filterOfPtrs, iSpec) {
+ return false, nil
+ }
+ default:
+ return false, fmt.Errorf(invalidInstanceSpecTypeMsg)
+ }
+ default:
+ return false, fmt.Errorf("No filter handler found for %s", filterDetailsMsg)
+ }
+ return true, nil
+}
+
+// RetrieveInstanceTypesSupportedInLocations returns a map of instance type -> AZ or Region for all instance types supported in the intersected locations passed in
+// The location can be a zone-id (ie. use1-az1), a zone-name (us-east-1a), or a region name (us-east-1).
+// Note that zone names are not necessarily the same across accounts
+func (itf Selector) RetrieveInstanceTypesSupportedInLocations(ctx context.Context, locations []string) (map[ec2types.InstanceType]string, error) {
+ if len(locations) == 0 {
+ return nil, nil
+ }
+ availableInstanceTypes := map[ec2types.InstanceType]int{}
+ for _, location := range locations {
+ locationType, err := itf.getLocationType(ctx, location)
+ if err != nil {
+ return nil, err
+ }
+
+ instanceTypeOfferingsInput := &ec2.DescribeInstanceTypeOfferingsInput{
+ LocationType: locationType,
+ Filters: []ec2types.Filter{
+ {
+ Name: aws.String(locationFilterKey),
+ Values: []string{location},
+ },
+ },
+ }
+
+ p := ec2.NewDescribeInstanceTypeOfferingsPaginator(itf.EC2, instanceTypeOfferingsInput)
+
+ for p.HasMorePages() {
+ instanceTypeOfferings, err := p.NextPage(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("Encountered an error when describing instance type offerings: %w", err)
+ }
+
+ for _, instanceType := range instanceTypeOfferings.InstanceTypeOfferings {
+ if i, ok := availableInstanceTypes[instanceType.InstanceType]; !ok {
+ availableInstanceTypes[instanceType.InstanceType] = 1
+ } else {
+ availableInstanceTypes[instanceType.InstanceType] = i + 1
+ }
+ }
+ }
+ }
+ availableInstanceTypesAllLocations := map[ec2types.InstanceType]string{}
+ for instanceType, locationsSupported := range availableInstanceTypes {
+ if locationsSupported == len(locations) {
+ availableInstanceTypesAllLocations[instanceType] = ""
+ }
+ }
+
+ return availableInstanceTypesAllLocations, nil
+}
+
+func (itf Selector) getLocationType(ctx context.Context, location string) (ec2types.LocationType, error) {
+ azs, err := itf.EC2.DescribeAvailabilityZones(ctx, &ec2.DescribeAvailabilityZonesInput{})
+ if err != nil {
+ return "", err
+ }
+ for _, zone := range azs.AvailabilityZones {
+ if location == *zone.RegionName {
+ return regionNameLocationType, nil
+ } else if location == *zone.ZoneName {
+ return zoneNameLocationType, nil
+ } else if location == *zone.ZoneId {
+ return zoneIDLocationType, nil
+ }
+ }
+ return "", fmt.Errorf("The location passed in (%s) is not a valid zone-id, zone-name, or region name", location)
+}
+
+func isSupportedInLocation(instanceOfferings map[ec2types.InstanceType]string, instanceType ec2types.InstanceType) bool {
+ if instanceOfferings == nil {
+ return true
+ }
+ _, ok := instanceOfferings[instanceType]
+ return ok
+}
+
+func isInDenyList(denyRegex *regexp.Regexp, instanceTypeName ec2types.InstanceType) bool {
+ if denyRegex == nil {
+ return false
+ }
+ return denyRegex.MatchString(string(instanceTypeName))
+}
+
+func isInAllowList(allowRegex *regexp.Regexp, instanceTypeName ec2types.InstanceType) bool {
+ if allowRegex == nil {
+ return true
+ }
+ return allowRegex.MatchString(string(instanceTypeName))
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/services.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/services.go
new file mode 100644
index 000000000..b46495c0f
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/services.go
@@ -0,0 +1,91 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+package selector
+
+import (
+ "fmt"
+ "strings"
+
+ "github.com/imdario/mergo"
+)
+
+// Service is used to write custom service filter transforms
+type Service interface {
+ Filters(version string) (Filters, error)
+}
+
+// ServiceFiltersFn is the func type definition for the Service interface
+type ServiceFiltersFn func(version string) (Filters, error)
+
+// Filters implements the Service interface on ServiceFiltersFn
+// This allows any ServiceFiltersFn to be passed into funcs accepting the Service interface
+func (fn ServiceFiltersFn) Filters(version string) (Filters, error) {
+ return fn(version)
+}
+
+// ServiceRegistry is used to register service filter transforms
+type ServiceRegistry struct {
+ services map[string]*Service
+}
+
+// NewRegistry creates a new instance of a ServiceRegistry
+func NewRegistry() ServiceRegistry {
+ return ServiceRegistry{
+ services: make(map[string]*Service),
+ }
+}
+
+// Register takes a service name and Service implementation that will be executed on an ExecuteTransforms call
+func (sr *ServiceRegistry) Register(name string, service Service) {
+ if sr.services == nil {
+ sr.services = make(map[string]*Service)
+ }
+ if name == "" {
+ return
+ }
+ sr.services[name] = &service
+}
+
+// RegisterAWSServices registers the built-in AWS service filter transforms
+func (sr *ServiceRegistry) RegisterAWSServices() {
+ sr.Register("emr", &EMR{})
+}
+
+// ExecuteTransforms will execute the ServiceRegistry's registered service filter transforms
+// Filters.Service will be parsed as - and passed to Service.Filters
+func (sr *ServiceRegistry) ExecuteTransforms(filters Filters) (Filters, error) {
+ if filters.Service == nil || *filters.Service == "" || *filters.Service == "eks" {
+ return filters, nil
+ }
+ serviceAndVersion := strings.ToLower(*filters.Service)
+ versionParts := strings.Split(serviceAndVersion, "-")
+ serviceName := versionParts[0]
+ version := ""
+ if len(versionParts) >= 2 {
+ version = strings.Join(versionParts[1:], "-")
+ }
+ service, ok := sr.services[serviceName]
+ if !ok {
+ return filters, fmt.Errorf("Service %s is not registered", serviceName)
+ }
+
+ serviceFilters, err := (*service).Filters(version)
+ if err != nil {
+ return filters, err
+ }
+ if err := mergo.Merge(&filters, serviceFilters); err != nil {
+ return filters, err
+ }
+ return filters, nil
+}
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/types.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/types.go
new file mode 100644
index 000000000..60395ebcb
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/types.go
@@ -0,0 +1,304 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+package selector
+
+import (
+ "encoding/json"
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/awsapi"
+ ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ "regexp"
+
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity"
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing"
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
+)
+
+// InstanceTypesOutput can be implemented to provide custom output to instance type results
+type InstanceTypesOutput interface {
+ Output([]*instancetypes.Details) []string
+}
+
+// InstanceTypesOutputFn is the func type definition for InstanceTypesOuput
+type InstanceTypesOutputFn func([]*instancetypes.Details) []string
+
+// Output implements InstanceTypesOutput interface on InstanceTypesOutputFn
+// This allows any InstanceTypesOutputFn to be passed into funcs accepting InstanceTypesOutput interface
+func (fn InstanceTypesOutputFn) Output(instanceTypes []*instancetypes.Details) []string {
+ return fn(instanceTypes)
+}
+
+// Selector is used to filter instance type resource specs
+type Selector struct {
+ EC2 awsapi.SelectorInterface
+ EC2Pricing ec2pricing.EC2PricingIface
+ InstanceTypesProvider *instancetypes.Provider
+ ServiceRegistry ServiceRegistry
+}
+
+// IntRangeFilter holds an upper and lower bound int
+// The lower and upper bound are used to range filter resource specs
+type IntRangeFilter struct {
+ UpperBound int
+ LowerBound int
+}
+
+// Int32RangeFilter holds an upper and lower bound int
+// The lower and upper bound are used to range filter resource specs
+type Int32RangeFilter struct {
+ UpperBound int32
+ LowerBound int32
+}
+
+// Uint64RangeFilter holds an upper and lower bound uint64
+// The lower and upper bound are used to range filter resource specs
+type Uint64RangeFilter struct {
+ UpperBound uint64
+ LowerBound uint64
+}
+
+// ByteQuantityRangeFilter holds an upper and lower bound byte quantity
+// The lower and upper bound are used to range filter resource specs
+type ByteQuantityRangeFilter struct {
+ UpperBound bytequantity.ByteQuantity
+ LowerBound bytequantity.ByteQuantity
+}
+
+// Float64RangeFilter holds an upper and lower bound float64
+// The lower and upper bound are used to range filter resource specs
+type Float64RangeFilter struct {
+ UpperBound float64
+ LowerBound float64
+}
+
+// filterPair holds a tuple of the passed in filter value and the instance resource spec value
+type filterPair struct {
+ filterValue interface{}
+ instanceSpec interface{}
+}
+
+func getRegexpString(r *regexp.Regexp) *string {
+ if r == nil {
+ return nil
+ }
+ rStr := r.String()
+ return &rStr
+}
+
+// MarshalIndent is used to return a pretty-print json representation of a Filters struct
+func (f *Filters) MarshalIndent(prefix, indent string) ([]byte, error) {
+ type Alias Filters
+ return json.MarshalIndent(&struct {
+ AllowList *string
+ DenyList *string
+ *Alias
+ }{
+ AllowList: getRegexpString(f.AllowList),
+ DenyList: getRegexpString(f.DenyList),
+ Alias: (*Alias)(f),
+ }, prefix, indent)
+}
+
+// Filters is used to group instance type resource attributes for filtering
+type Filters struct {
+ // AvailabilityZones is the AWS Availability Zones where instances will be provisioned.
+ // Instance type capacity can vary between availability zones.
+ // Will accept zone names or ids
+ // Example: us-east-1a, us-east-1b, us-east-2a, etc. OR use1-az1, use2-az2, etc.
+ AvailabilityZones *[]string
+
+ // BareMetal is used to only return bare metal instance type results
+ BareMetal *bool
+
+ // Burstable is used to only return burstable instance type results like the t* series
+ Burstable *bool
+
+ // AutoRecovery is used to filter by instance types that support auto recovery
+ AutoRecovery *bool
+
+ // FreeTier is used to filter by instance types that can be used as part of the EC2 free tier
+ FreeTier *bool
+
+ // CPUArchitecture of the EC2 instance type
+ CPUArchitecture *ec2types.ArchitectureType
+
+ // CPUManufacturer is used to filter instance types with a specific CPU manufacturer
+ CPUManufacturer *CPUManufacturer
+
+ // CurrentGeneration returns the latest generation of instance types
+ CurrentGeneration *bool
+
+ // EnaSupport returns instances that can support an Elastic Network Adapter.
+ EnaSupport *bool
+
+ // EfaSupport returns instances that can support an Elastic Fabric Adapter.
+ EfaSupport *bool
+
+ // FPGA is used to only return FPGA instance type results
+ Fpga *bool
+
+ // GpusRange filter is a range of acceptable GPU count available to an EC2 instance type
+ GpusRange *Int32RangeFilter
+
+ // GpuMemoryRange filter is a range of acceptable GPU memory in Gibibytes (GiB) available to an EC2 instance type in aggreagte across all GPUs.
+ GpuMemoryRange *ByteQuantityRangeFilter
+
+ // GPUManufacturer filters by GPU manufacturer
+ GPUManufacturer *string
+
+ // GPUModel filter by the GPU model name
+ GPUModel *string
+
+ // InferenceAcceleratorsRange filters inference accelerators available to the instance type
+ InferenceAcceleratorsRange *IntRangeFilter
+
+ // InferenceAcceleratorManufacturer filters by inference acceleartor manufacturer
+ InferenceAcceleratorManufacturer *string
+
+ // InferenceAcceleratorModel filters by inference accelerator model name
+ InferenceAcceleratorModel *string
+
+ // HibernationSupported denotes whether EC2 hibernate is supported
+ // Possible values are: true or false
+ HibernationSupported *bool
+
+ // Hypervisor is used to return only a specific hypervisor backed instance type
+ // Possibly values are: xen or nitro
+ Hypervisor *ec2types.InstanceTypeHypervisor
+
+ // MaxResults is the maximum number of instance types to return that match the filter criteria
+ MaxResults *int
+
+ // MemoryRange filter is a range of acceptable DRAM memory in Gibibytes (GiB) for the instance type
+ MemoryRange *ByteQuantityRangeFilter
+
+ // NetworkInterfaces filter is a range of the number of ENI attachments an instance type can support
+ NetworkInterfaces *Int32RangeFilter
+
+ // NetworkPerformance filter is a range of network bandwidth an instance type can support
+ NetworkPerformance *IntRangeFilter
+
+ // NetworkEncryption filters for instance types that automatically encrypt network traffic in-transit
+ NetworkEncryption *bool
+
+ // IPv6 filters for instance types that support IPv6
+ IPv6 *bool
+
+ // PlacementGroupStrategy is used to return instance types based on its support
+ // for a specific placement group strategy
+ // Possible values are: cluster, spread, or partition
+ PlacementGroupStrategy *string
+
+ // Region is the AWS Region where instances will be provisioned.
+ // Instance type availability can vary between AWS Regions.
+ // Example: us-east-1, us-east-2, eu-west-1, etc.
+ Region *string
+
+ // RootDeviceType is the backing device of the root storage volume
+ // Possible values are: instance-store or ebs
+ RootDeviceType *ec2types.RootDeviceType
+
+ // UsageClass of the instance EC2 instance type
+ // Possible values are: spot or on-demand
+ UsageClass *ec2types.UsageClassType
+
+ // VCpusRange filter is a range of acceptable VCpus for the instance type
+ VCpusRange *Int32RangeFilter
+
+ // VcpusToMemoryRatio is a ratio of vcpus to memory expressed as a floating point
+ VCpusToMemoryRatio *float64
+
+ // AllowList is a regex of allowed instance types
+ AllowList *regexp.Regexp
+
+ // DenyList is a regex of excluded instance types
+ DenyList *regexp.Regexp
+
+ // InstanceTypeBase is a base instance type which is used to retrieve similarly spec'd instance types
+ InstanceTypeBase *string
+
+ // Flexible finds an opinionated set of general (c, m, r, t, a, etc.) instance types that match a criteria specified
+ // or defaults to 4 vcpus
+ Flexible *bool
+
+ // Service filters instance types based on a service's supported list of instance types
+ // Example: eks or emr
+ Service *string
+
+ // InstanceTypes filters instance types and only allows instance types in this slice
+ InstanceTypes *[]string
+
+ // VirtualizationType is used to return instance types that match either hvm or pv virtualization types
+ VirtualizationType *ec2types.VirtualizationType
+
+ // PricePerHour is used to return instance types that are equal to or cheaper than the specified price
+ PricePerHour *Float64RangeFilter
+
+ // InstanceStorageRange filters on a range of storage available as local disk
+ InstanceStorageRange *ByteQuantityRangeFilter
+
+ // DiskType is the backing storage medium
+ // Possible values are: hdd or ssd
+ DiskType *string
+
+ // NVME filters for NVME disks, including both EBS and local instance storage
+ NVME *bool
+
+ // EBSOptimized filters for instance types that support EBS Optimized
+ EBSOptimized *bool
+
+ // DiskEncryption filters for instance types that support EBS Encryption or local storage encryption
+ DiskEncryption *bool
+
+ // EBSOptimizedBaselineBandwidth filters on a range of bandwidth that an EBS Optimized volume supports
+ EBSOptimizedBaselineBandwidth *ByteQuantityRangeFilter
+
+ // EBSOptimizedBaselineThroughput filters on a range of throughput that an EBS Optimized volume supports
+ EBSOptimizedBaselineThroughput *ByteQuantityRangeFilter
+
+ // EBSOptimizedBaselineIOPS filters on a range of IOPS that an EBS Optimized volume supports
+ EBSOptimizedBaselineIOPS *IntRangeFilter
+
+ // DedicatedHosts filters on instance types that support dedicated hosts tenancy
+ DedicatedHosts *bool
+}
+
+type CPUManufacturer string
+
+// Enum values for CPUManufacturer
+const (
+ CPUManufacturerAWS CPUManufacturer = "aws"
+ CPUManufacturerAMD CPUManufacturer = "amd"
+ CPUManufacturerIntel CPUManufacturer = "intel"
+)
+
+// Values returns all known values for CPUManufacturer. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (CPUManufacturer) Values() []CPUManufacturer {
+ return []CPUManufacturer{
+ "aws",
+ "amd",
+ "intel",
+ }
+}
+
+// ArchitectureTypeAMD64 is a legacy type we support for b/c that isn't in the API
+const (
+ ArchitectureTypeAMD64 ec2types.ArchitectureType = "amd64"
+)
+
+// ArchitectureTypeAMD64 is a legacy type we support for b/c that isn't in the API
+const (
+ VirtualizationTypePv ec2types.VirtualizationType = "pv"
+)
diff --git a/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter/sorter.go b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter/sorter.go
new file mode 100644
index 000000000..311145b0d
--- /dev/null
+++ b/vendor/github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter/sorter.go
@@ -0,0 +1,381 @@
+// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License"). You may
+// not use this file except in compliance with the License. A copy of the
+// License is located at
+//
+// http://aws.amazon.com/apache2.0/
+//
+// or in the "license" file accompanying this file. This file is distributed
+// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+// express or implied. See the License for the specific language governing
+// permissions and limitations under the License.
+
+package sorter
+
+import (
+ "encoding/json"
+ "fmt"
+ "reflect"
+ "sort"
+ "strings"
+
+ "github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes"
+ "github.com/oliveagle/jsonpath"
+)
+
+const (
+ // Sort direction
+
+ SortAscending = "ascending"
+ SortAsc = "asc"
+ SortDescending = "descending"
+ SortDesc = "desc"
+
+ // Not all fields can be reached through a json path (Ex: gpu count)
+ // so we have special flags for such cases.
+
+ GPUCountField = "gpus"
+ InferenceAcceleratorsField = "inference-accelerators"
+
+ // shorthand flags
+
+ VCPUs = "vcpus"
+ Memory = "memory"
+ GPUMemoryTotal = "gpu-memory-total"
+ NetworkInterfaces = "network-interfaces"
+ SpotPrice = "spot-price"
+ ODPrice = "on-demand-price"
+ InstanceStorage = "instance-storage"
+ EBSOptimizedBaselineBandwidth = "ebs-optimized-baseline-bandwidth"
+ EBSOptimizedBaselineThroughput = "ebs-optimized-baseline-throughput"
+ EBSOptimizedBaselineIOPS = "ebs-optimized-baseline-iops"
+
+ // JSON field paths for shorthand flags
+
+ instanceNamePath = ".InstanceType"
+ vcpuPath = ".VCpuInfo.DefaultVCpus"
+ memoryPath = ".MemoryInfo.SizeInMiB"
+ gpuMemoryTotalPath = ".GpuInfo.TotalGpuMemoryInMiB"
+ networkInterfacesPath = ".NetworkInfo.MaximumNetworkInterfaces"
+ spotPricePath = ".SpotPrice"
+ odPricePath = ".OndemandPricePerHour"
+ instanceStoragePath = ".InstanceStorageInfo.TotalSizeInGB"
+ ebsOptimizedBaselineBandwidthPath = ".EbsInfo.EbsOptimizedInfo.BaselineBandwidthInMbps"
+ ebsOptimizedBaselineThroughputPath = ".EbsInfo.EbsOptimizedInfo.BaselineThroughputInMBps"
+ ebsOptimizedBaselineIOPSPath = ".EbsInfo.EbsOptimizedInfo.BaselineIops"
+)
+
+// sorterNode represents a sortable instance type which holds the value
+// to sort by instance sort
+type sorterNode struct {
+ instanceType *instancetypes.Details
+ fieldValue reflect.Value
+}
+
+// sorter is used to sort instance types based on a sorting field
+// and direction
+type sorter struct {
+ sorters []*sorterNode
+ sortField string
+ isDescending bool
+}
+
+// Sort sorts the given instance types by the given field in the given direction
+//
+// sortField is a json path to a field in the instancetypes.Details struct which represents
+// the field to sort instance types by (Ex: ".MemoryInfo.SizeInMiB"). Quantity flags present
+// in the CLI (memory, gpus, etc.) are also accepted.
+//
+// sortDirection represents the direction to sort in. Valid options: "ascending", "asc", "descending", "desc".
+func Sort(instanceTypes []*instancetypes.Details, sortField string, sortDirection string) ([]*instancetypes.Details, error) {
+ sortingKeysMap := map[string]string{
+ VCPUs: vcpuPath,
+ Memory: memoryPath,
+ GPUMemoryTotal: gpuMemoryTotalPath,
+ NetworkInterfaces: networkInterfacesPath,
+ SpotPrice: spotPricePath,
+ ODPrice: odPricePath,
+ InstanceStorage: instanceStoragePath,
+ EBSOptimizedBaselineBandwidth: ebsOptimizedBaselineBandwidthPath,
+ EBSOptimizedBaselineThroughput: ebsOptimizedBaselineThroughputPath,
+ EBSOptimizedBaselineIOPS: ebsOptimizedBaselineIOPSPath,
+ }
+
+ // determine if user used a shorthand for sorting flag
+ if sortFieldShorthandPath, ok := sortingKeysMap[sortField]; ok {
+ sortField = sortFieldShorthandPath
+ }
+
+ sorter, err := newSorter(instanceTypes, sortField, sortDirection)
+ if err != nil {
+ return nil, fmt.Errorf("an error occurred when preparing to sort instance types: %v", err)
+ }
+
+ if err := sorter.sort(); err != nil {
+ return nil, fmt.Errorf("an error occurred when sorting instance types: %v", err)
+ }
+
+ return sorter.instanceTypes(), nil
+}
+
+// newSorter creates a new Sorter object to be used to sort the given instance types
+// based on the sorting field and direction
+//
+// sortField is a json path to a field in the instancetypes.Details struct which represents
+// the field to sort instance types by (Ex: ".MemoryInfo.SizeInMiB").
+//
+// sortDirection represents the direction to sort in. Valid options: "ascending", "asc", "descending", "desc".
+func newSorter(instanceTypes []*instancetypes.Details, sortField string, sortDirection string) (*sorter, error) {
+ var isDescending bool
+ switch sortDirection {
+ case SortDescending, SortDesc:
+ isDescending = true
+ case SortAscending, SortAsc:
+ isDescending = false
+ default:
+ return nil, fmt.Errorf("invalid sort direction: %s (valid options: %s, %s, %s, %s)", sortDirection, SortAscending, SortAsc, SortDescending, SortDesc)
+ }
+
+ sortField = formatSortField(sortField)
+
+ // Create sorterNode objects for each instance type
+ sorters := []*sorterNode{}
+ for _, instanceType := range instanceTypes {
+ newSorter, err := newSorterNode(instanceType, sortField)
+ if err != nil {
+ return nil, fmt.Errorf("error creating sorting node: %v", err)
+ }
+
+ sorters = append(sorters, newSorter)
+ }
+
+ return &sorter{
+ sorters: sorters,
+ sortField: sortField,
+ isDescending: isDescending,
+ }, nil
+}
+
+// formatSortField reformats sortField to match the expected json path format
+// of the json lookup library. Format is unchanged if the sorting field
+// matches one of the special flags.
+func formatSortField(sortField string) string {
+ // check to see if the sorting field matched one of the special exceptions
+ if sortField == GPUCountField || sortField == InferenceAcceleratorsField {
+ return sortField
+ }
+
+ return "$" + sortField
+}
+
+// newSorterNode creates a new sorterNode object which represents the given instance type
+// and can be used in sorting of instance types based on the given sortField
+func newSorterNode(instanceType *instancetypes.Details, sortField string) (*sorterNode, error) {
+ // some important fields (such as gpu count) can not be accessed directly in the instancetypes.Details
+ // struct, so we have special hard-coded flags to handle such cases
+ switch sortField {
+ case GPUCountField:
+ gpuCount := getTotalGpusCount(instanceType)
+ return &sorterNode{
+ instanceType: instanceType,
+ fieldValue: reflect.ValueOf(gpuCount),
+ }, nil
+ case InferenceAcceleratorsField:
+ acceleratorsCount := getTotalAcceleratorsCount(instanceType)
+ return &sorterNode{
+ instanceType: instanceType,
+ fieldValue: reflect.ValueOf(acceleratorsCount),
+ }, nil
+ }
+
+ // convert instance type into json
+ jsonInstanceType, err := json.Marshal(instanceType)
+ if err != nil {
+ return nil, err
+ }
+
+ // unmarshal json instance types in order to get proper format
+ // for json path parsing
+ var jsonData interface{}
+ err = json.Unmarshal(jsonInstanceType, &jsonData)
+ if err != nil {
+ return nil, err
+ }
+
+ // get the desired field from the json data based on the passed in
+ // json path
+ result, err := jsonpath.JsonPathLookup(jsonData, sortField)
+ if err != nil {
+ // handle case where parent objects in path are null
+ // by setting result to nil
+ if err.Error() == "get attribute from null object" {
+ result = nil
+ } else {
+ return nil, fmt.Errorf("error during json path lookup: %v", err)
+ }
+ }
+
+ return &sorterNode{
+ instanceType: instanceType,
+ fieldValue: reflect.ValueOf(result),
+ }, nil
+}
+
+// sort the instance types in the Sorter based on the Sorter's sort field and
+// direction
+func (s *sorter) sort() error {
+ if len(s.sorters) <= 1 {
+ return nil
+ }
+
+ var sortErr error = nil
+
+ sort.Slice(s.sorters, func(i int, j int) bool {
+ valI := s.sorters[i].fieldValue
+ valJ := s.sorters[j].fieldValue
+
+ less, err := isLess(valI, valJ, s.isDescending)
+ if err != nil {
+ sortErr = err
+ }
+
+ return less
+ })
+
+ return sortErr
+}
+
+// isLess determines whether the first value (valI) is less than the
+// second value (valJ) or not
+func isLess(valI, valJ reflect.Value, isDescending bool) (bool, error) {
+ switch valI.Kind() {
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ // if valJ is not an int (can occur if the other value is nil)
+ // then valI is less. This will bubble invalid values to the end
+ vaJKind := valJ.Kind()
+ if vaJKind != reflect.Int && vaJKind != reflect.Int8 && vaJKind != reflect.Int16 && vaJKind != reflect.Int32 && vaJKind != reflect.Int64 {
+ return true, nil
+ }
+
+ if isDescending {
+ return valI.Int() > valJ.Int(), nil
+ } else {
+ return valI.Int() <= valJ.Int(), nil
+ }
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+ // if valJ is not a uint (can occur if the other value is nil)
+ // then valI is less. This will bubble invalid values to the end
+ vaJKind := valJ.Kind()
+ if vaJKind != reflect.Uint && vaJKind != reflect.Uint8 && vaJKind != reflect.Uint16 && vaJKind != reflect.Uint32 && vaJKind != reflect.Uint64 {
+ return true, nil
+ }
+
+ if isDescending {
+ return valI.Uint() > valJ.Uint(), nil
+ } else {
+ return valI.Uint() <= valJ.Uint(), nil
+ }
+ case reflect.Float32, reflect.Float64:
+ // if valJ is not a float (can occur if the other value is nil)
+ // then valI is less. This will bubble invalid values to the end
+ vaJKind := valJ.Kind()
+ if vaJKind != reflect.Float32 && vaJKind != reflect.Float64 {
+ return true, nil
+ }
+
+ if isDescending {
+ return valI.Float() > valJ.Float(), nil
+ } else {
+ return valI.Float() <= valJ.Float(), nil
+ }
+ case reflect.String:
+ // if valJ is not a string (can occur if the other value is nil)
+ // then valI is less. This will bubble invalid values to the end
+ if valJ.Kind() != reflect.String {
+ return true, nil
+ }
+
+ if isDescending {
+ return strings.Compare(valI.String(), valJ.String()) > 0, nil
+ } else {
+ return strings.Compare(valI.String(), valJ.String()) <= 0, nil
+ }
+ case reflect.Pointer:
+ // Handle nil values by making non nil values always less than the nil values. That way the
+ // nil values can be bubbled up to the end of the list.
+ if valI.IsNil() {
+ return false, nil
+ } else if valJ.Kind() != reflect.Pointer || valJ.IsNil() {
+ return true, nil
+ }
+
+ return isLess(valI.Elem(), valJ.Elem(), isDescending)
+ case reflect.Bool:
+ // if valJ is not a bool (can occur if the other value is nil)
+ // then valI is less. This will bubble invalid values to the end
+ if valJ.Kind() != reflect.Bool {
+ return true, nil
+ }
+
+ if isDescending {
+ return !valI.Bool(), nil
+ } else {
+ return valI.Bool(), nil
+ }
+ case reflect.Invalid:
+ // handle invalid values (like nil values) by making valid values
+ // always less than the invalid values. That way the invalid values
+ // always bubble up to the end of the list
+ return false, nil
+ default:
+ // unsortable value
+ return false, fmt.Errorf("unsortable value")
+ }
+}
+
+// instanceTypes returns the list of instance types held in the Sorter
+func (s *sorter) instanceTypes() []*instancetypes.Details {
+ instanceTypes := []*instancetypes.Details{}
+
+ for _, node := range s.sorters {
+ instanceTypes = append(instanceTypes, node.instanceType)
+ }
+
+ return instanceTypes
+}
+
+// helper functions for special sorting fields
+
+// getTotalGpusCount calculates the number of gpus in the given instance type
+func getTotalGpusCount(instanceType *instancetypes.Details) *int32 {
+ gpusInfo := instanceType.GpuInfo
+
+ if gpusInfo == nil {
+ return nil
+ }
+
+ total := int32(0)
+ for _, gpu := range gpusInfo.Gpus {
+ total = total + *gpu.Count
+ }
+
+ return &total
+}
+
+// getTotalAcceleratorsCount calculates the total number of inference accelerators
+// in the given instance type
+func getTotalAcceleratorsCount(instanceType *instancetypes.Details) *int32 {
+ acceleratorInfo := instanceType.InferenceAcceleratorInfo
+
+ if acceleratorInfo == nil {
+ return nil
+ }
+
+ total := int32(0)
+ for _, accel := range acceleratorInfo.Accelerators {
+ total = total + *accel.Count
+ }
+
+ return &total
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/CHANGELOG.md
new file mode 100644
index 000000000..3519b3764
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/CHANGELOG.md
@@ -0,0 +1,287 @@
+# v1.21.6 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.5 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.4 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.3 (2023-08-15)
+
+* No change notes available for this release.
+
+# v1.21.2 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.1 (2023-08-01)
+
+* No change notes available for this release.
+
+# v1.21.0 (2023-07-31)
+
+* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.2 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.1 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.0 (2023-06-19)
+
+* **Feature**: This release updates the PriceListArn regex pattern.
+
+# v1.19.8 (2023-06-15)
+
+* No change notes available for this release.
+
+# v1.19.7 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.6 (2023-05-04)
+
+* No change notes available for this release.
+
+# v1.19.5 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.4 (2023-04-10)
+
+* No change notes available for this release.
+
+# v1.19.3 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.2 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.1 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.0 (2023-03-01)
+
+* **Feature**: This release adds 2 new APIs - ListPriceLists which returns a list of applicable price lists, and GetPriceListFileUrl which outputs a URL to retrieve your price lists from the generated file from ListPriceLists
+
+# v1.18.4 (2023-02-22)
+
+* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes.
+
+# v1.18.3 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.2 (2023-02-15)
+
+* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910.
+* **Bug Fix**: Correct error type parsing for restJson services.
+
+# v1.18.1 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.0 (2023-01-05)
+
+* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
+
+# v1.17.5 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.4 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.3 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.2 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.1 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.0 (2022-09-14)
+
+* **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.8 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.7 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.6 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.5 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.4 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.3 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.2 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.1 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.0 (2022-06-30)
+
+* **Feature**: Documentation update for GetProducts Response.
+
+# v1.15.1 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.0 (2022-06-22)
+
+* **Feature**: This release introduces 1 update to the GetProducts API. The serviceCode attribute is now required when you use the GetProductsRequest.
+
+# v1.14.7 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.6 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.5 (2022-04-26)
+
+* **Documentation**: Documentation updates for Price List API
+
+# v1.14.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.3 (2022-03-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.2 (2022-03-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.1 (2022-03-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.0 (2022-03-08)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.0 (2022-02-24)
+
+* **Feature**: API client updated
+* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.0 (2022-01-14)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.0 (2022-01-07)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.0 (2021-12-21)
+
+* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens.
+
+# v1.9.2 (2021-12-02)
+
+* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514))
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.1 (2021-11-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.0 (2021-11-12)
+
+* **Feature**: Service clients now support custom endpoints that have an initial URI path defined.
+
+# v1.8.0 (2021-11-06)
+
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.0 (2021-10-21)
+
+* **Feature**: Updated to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.2 (2021-10-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.1 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.0 (2021-08-27)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.3 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.2 (2021-08-04)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.1 (2021-07-15)
+
+* **Documentation**: Updated service model to latest revision.
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_client.go
new file mode 100644
index 000000000..c87fe28d3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_client.go
@@ -0,0 +1,526 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package pricing
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/defaults"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ smithy "github.com/aws/smithy-go"
+ smithydocument "github.com/aws/smithy-go/document"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net"
+ "net/http"
+ "time"
+)
+
+const ServiceID = "Pricing"
+const ServiceAPIVersion = "2017-10-15"
+
+// Client provides the API client to make operations call for AWS Price List
+// Service.
+type Client struct {
+ options Options
+}
+
+// New returns an initialized Client based on the functional options. Provide
+// additional functional options to further configure the behavior of the client,
+// such as changing the client's endpoint or adding custom middleware behavior.
+func New(options Options, optFns ...func(*Options)) *Client {
+ options = options.Copy()
+
+ resolveDefaultLogger(&options)
+
+ setResolvedDefaultsMode(&options)
+
+ resolveRetryer(&options)
+
+ resolveHTTPClient(&options)
+
+ resolveHTTPSignerV4(&options)
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ client := &Client{
+ options: options,
+ }
+
+ return client
+}
+
+type Options struct {
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // The optional application specific identifier appended to the User-Agent header.
+ AppID string
+
+ // This endpoint will be given as input to an EndpointResolverV2. It is used for
+ // providing a custom base endpoint that is subject to modifications by the
+ // processing EndpointResolverV2.
+ BaseEndpoint *string
+
+ // Configures the events that will be sent to the configured logger.
+ ClientLogMode aws.ClientLogMode
+
+ // The credentials object to use when signing requests.
+ Credentials aws.CredentialsProvider
+
+ // The configuration DefaultsMode that the SDK should use when constructing the
+ // clients initial default settings.
+ DefaultsMode aws.DefaultsMode
+
+ // The endpoint options to be used when attempting to resolve an endpoint.
+ EndpointOptions EndpointResolverOptions
+
+ // The service endpoint resolver.
+ //
+ // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
+ // value for this field will likely prevent you from using any endpoint-related
+ // service features released after the introduction of EndpointResolverV2 and
+ // BaseEndpoint. To migrate an EndpointResolver implementation that uses a custom
+ // endpoint, set the client option BaseEndpoint instead.
+ EndpointResolver EndpointResolver
+
+ // Resolves the endpoint used for a particular service. This should be used over
+ // the deprecated EndpointResolver
+ EndpointResolverV2 EndpointResolverV2
+
+ // Signature Version 4 (SigV4) Signer
+ HTTPSignerV4 HTTPSignerV4
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // The region to send requests to. (Required)
+ Region string
+
+ // RetryMaxAttempts specifies the maximum number attempts an API client will call
+ // an operation that fails with a retryable error. A value of 0 is ignored, and
+ // will not be used to configure the API client created default retryer, or modify
+ // per operation call's retry max attempts. When creating a new API Clients this
+ // member will only be used if the Retryer Options member is nil. This value will
+ // be ignored if Retryer is not nil. If specified in an operation call's functional
+ // options with a value that is different than the constructed client's Options,
+ // the Client's Retryer will be wrapped to use the operation's specific
+ // RetryMaxAttempts value.
+ RetryMaxAttempts int
+
+ // RetryMode specifies the retry mode the API client will be created with, if
+ // Retryer option is not also specified. When creating a new API Clients this
+ // member will only be used if the Retryer Options member is nil. This value will
+ // be ignored if Retryer is not nil. Currently does not support per operation call
+ // overrides, may in the future.
+ RetryMode aws.RetryMode
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer. The kind of
+ // default retry created by the API client can be changed with the RetryMode
+ // option.
+ Retryer aws.Retryer
+
+ // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
+ // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
+ // should not populate this structure programmatically, or rely on the values here
+ // within your applications.
+ RuntimeEnvironment aws.RuntimeEnvironment
+
+ // The initial DefaultsMode used when the client options were constructed. If the
+ // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
+ // value was at that point in time. Currently does not support per operation call
+ // overrides, may in the future.
+ resolvedDefaultsMode aws.DefaultsMode
+
+ // The HTTP client to invoke API calls with. Defaults to client's default HTTP
+ // implementation if nil.
+ HTTPClient HTTPClient
+}
+
+// WithAPIOptions returns a functional option for setting the Client's APIOptions
+// option.
+func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, optFns...)
+ }
+}
+
+// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for
+// this field will likely prevent you from using any endpoint-related service
+// features released after the introduction of EndpointResolverV2 and BaseEndpoint.
+// To migrate an EndpointResolver implementation that uses a custom endpoint, set
+// the client option BaseEndpoint instead.
+func WithEndpointResolver(v EndpointResolver) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolver = v
+ }
+}
+
+// WithEndpointResolverV2 returns a functional option for setting the Client's
+// EndpointResolverV2 option.
+func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolverV2 = v
+ }
+}
+
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// Copy creates a clone where the APIOptions list is deep copied.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
+ copy(to.APIOptions, o.APIOptions)
+
+ return to
+}
+func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
+ ctx = middleware.ClearStackValues(ctx)
+ stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
+ options := c.options.Copy()
+ resolveEndpointResolverV2(&options)
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ finalizeRetryMaxAttemptOptions(&options, *c)
+
+ finalizeClientEndpointResolverOptions(&options)
+
+ for _, fn := range stackFns {
+ if err := fn(stack, options); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ for _, fn := range options.APIOptions {
+ if err := fn(stack); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack)
+ result, metadata, err = handler.Handle(ctx, params)
+ if err != nil {
+ err = &smithy.OperationError{
+ ServiceID: ServiceID,
+ OperationName: opID,
+ Err: err,
+ }
+ }
+ return result, metadata, err
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
+
+type legacyEndpointContextSetter struct {
+ LegacyResolver EndpointResolver
+}
+
+func (*legacyEndpointContextSetter) ID() string {
+ return "legacyEndpointContextSetter"
+}
+
+func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.LegacyResolver != nil {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
+ }
+
+ return next.HandleInitialize(ctx, in)
+
+}
+func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
+ return stack.Initialize.Add(&legacyEndpointContextSetter{
+ LegacyResolver: o.EndpointResolver,
+ }, middleware.Before)
+}
+
+func resolveDefaultLogger(o *Options) {
+ if o.Logger != nil {
+ return
+ }
+ o.Logger = logging.Nop{}
+}
+
+func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
+ return middleware.AddSetLoggerMiddleware(stack, o.Logger)
+}
+
+func setResolvedDefaultsMode(o *Options) {
+ if len(o.resolvedDefaultsMode) > 0 {
+ return
+ }
+
+ var mode aws.DefaultsMode
+ mode.SetFromString(string(o.DefaultsMode))
+
+ if mode == aws.DefaultsModeAuto {
+ mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
+ }
+
+ o.resolvedDefaultsMode = mode
+}
+
+// NewFromConfig returns a new client from the provided config.
+func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
+ opts := Options{
+ Region: cfg.Region,
+ DefaultsMode: cfg.DefaultsMode,
+ RuntimeEnvironment: cfg.RuntimeEnvironment,
+ HTTPClient: cfg.HTTPClient,
+ Credentials: cfg.Credentials,
+ APIOptions: cfg.APIOptions,
+ Logger: cfg.Logger,
+ ClientLogMode: cfg.ClientLogMode,
+ AppID: cfg.AppID,
+ }
+ resolveAWSRetryerProvider(cfg, &opts)
+ resolveAWSRetryMaxAttempts(cfg, &opts)
+ resolveAWSRetryMode(cfg, &opts)
+ resolveAWSEndpointResolver(cfg, &opts)
+ resolveUseDualStackEndpoint(cfg, &opts)
+ resolveUseFIPSEndpoint(cfg, &opts)
+ return New(opts, optFns...)
+}
+
+func resolveHTTPClient(o *Options) {
+ var buildable *awshttp.BuildableClient
+
+ if o.HTTPClient != nil {
+ var ok bool
+ buildable, ok = o.HTTPClient.(*awshttp.BuildableClient)
+ if !ok {
+ return
+ }
+ } else {
+ buildable = awshttp.NewBuildableClient()
+ }
+
+ modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
+ if err == nil {
+ buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
+ if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
+ dialer.Timeout = dialerTimeout
+ }
+ })
+
+ buildable = buildable.WithTransportOptions(func(transport *http.Transport) {
+ if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok {
+ transport.TLSHandshakeTimeout = tlsHandshakeTimeout
+ }
+ })
+ }
+
+ o.HTTPClient = buildable
+}
+
+func resolveRetryer(o *Options) {
+ if o.Retryer != nil {
+ return
+ }
+
+ if len(o.RetryMode) == 0 {
+ modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
+ if err == nil {
+ o.RetryMode = modeConfig.RetryMode
+ }
+ }
+ if len(o.RetryMode) == 0 {
+ o.RetryMode = aws.RetryModeStandard
+ }
+
+ var standardOptions []func(*retry.StandardOptions)
+ if v := o.RetryMaxAttempts; v != 0 {
+ standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
+ so.MaxAttempts = v
+ })
+ }
+
+ switch o.RetryMode {
+ case aws.RetryModeAdaptive:
+ var adaptiveOptions []func(*retry.AdaptiveModeOptions)
+ if len(standardOptions) != 0 {
+ adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
+ ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
+ })
+ }
+ o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
+
+ default:
+ o.Retryer = retry.NewStandard(standardOptions...)
+ }
+}
+
+func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
+ if cfg.Retryer == nil {
+ return
+ }
+ o.Retryer = cfg.Retryer()
+}
+
+func resolveAWSRetryMode(cfg aws.Config, o *Options) {
+ if len(cfg.RetryMode) == 0 {
+ return
+ }
+ o.RetryMode = cfg.RetryMode
+}
+func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
+ if cfg.RetryMaxAttempts == 0 {
+ return
+ }
+ o.RetryMaxAttempts = cfg.RetryMaxAttempts
+}
+
+func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
+ if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
+ return
+ }
+
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
+}
+
+func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
+ if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
+ return
+ }
+ o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions)
+}
+
+func addClientUserAgent(stack *middleware.Stack, options Options) error {
+ if err := awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "pricing", goModuleVersion)(stack); err != nil {
+ return err
+ }
+
+ if len(options.AppID) > 0 {
+ return awsmiddleware.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)(stack)
+ }
+
+ return nil
+}
+
+func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error {
+ mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: o.Credentials,
+ Signer: o.HTTPSignerV4,
+ LogSigning: o.ClientLogMode.IsSigning(),
+ })
+ return stack.Finalize.Add(mw, middleware.After)
+}
+
+type HTTPSignerV4 interface {
+ SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
+}
+
+func resolveHTTPSignerV4(o *Options) {
+ if o.HTTPSignerV4 != nil {
+ return
+ }
+ o.HTTPSignerV4 = newDefaultV4Signer(*o)
+}
+
+func newDefaultV4Signer(o Options) *v4.Signer {
+ return v4.NewSigner(func(so *v4.SignerOptions) {
+ so.Logger = o.Logger
+ so.LogSigning = o.ClientLogMode.IsSigning()
+ })
+}
+
+func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
+ mo := retry.AddRetryMiddlewaresOptions{
+ Retryer: o.Retryer,
+ LogRetryAttempts: o.ClientLogMode.IsRetries(),
+ }
+ return retry.AddRetryMiddlewares(stack, mo)
+}
+
+// resolves dual-stack endpoint configuration
+func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseDualStackEndpoint = value
+ }
+ return nil
+}
+
+// resolves FIPS endpoint configuration
+func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseFIPSEndpoint = value
+ }
+ return nil
+}
+
+func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
+ return awsmiddleware.AddRequestIDRetrieverMiddleware(stack)
+}
+
+func addResponseErrorMiddleware(stack *middleware.Stack) error {
+ return awshttp.AddResponseErrorMiddleware(stack)
+}
+
+func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
+ return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
+ LogRequest: o.ClientLogMode.IsRequest(),
+ LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(),
+ LogResponse: o.ClientLogMode.IsResponse(),
+ LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
+ }, middleware.After)
+}
+
+type endpointDisableHTTPSMiddleware struct {
+ EndpointDisableHTTPS bool
+}
+
+func (*endpointDisableHTTPSMiddleware) ID() string {
+ return "endpointDisableHTTPSMiddleware"
+}
+
+func (m *endpointDisableHTTPSMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.EndpointDisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) {
+ req.URL.Scheme = "http"
+ }
+
+ return next.HandleSerialize(ctx, in)
+
+}
+func addendpointDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Serialize.Insert(&endpointDisableHTTPSMiddleware{
+ EndpointDisableHTTPS: o.EndpointOptions.DisableHTTPS,
+ }, "OperationSerializer", middleware.Before)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_DescribeServices.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_DescribeServices.go
new file mode 100644
index 000000000..f8b013612
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_DescribeServices.go
@@ -0,0 +1,370 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package pricing
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ "github.com/aws/aws-sdk-go-v2/service/pricing/types"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns the metadata for one service or a list of the metadata for all
+// services. Use this without a service code to get the service codes for all
+// services. Use it with a service code, such as AmazonEC2 , to get information
+// specific to that service, such as the attribute names available for that
+// service. For example, some of the attribute names available for EC2 are
+// volumeType , maxIopsVolume , operation , locationType , and
+// instanceCapacity10xlarge .
+func (c *Client) DescribeServices(ctx context.Context, params *DescribeServicesInput, optFns ...func(*Options)) (*DescribeServicesOutput, error) {
+ if params == nil {
+ params = &DescribeServicesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeServices", params, optFns, c.addOperationDescribeServicesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeServicesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeServicesInput struct {
+
+ // The format version that you want the response to be in. Valid values are: aws_v1
+ FormatVersion *string
+
+ // The maximum number of results that you want returned in the response.
+ MaxResults *int32
+
+ // The pagination token that indicates the next set of results that you want to
+ // retrieve.
+ NextToken *string
+
+ // The code for the service whose information you want to retrieve, such as
+ // AmazonEC2 . You can use the ServiceCode to filter the results in a GetProducts
+ // call. To retrieve a list of all services, leave this blank.
+ ServiceCode *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeServicesOutput struct {
+
+ // The format version of the response. For example, aws_v1 .
+ FormatVersion *string
+
+ // The pagination token for the next set of retrievable results.
+ NextToken *string
+
+ // The service metadata for the service or services in the response.
+ Services []types.Service
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeServicesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeServices{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeServices{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDescribeServicesResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeServices(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+// DescribeServicesAPIClient is a client that implements the DescribeServices
+// operation.
+type DescribeServicesAPIClient interface {
+ DescribeServices(context.Context, *DescribeServicesInput, ...func(*Options)) (*DescribeServicesOutput, error)
+}
+
+var _ DescribeServicesAPIClient = (*Client)(nil)
+
+// DescribeServicesPaginatorOptions is the paginator options for DescribeServices
+type DescribeServicesPaginatorOptions struct {
+ // The maximum number of results that you want returned in the response.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// DescribeServicesPaginator is a paginator for DescribeServices
+type DescribeServicesPaginator struct {
+ options DescribeServicesPaginatorOptions
+ client DescribeServicesAPIClient
+ params *DescribeServicesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeServicesPaginator returns a new DescribeServicesPaginator
+func NewDescribeServicesPaginator(client DescribeServicesAPIClient, params *DescribeServicesInput, optFns ...func(*DescribeServicesPaginatorOptions)) *DescribeServicesPaginator {
+ if params == nil {
+ params = &DescribeServicesInput{}
+ }
+
+ options := DescribeServicesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeServicesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.NextToken,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeServicesPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next DescribeServices page.
+func (p *DescribeServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeServicesOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.NextToken = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxResults = limit
+
+ result, err := p.client.DescribeServices(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextToken
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+func newServiceMetadataMiddleware_opDescribeServices(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "pricing",
+ OperationName: "DescribeServices",
+ }
+}
+
+type opDescribeServicesResolveEndpointMiddleware struct {
+ EndpointResolver EndpointResolverV2
+ BuiltInResolver builtInParameterResolver
+}
+
+func (*opDescribeServicesResolveEndpointMiddleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *opDescribeServicesResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.EndpointResolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := EndpointParameters{}
+
+ m.BuiltInResolver.ResolveBuiltIns(¶ms)
+
+ var resolvedEndpoint smithyendpoints.Endpoint
+ resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL = &resolvedEndpoint.URI
+
+ for k := range resolvedEndpoint.Headers {
+ req.Header.Set(
+ k,
+ resolvedEndpoint.Headers.Get(k),
+ )
+ }
+
+ authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties)
+ if err != nil {
+ var nfe *internalauth.NoAuthenticationSchemesFoundError
+ if errors.As(err, &nfe) {
+ // if no auth scheme is found, default to sigv4
+ signingName := "pricing"
+ signingRegion := m.BuiltInResolver.(*builtInResolver).Region
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+
+ }
+ var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError
+ if errors.As(err, &ue) {
+ return out, metadata, fmt.Errorf(
+ "This operation requests signer version(s) %v but the client only supports %v",
+ ue.UnsupportedSchemes,
+ internalauth.SupportedSchemes,
+ )
+ }
+ }
+
+ for _, authScheme := range authSchemes {
+ switch authScheme.(type) {
+ case *internalauth.AuthenticationSchemeV4:
+ v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4)
+ var signingName, signingRegion string
+ if v4Scheme.SigningName == nil {
+ signingName = "pricing"
+ } else {
+ signingName = *v4Scheme.SigningName
+ }
+ if v4Scheme.SigningRegion == nil {
+ signingRegion = m.BuiltInResolver.(*builtInResolver).Region
+ } else {
+ signingRegion = *v4Scheme.SigningRegion
+ }
+ if v4Scheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+ break
+ case *internalauth.AuthenticationSchemeV4A:
+ v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A)
+ if v4aScheme.SigningName == nil {
+ v4aScheme.SigningName = aws.String("pricing")
+ }
+ if v4aScheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0])
+ break
+ case *internalauth.AuthenticationSchemeNone:
+ break
+ }
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
+
+func addDescribeServicesResolveEndpointMiddleware(stack *middleware.Stack, options Options) error {
+ return stack.Serialize.Insert(&opDescribeServicesResolveEndpointMiddleware{
+ EndpointResolver: options.EndpointResolverV2,
+ BuiltInResolver: &builtInResolver{
+ Region: options.Region,
+ UseDualStack: options.EndpointOptions.UseDualStackEndpoint,
+ UseFIPS: options.EndpointOptions.UseFIPSEndpoint,
+ Endpoint: options.BaseEndpoint,
+ },
+ }, "ResolveEndpoint", middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_GetAttributeValues.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_GetAttributeValues.go
new file mode 100644
index 000000000..9ac2206a9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_GetAttributeValues.go
@@ -0,0 +1,374 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package pricing
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ "github.com/aws/aws-sdk-go-v2/service/pricing/types"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a list of attribute values. Attributes are similar to the details in a
+// Price List API offer file. For a list of available attributes, see Offer File
+// Definitions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/reading-an-offer.html#pps-defs)
+// in the Billing and Cost Management User Guide (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-what-is.html)
+// .
+func (c *Client) GetAttributeValues(ctx context.Context, params *GetAttributeValuesInput, optFns ...func(*Options)) (*GetAttributeValuesOutput, error) {
+ if params == nil {
+ params = &GetAttributeValuesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetAttributeValues", params, optFns, c.addOperationGetAttributeValuesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetAttributeValuesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetAttributeValuesInput struct {
+
+ // The name of the attribute that you want to retrieve the values for, such as
+ // volumeType .
+ //
+ // This member is required.
+ AttributeName *string
+
+ // The service code for the service whose attributes you want to retrieve. For
+ // example, if you want the retrieve an EC2 attribute, use AmazonEC2 .
+ //
+ // This member is required.
+ ServiceCode *string
+
+ // The maximum number of results to return in response.
+ MaxResults *int32
+
+ // The pagination token that indicates the next set of results that you want to
+ // retrieve.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type GetAttributeValuesOutput struct {
+
+ // The list of values for an attribute. For example, Throughput Optimized HDD and
+ // Provisioned IOPS are two available values for the AmazonEC2 volumeType .
+ AttributeValues []types.AttributeValue
+
+ // The pagination token that indicates the next set of results to retrieve.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetAttributeValuesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetAttributeValues{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetAttributeValues{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetAttributeValuesResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetAttributeValuesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAttributeValues(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+// GetAttributeValuesAPIClient is a client that implements the GetAttributeValues
+// operation.
+type GetAttributeValuesAPIClient interface {
+ GetAttributeValues(context.Context, *GetAttributeValuesInput, ...func(*Options)) (*GetAttributeValuesOutput, error)
+}
+
+var _ GetAttributeValuesAPIClient = (*Client)(nil)
+
+// GetAttributeValuesPaginatorOptions is the paginator options for
+// GetAttributeValues
+type GetAttributeValuesPaginatorOptions struct {
+ // The maximum number of results to return in response.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// GetAttributeValuesPaginator is a paginator for GetAttributeValues
+type GetAttributeValuesPaginator struct {
+ options GetAttributeValuesPaginatorOptions
+ client GetAttributeValuesAPIClient
+ params *GetAttributeValuesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewGetAttributeValuesPaginator returns a new GetAttributeValuesPaginator
+func NewGetAttributeValuesPaginator(client GetAttributeValuesAPIClient, params *GetAttributeValuesInput, optFns ...func(*GetAttributeValuesPaginatorOptions)) *GetAttributeValuesPaginator {
+ if params == nil {
+ params = &GetAttributeValuesInput{}
+ }
+
+ options := GetAttributeValuesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &GetAttributeValuesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.NextToken,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *GetAttributeValuesPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next GetAttributeValues page.
+func (p *GetAttributeValuesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetAttributeValuesOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.NextToken = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxResults = limit
+
+ result, err := p.client.GetAttributeValues(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextToken
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+func newServiceMetadataMiddleware_opGetAttributeValues(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "pricing",
+ OperationName: "GetAttributeValues",
+ }
+}
+
+type opGetAttributeValuesResolveEndpointMiddleware struct {
+ EndpointResolver EndpointResolverV2
+ BuiltInResolver builtInParameterResolver
+}
+
+func (*opGetAttributeValuesResolveEndpointMiddleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *opGetAttributeValuesResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.EndpointResolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := EndpointParameters{}
+
+ m.BuiltInResolver.ResolveBuiltIns(¶ms)
+
+ var resolvedEndpoint smithyendpoints.Endpoint
+ resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL = &resolvedEndpoint.URI
+
+ for k := range resolvedEndpoint.Headers {
+ req.Header.Set(
+ k,
+ resolvedEndpoint.Headers.Get(k),
+ )
+ }
+
+ authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties)
+ if err != nil {
+ var nfe *internalauth.NoAuthenticationSchemesFoundError
+ if errors.As(err, &nfe) {
+ // if no auth scheme is found, default to sigv4
+ signingName := "pricing"
+ signingRegion := m.BuiltInResolver.(*builtInResolver).Region
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+
+ }
+ var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError
+ if errors.As(err, &ue) {
+ return out, metadata, fmt.Errorf(
+ "This operation requests signer version(s) %v but the client only supports %v",
+ ue.UnsupportedSchemes,
+ internalauth.SupportedSchemes,
+ )
+ }
+ }
+
+ for _, authScheme := range authSchemes {
+ switch authScheme.(type) {
+ case *internalauth.AuthenticationSchemeV4:
+ v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4)
+ var signingName, signingRegion string
+ if v4Scheme.SigningName == nil {
+ signingName = "pricing"
+ } else {
+ signingName = *v4Scheme.SigningName
+ }
+ if v4Scheme.SigningRegion == nil {
+ signingRegion = m.BuiltInResolver.(*builtInResolver).Region
+ } else {
+ signingRegion = *v4Scheme.SigningRegion
+ }
+ if v4Scheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+ break
+ case *internalauth.AuthenticationSchemeV4A:
+ v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A)
+ if v4aScheme.SigningName == nil {
+ v4aScheme.SigningName = aws.String("pricing")
+ }
+ if v4aScheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0])
+ break
+ case *internalauth.AuthenticationSchemeNone:
+ break
+ }
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
+
+func addGetAttributeValuesResolveEndpointMiddleware(stack *middleware.Stack, options Options) error {
+ return stack.Serialize.Insert(&opGetAttributeValuesResolveEndpointMiddleware{
+ EndpointResolver: options.EndpointResolverV2,
+ BuiltInResolver: &builtInResolver{
+ Region: options.Region,
+ UseDualStack: options.EndpointOptions.UseDualStackEndpoint,
+ UseFIPS: options.EndpointOptions.UseFIPSEndpoint,
+ Endpoint: options.BaseEndpoint,
+ },
+ }, "ResolveEndpoint", middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_GetPriceListFileUrl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_GetPriceListFileUrl.go
new file mode 100644
index 000000000..b9abd8fab
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_GetPriceListFileUrl.go
@@ -0,0 +1,275 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package pricing
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This feature is in preview release and is subject to change. Your use of Amazon
+// Web Services Price List API is subject to the Beta Service Participation terms
+// of the Amazon Web Services Service Terms (https://aws.amazon.com/service-terms/)
+// (Section 1.10). This returns the URL that you can retrieve your Price List file
+// from. This URL is based on the PriceListArn and FileFormat that you retrieve
+// from the ListPriceLists (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html)
+// response.
+func (c *Client) GetPriceListFileUrl(ctx context.Context, params *GetPriceListFileUrlInput, optFns ...func(*Options)) (*GetPriceListFileUrlOutput, error) {
+ if params == nil {
+ params = &GetPriceListFileUrlInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetPriceListFileUrl", params, optFns, c.addOperationGetPriceListFileUrlMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetPriceListFileUrlOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetPriceListFileUrlInput struct {
+
+ // The format that you want to retrieve your Price List files in. The FileFormat
+ // can be obtained from the ListPriceLists (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html)
+ // response.
+ //
+ // This member is required.
+ FileFormat *string
+
+ // The unique identifier that maps to where your Price List files are located.
+ // PriceListArn can be obtained from the ListPriceLists (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html)
+ // response.
+ //
+ // This member is required.
+ PriceListArn *string
+
+ noSmithyDocumentSerde
+}
+
+type GetPriceListFileUrlOutput struct {
+
+ // The URL to download your Price List file from.
+ Url *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetPriceListFileUrlMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetPriceListFileUrl{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetPriceListFileUrl{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetPriceListFileUrlResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetPriceListFileUrlValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPriceListFileUrl(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetPriceListFileUrl(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "pricing",
+ OperationName: "GetPriceListFileUrl",
+ }
+}
+
+type opGetPriceListFileUrlResolveEndpointMiddleware struct {
+ EndpointResolver EndpointResolverV2
+ BuiltInResolver builtInParameterResolver
+}
+
+func (*opGetPriceListFileUrlResolveEndpointMiddleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *opGetPriceListFileUrlResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.EndpointResolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := EndpointParameters{}
+
+ m.BuiltInResolver.ResolveBuiltIns(¶ms)
+
+ var resolvedEndpoint smithyendpoints.Endpoint
+ resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL = &resolvedEndpoint.URI
+
+ for k := range resolvedEndpoint.Headers {
+ req.Header.Set(
+ k,
+ resolvedEndpoint.Headers.Get(k),
+ )
+ }
+
+ authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties)
+ if err != nil {
+ var nfe *internalauth.NoAuthenticationSchemesFoundError
+ if errors.As(err, &nfe) {
+ // if no auth scheme is found, default to sigv4
+ signingName := "pricing"
+ signingRegion := m.BuiltInResolver.(*builtInResolver).Region
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+
+ }
+ var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError
+ if errors.As(err, &ue) {
+ return out, metadata, fmt.Errorf(
+ "This operation requests signer version(s) %v but the client only supports %v",
+ ue.UnsupportedSchemes,
+ internalauth.SupportedSchemes,
+ )
+ }
+ }
+
+ for _, authScheme := range authSchemes {
+ switch authScheme.(type) {
+ case *internalauth.AuthenticationSchemeV4:
+ v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4)
+ var signingName, signingRegion string
+ if v4Scheme.SigningName == nil {
+ signingName = "pricing"
+ } else {
+ signingName = *v4Scheme.SigningName
+ }
+ if v4Scheme.SigningRegion == nil {
+ signingRegion = m.BuiltInResolver.(*builtInResolver).Region
+ } else {
+ signingRegion = *v4Scheme.SigningRegion
+ }
+ if v4Scheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+ break
+ case *internalauth.AuthenticationSchemeV4A:
+ v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A)
+ if v4aScheme.SigningName == nil {
+ v4aScheme.SigningName = aws.String("pricing")
+ }
+ if v4aScheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0])
+ break
+ case *internalauth.AuthenticationSchemeNone:
+ break
+ }
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
+
+func addGetPriceListFileUrlResolveEndpointMiddleware(stack *middleware.Stack, options Options) error {
+ return stack.Serialize.Insert(&opGetPriceListFileUrlResolveEndpointMiddleware{
+ EndpointResolver: options.EndpointResolverV2,
+ BuiltInResolver: &builtInResolver{
+ Region: options.Region,
+ UseDualStack: options.EndpointOptions.UseDualStackEndpoint,
+ UseFIPS: options.EndpointOptions.UseFIPSEndpoint,
+ Endpoint: options.BaseEndpoint,
+ },
+ }, "ResolveEndpoint", middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_GetProducts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_GetProducts.go
new file mode 100644
index 000000000..837c38d93
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_GetProducts.go
@@ -0,0 +1,371 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package pricing
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ "github.com/aws/aws-sdk-go-v2/service/pricing/types"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a list of all products that match the filter criteria.
+func (c *Client) GetProducts(ctx context.Context, params *GetProductsInput, optFns ...func(*Options)) (*GetProductsOutput, error) {
+ if params == nil {
+ params = &GetProductsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetProducts", params, optFns, c.addOperationGetProductsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetProductsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetProductsInput struct {
+
+ // The code for the service whose products you want to retrieve.
+ //
+ // This member is required.
+ ServiceCode *string
+
+ // The list of filters that limit the returned products. only products that match
+ // all filters are returned.
+ Filters []types.Filter
+
+ // The format version that you want the response to be in. Valid values are: aws_v1
+ FormatVersion *string
+
+ // The maximum number of results to return in the response.
+ MaxResults *int32
+
+ // The pagination token that indicates the next set of results that you want to
+ // retrieve.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type GetProductsOutput struct {
+
+ // The format version of the response. For example, aws_v1.
+ FormatVersion *string
+
+ // The pagination token that indicates the next set of results to retrieve.
+ NextToken *string
+
+ // The list of products that match your filters. The list contains both the
+ // product metadata and the price information.
+ PriceList []string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetProductsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetProducts{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetProducts{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetProductsResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetProductsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetProducts(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+// GetProductsAPIClient is a client that implements the GetProducts operation.
+type GetProductsAPIClient interface {
+ GetProducts(context.Context, *GetProductsInput, ...func(*Options)) (*GetProductsOutput, error)
+}
+
+var _ GetProductsAPIClient = (*Client)(nil)
+
+// GetProductsPaginatorOptions is the paginator options for GetProducts
+type GetProductsPaginatorOptions struct {
+ // The maximum number of results to return in the response.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// GetProductsPaginator is a paginator for GetProducts
+type GetProductsPaginator struct {
+ options GetProductsPaginatorOptions
+ client GetProductsAPIClient
+ params *GetProductsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewGetProductsPaginator returns a new GetProductsPaginator
+func NewGetProductsPaginator(client GetProductsAPIClient, params *GetProductsInput, optFns ...func(*GetProductsPaginatorOptions)) *GetProductsPaginator {
+ if params == nil {
+ params = &GetProductsInput{}
+ }
+
+ options := GetProductsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &GetProductsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.NextToken,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *GetProductsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next GetProducts page.
+func (p *GetProductsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetProductsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.NextToken = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxResults = limit
+
+ result, err := p.client.GetProducts(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextToken
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+func newServiceMetadataMiddleware_opGetProducts(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "pricing",
+ OperationName: "GetProducts",
+ }
+}
+
+type opGetProductsResolveEndpointMiddleware struct {
+ EndpointResolver EndpointResolverV2
+ BuiltInResolver builtInParameterResolver
+}
+
+func (*opGetProductsResolveEndpointMiddleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *opGetProductsResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.EndpointResolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := EndpointParameters{}
+
+ m.BuiltInResolver.ResolveBuiltIns(¶ms)
+
+ var resolvedEndpoint smithyendpoints.Endpoint
+ resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL = &resolvedEndpoint.URI
+
+ for k := range resolvedEndpoint.Headers {
+ req.Header.Set(
+ k,
+ resolvedEndpoint.Headers.Get(k),
+ )
+ }
+
+ authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties)
+ if err != nil {
+ var nfe *internalauth.NoAuthenticationSchemesFoundError
+ if errors.As(err, &nfe) {
+ // if no auth scheme is found, default to sigv4
+ signingName := "pricing"
+ signingRegion := m.BuiltInResolver.(*builtInResolver).Region
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+
+ }
+ var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError
+ if errors.As(err, &ue) {
+ return out, metadata, fmt.Errorf(
+ "This operation requests signer version(s) %v but the client only supports %v",
+ ue.UnsupportedSchemes,
+ internalauth.SupportedSchemes,
+ )
+ }
+ }
+
+ for _, authScheme := range authSchemes {
+ switch authScheme.(type) {
+ case *internalauth.AuthenticationSchemeV4:
+ v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4)
+ var signingName, signingRegion string
+ if v4Scheme.SigningName == nil {
+ signingName = "pricing"
+ } else {
+ signingName = *v4Scheme.SigningName
+ }
+ if v4Scheme.SigningRegion == nil {
+ signingRegion = m.BuiltInResolver.(*builtInResolver).Region
+ } else {
+ signingRegion = *v4Scheme.SigningRegion
+ }
+ if v4Scheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+ break
+ case *internalauth.AuthenticationSchemeV4A:
+ v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A)
+ if v4aScheme.SigningName == nil {
+ v4aScheme.SigningName = aws.String("pricing")
+ }
+ if v4aScheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0])
+ break
+ case *internalauth.AuthenticationSchemeNone:
+ break
+ }
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
+
+func addGetProductsResolveEndpointMiddleware(stack *middleware.Stack, options Options) error {
+ return stack.Serialize.Insert(&opGetProductsResolveEndpointMiddleware{
+ EndpointResolver: options.EndpointResolverV2,
+ BuiltInResolver: &builtInResolver{
+ Region: options.Region,
+ UseDualStack: options.EndpointOptions.UseDualStackEndpoint,
+ UseFIPS: options.EndpointOptions.UseFIPSEndpoint,
+ Endpoint: options.BaseEndpoint,
+ },
+ }, "ResolveEndpoint", middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_ListPriceLists.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_ListPriceLists.go
new file mode 100644
index 000000000..6b6b6c912
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/api_op_ListPriceLists.go
@@ -0,0 +1,396 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package pricing
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ "github.com/aws/aws-sdk-go-v2/service/pricing/types"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// This feature is in preview release and is subject to change. Your use of Amazon
+// Web Services Price List API is subject to the Beta Service Participation terms
+// of the Amazon Web Services Service Terms (https://aws.amazon.com/service-terms/)
+// (Section 1.10). This returns a list of Price List references that the requester
+// if authorized to view, given a ServiceCode , CurrencyCode , and an EffectiveDate
+// . Use without a RegionCode filter to list Price List references from all
+// available Amazon Web Services Regions. Use with a RegionCode filter to get the
+// Price List reference that's specific to a specific Amazon Web Services Region.
+// You can use the PriceListArn from the response to get your preferred Price List
+// files through the GetPriceListFileUrl (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetPriceListFileUrl.html)
+// API.
+func (c *Client) ListPriceLists(ctx context.Context, params *ListPriceListsInput, optFns ...func(*Options)) (*ListPriceListsOutput, error) {
+ if params == nil {
+ params = &ListPriceListsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListPriceLists", params, optFns, c.addOperationListPriceListsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListPriceListsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListPriceListsInput struct {
+
+ // The three alphabetical character ISO-4217 currency code that the Price List
+ // files are denominated in.
+ //
+ // This member is required.
+ CurrencyCode *string
+
+ // The date that the Price List file prices are effective from.
+ //
+ // This member is required.
+ EffectiveDate *time.Time
+
+ // The service code or the Savings Plan service code for the attributes that you
+ // want to retrieve. For example, to get the list of applicable Amazon EC2 price
+ // lists, use AmazonEC2 . For a full list of service codes containing On-Demand and
+ // Reserved Instance (RI) pricing, use the DescribeServices (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_DescribeServices.html#awscostmanagement-pricing_DescribeServices-request-FormatVersion)
+ // API. To retrieve the Compute Savings Plan price lists, use ComputeSavingsPlans .
+ // To retrieve Machine Learning Savings Plans price lists, use
+ // MachineLearningSavingsPlans .
+ //
+ // This member is required.
+ ServiceCode *string
+
+ // The maximum number of results to return in the response.
+ MaxResults *int32
+
+ // The pagination token that indicates the next set of results that you want to
+ // retrieve.
+ NextToken *string
+
+ // This is used to filter the Price List by Amazon Web Services Region. For
+ // example, to get the price list only for the US East (N. Virginia) Region, use
+ // us-east-1 . If nothing is specified, you retrieve price lists for all applicable
+ // Regions. The available RegionCode list can be retrieved from GetAttributeValues (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetAttributeValues.html)
+ // API.
+ RegionCode *string
+
+ noSmithyDocumentSerde
+}
+
+type ListPriceListsOutput struct {
+
+ // The pagination token that indicates the next set of results to retrieve.
+ NextToken *string
+
+ // The type of price list references that match your request.
+ PriceLists []types.PriceList
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListPriceListsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpListPriceLists{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListPriceLists{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addListPriceListsResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListPriceListsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPriceLists(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListPriceListsAPIClient is a client that implements the ListPriceLists
+// operation.
+type ListPriceListsAPIClient interface {
+ ListPriceLists(context.Context, *ListPriceListsInput, ...func(*Options)) (*ListPriceListsOutput, error)
+}
+
+var _ ListPriceListsAPIClient = (*Client)(nil)
+
+// ListPriceListsPaginatorOptions is the paginator options for ListPriceLists
+type ListPriceListsPaginatorOptions struct {
+ // The maximum number of results to return in the response.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListPriceListsPaginator is a paginator for ListPriceLists
+type ListPriceListsPaginator struct {
+ options ListPriceListsPaginatorOptions
+ client ListPriceListsAPIClient
+ params *ListPriceListsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListPriceListsPaginator returns a new ListPriceListsPaginator
+func NewListPriceListsPaginator(client ListPriceListsAPIClient, params *ListPriceListsInput, optFns ...func(*ListPriceListsPaginatorOptions)) *ListPriceListsPaginator {
+ if params == nil {
+ params = &ListPriceListsInput{}
+ }
+
+ options := ListPriceListsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListPriceListsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.NextToken,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListPriceListsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListPriceLists page.
+func (p *ListPriceListsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPriceListsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.NextToken = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxResults = limit
+
+ result, err := p.client.ListPriceLists(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextToken
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+func newServiceMetadataMiddleware_opListPriceLists(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "pricing",
+ OperationName: "ListPriceLists",
+ }
+}
+
+type opListPriceListsResolveEndpointMiddleware struct {
+ EndpointResolver EndpointResolverV2
+ BuiltInResolver builtInParameterResolver
+}
+
+func (*opListPriceListsResolveEndpointMiddleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *opListPriceListsResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.EndpointResolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := EndpointParameters{}
+
+ m.BuiltInResolver.ResolveBuiltIns(¶ms)
+
+ var resolvedEndpoint smithyendpoints.Endpoint
+ resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL = &resolvedEndpoint.URI
+
+ for k := range resolvedEndpoint.Headers {
+ req.Header.Set(
+ k,
+ resolvedEndpoint.Headers.Get(k),
+ )
+ }
+
+ authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties)
+ if err != nil {
+ var nfe *internalauth.NoAuthenticationSchemesFoundError
+ if errors.As(err, &nfe) {
+ // if no auth scheme is found, default to sigv4
+ signingName := "pricing"
+ signingRegion := m.BuiltInResolver.(*builtInResolver).Region
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+
+ }
+ var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError
+ if errors.As(err, &ue) {
+ return out, metadata, fmt.Errorf(
+ "This operation requests signer version(s) %v but the client only supports %v",
+ ue.UnsupportedSchemes,
+ internalauth.SupportedSchemes,
+ )
+ }
+ }
+
+ for _, authScheme := range authSchemes {
+ switch authScheme.(type) {
+ case *internalauth.AuthenticationSchemeV4:
+ v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4)
+ var signingName, signingRegion string
+ if v4Scheme.SigningName == nil {
+ signingName = "pricing"
+ } else {
+ signingName = *v4Scheme.SigningName
+ }
+ if v4Scheme.SigningRegion == nil {
+ signingRegion = m.BuiltInResolver.(*builtInResolver).Region
+ } else {
+ signingRegion = *v4Scheme.SigningRegion
+ }
+ if v4Scheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion)
+ break
+ case *internalauth.AuthenticationSchemeV4A:
+ v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A)
+ if v4aScheme.SigningName == nil {
+ v4aScheme.SigningName = aws.String("pricing")
+ }
+ if v4aScheme.DisableDoubleEncoding != nil {
+ // The signer sets an equivalent value at client initialization time.
+ // Setting this context value will cause the signer to extract it
+ // and override the value set at client initialization time.
+ ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding)
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName)
+ ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0])
+ break
+ case *internalauth.AuthenticationSchemeNone:
+ break
+ }
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
+
+func addListPriceListsResolveEndpointMiddleware(stack *middleware.Stack, options Options) error {
+ return stack.Serialize.Insert(&opListPriceListsResolveEndpointMiddleware{
+ EndpointResolver: options.EndpointResolverV2,
+ BuiltInResolver: &builtInResolver{
+ Region: options.Region,
+ UseDualStack: options.EndpointOptions.UseDualStackEndpoint,
+ UseFIPS: options.EndpointOptions.UseFIPSEndpoint,
+ Endpoint: options.BaseEndpoint,
+ },
+ }, "ResolveEndpoint", middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/deserializers.go
new file mode 100644
index 000000000..2c7e7a8e6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/deserializers.go
@@ -0,0 +1,1680 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package pricing
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
+ "github.com/aws/aws-sdk-go-v2/service/pricing/types"
+ smithy "github.com/aws/smithy-go"
+ smithyio "github.com/aws/smithy-go/io"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+ "strings"
+)
+
+type awsAwsjson11_deserializeOpDescribeServices struct {
+}
+
+func (*awsAwsjson11_deserializeOpDescribeServices) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpDescribeServices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorDescribeServices(response, &metadata)
+ }
+ output := &DescribeServicesOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentDescribeServicesOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorDescribeServices(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("ExpiredNextTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorExpiredNextTokenException(response, errorBody)
+
+ case strings.EqualFold("InternalErrorException", errorCode):
+ return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody)
+
+ case strings.EqualFold("InvalidNextTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidParameterException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpGetAttributeValues struct {
+}
+
+func (*awsAwsjson11_deserializeOpGetAttributeValues) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpGetAttributeValues) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorGetAttributeValues(response, &metadata)
+ }
+ output := &GetAttributeValuesOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentGetAttributeValuesOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorGetAttributeValues(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("ExpiredNextTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorExpiredNextTokenException(response, errorBody)
+
+ case strings.EqualFold("InternalErrorException", errorCode):
+ return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody)
+
+ case strings.EqualFold("InvalidNextTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidParameterException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpGetPriceListFileUrl struct {
+}
+
+func (*awsAwsjson11_deserializeOpGetPriceListFileUrl) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpGetPriceListFileUrl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorGetPriceListFileUrl(response, &metadata)
+ }
+ output := &GetPriceListFileUrlOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentGetPriceListFileUrlOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorGetPriceListFileUrl(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("AccessDeniedException", errorCode):
+ return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
+
+ case strings.EqualFold("InternalErrorException", errorCode):
+ return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody)
+
+ case strings.EqualFold("InvalidParameterException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpGetProducts struct {
+}
+
+func (*awsAwsjson11_deserializeOpGetProducts) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpGetProducts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorGetProducts(response, &metadata)
+ }
+ output := &GetProductsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentGetProductsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorGetProducts(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("ExpiredNextTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorExpiredNextTokenException(response, errorBody)
+
+ case strings.EqualFold("InternalErrorException", errorCode):
+ return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody)
+
+ case strings.EqualFold("InvalidNextTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidParameterException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpListPriceLists struct {
+}
+
+func (*awsAwsjson11_deserializeOpListPriceLists) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpListPriceLists) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorListPriceLists(response, &metadata)
+ }
+ output := &ListPriceListsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentListPriceListsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorListPriceLists(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("AccessDeniedException", errorCode):
+ return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
+
+ case strings.EqualFold("ExpiredNextTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorExpiredNextTokenException(response, errorBody)
+
+ case strings.EqualFold("InternalErrorException", errorCode):
+ return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody)
+
+ case strings.EqualFold("InvalidNextTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidParameterException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsAwsjson11_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.AccessDeniedException{}
+ err := awsAwsjson11_deserializeDocumentAccessDeniedException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorExpiredNextTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.ExpiredNextTokenException{}
+ err := awsAwsjson11_deserializeDocumentExpiredNextTokenException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorInternalErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InternalErrorException{}
+ err := awsAwsjson11_deserializeDocumentInternalErrorException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorInvalidNextTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidNextTokenException{}
+ err := awsAwsjson11_deserializeDocumentInvalidNextTokenException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidParameterException{}
+ err := awsAwsjson11_deserializeDocumentInvalidParameterException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.NotFoundException{}
+ err := awsAwsjson11_deserializeDocumentNotFoundException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AccessDeniedException
+ if *v == nil {
+ sv = &types.AccessDeniedException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentAttributeNameList(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentAttributeValue(v **types.AttributeValue, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AttributeValue
+ if *v == nil {
+ sv = &types.AttributeValue{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Value":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Value = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentAttributeValueList(v *[]types.AttributeValue, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.AttributeValue
+ if *v == nil {
+ cv = []types.AttributeValue{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.AttributeValue
+ destAddr := &col
+ if err := awsAwsjson11_deserializeDocumentAttributeValue(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentExpiredNextTokenException(v **types.ExpiredNextTokenException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ExpiredNextTokenException
+ if *v == nil {
+ sv = &types.ExpiredNextTokenException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentFileFormats(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FileFormat to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentInternalErrorException(v **types.InternalErrorException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InternalErrorException
+ if *v == nil {
+ sv = &types.InternalErrorException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentInvalidNextTokenException(v **types.InvalidNextTokenException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidNextTokenException
+ if *v == nil {
+ sv = &types.InvalidNextTokenException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidParameterException
+ if *v == nil {
+ sv = &types.InvalidParameterException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentNotFoundException(v **types.NotFoundException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.NotFoundException
+ if *v == nil {
+ sv = &types.NotFoundException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected errorMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentPriceList(v **types.PriceList, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.PriceList
+ if *v == nil {
+ sv = &types.PriceList{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CurrencyCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value)
+ }
+ sv.CurrencyCode = ptr.String(jtv)
+ }
+
+ case "FileFormats":
+ if err := awsAwsjson11_deserializeDocumentFileFormats(&sv.FileFormats, value); err != nil {
+ return err
+ }
+
+ case "PriceListArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PriceListArn to be of type string, got %T instead", value)
+ }
+ sv.PriceListArn = ptr.String(jtv)
+ }
+
+ case "RegionCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RegionCode to be of type string, got %T instead", value)
+ }
+ sv.RegionCode = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentPriceListJsonItems(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SynthesizedJsonPriceListJsonItem to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentPriceLists(v *[]types.PriceList, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.PriceList
+ if *v == nil {
+ cv = []types.PriceList{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.PriceList
+ destAddr := &col
+ if err := awsAwsjson11_deserializeDocumentPriceList(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentService(v **types.Service, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.Service
+ if *v == nil {
+ sv = &types.Service{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AttributeNames":
+ if err := awsAwsjson11_deserializeDocumentAttributeNameList(&sv.AttributeNames, value); err != nil {
+ return err
+ }
+
+ case "ServiceCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.ServiceCode = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentServiceList(v *[]types.Service, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.Service
+ if *v == nil {
+ cv = []types.Service{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.Service
+ destAddr := &col
+ if err := awsAwsjson11_deserializeDocumentService(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentDescribeServicesOutput(v **DescribeServicesOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *DescribeServicesOutput
+ if *v == nil {
+ sv = &DescribeServicesOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "FormatVersion":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.FormatVersion = ptr.String(jtv)
+ }
+
+ case "NextToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextToken = ptr.String(jtv)
+ }
+
+ case "Services":
+ if err := awsAwsjson11_deserializeDocumentServiceList(&sv.Services, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentGetAttributeValuesOutput(v **GetAttributeValuesOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetAttributeValuesOutput
+ if *v == nil {
+ sv = &GetAttributeValuesOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AttributeValues":
+ if err := awsAwsjson11_deserializeDocumentAttributeValueList(&sv.AttributeValues, value); err != nil {
+ return err
+ }
+
+ case "NextToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextToken = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentGetPriceListFileUrlOutput(v **GetPriceListFileUrlOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetPriceListFileUrlOutput
+ if *v == nil {
+ sv = &GetPriceListFileUrlOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Url":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Url = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentGetProductsOutput(v **GetProductsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetProductsOutput
+ if *v == nil {
+ sv = &GetProductsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "FormatVersion":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.FormatVersion = ptr.String(jtv)
+ }
+
+ case "NextToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextToken = ptr.String(jtv)
+ }
+
+ case "PriceList":
+ if err := awsAwsjson11_deserializeDocumentPriceListJsonItems(&sv.PriceList, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentListPriceListsOutput(v **ListPriceListsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListPriceListsOutput
+ if *v == nil {
+ sv = &ListPriceListsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "NextToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextToken = ptr.String(jtv)
+ }
+
+ case "PriceLists":
+ if err := awsAwsjson11_deserializeDocumentPriceLists(&sv.PriceLists, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/doc.go
new file mode 100644
index 000000000..f293831f9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/doc.go
@@ -0,0 +1,28 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+// Package pricing provides the API client, operations, and parameter types for
+// AWS Price List Service.
+//
+// The Amazon Web Services Price List API is a centralized and convenient way to
+// programmatically query Amazon Web Services for services, products, and pricing
+// information. The Amazon Web Services Price List uses standardized product
+// attributes such as Location , Storage Class , and Operating System , and
+// provides prices at the SKU level. You can use the Amazon Web Services Price List
+// to do the following:
+// - Build cost control and scenario planning tools
+// - Reconcile billing data
+// - Forecast future spend for budgeting purposes
+// - Provide cost benefit analysis that compare your internal workloads with
+// Amazon Web Services
+//
+// Use GetServices without a service code to retrieve the service codes for all
+// Amazon Web Services, then GetServices with a service code to retrieve the
+// attribute names for that service. After you have the service code and attribute
+// names, you can use GetAttributeValues to see what values are available for an
+// attribute. With the service code and an attribute name and value, you can use
+// GetProducts to find specific products that you're interested in, such as an
+// AmazonEC2 instance, with a Provisioned IOPS volumeType . You can use the
+// following endpoints for the Amazon Web Services Price List API:
+// - https://api.pricing.us-east-1.amazonaws.com
+// - https://api.pricing.ap-south-1.amazonaws.com
+package pricing
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/endpoints.go
new file mode 100644
index 000000000..24ddb0ac0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/endpoints.go
@@ -0,0 +1,499 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package pricing
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn"
+ internalendpoints "github.com/aws/aws-sdk-go-v2/service/pricing/internal/endpoints"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// EndpointResolverOptions is the service endpoint resolver options
+type EndpointResolverOptions = internalendpoints.Options
+
+// EndpointResolver interface for resolving service endpoints.
+type EndpointResolver interface {
+ ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+}
+
+var _ EndpointResolver = &internalendpoints.Resolver{}
+
+// NewDefaultEndpointResolver constructs a new service endpoint resolver
+func NewDefaultEndpointResolver() *internalendpoints.Resolver {
+ return internalendpoints.New()
+}
+
+// EndpointResolverFunc is a helper utility that wraps a function so it satisfies
+// the EndpointResolver interface. This is useful when you want to add additional
+// endpoint resolving logic, or stub out specific endpoints with custom values.
+type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+
+func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ return fn(region, options)
+}
+
+// EndpointResolverFromURL returns an EndpointResolver configured using the
+// provided endpoint url. By default, the resolved endpoint resolver uses the
+// client region as signing region, and the endpoint source is set to
+// EndpointSourceCustom.You can provide functional options to configure endpoint
+// values for the resolved endpoint.
+func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver {
+ e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom}
+ for _, fn := range optFns {
+ fn(&e)
+ }
+
+ return EndpointResolverFunc(
+ func(region string, options EndpointResolverOptions) (aws.Endpoint, error) {
+ if len(e.SigningRegion) == 0 {
+ e.SigningRegion = region
+ }
+ return e, nil
+ },
+ )
+}
+
+type ResolveEndpoint struct {
+ Resolver EndpointResolver
+ Options EndpointResolverOptions
+}
+
+func (*ResolveEndpoint) ID() string {
+ return "ResolveEndpoint"
+}
+
+func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.Resolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ eo := m.Options
+ eo.Logger = middleware.GetLogger(ctx)
+
+ var endpoint aws.Endpoint
+ endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
+ if err != nil {
+ nf := (&aws.EndpointNotFoundError{})
+ if errors.As(err, &nf) {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false)
+ return next.HandleSerialize(ctx, in)
+ }
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL, err = url.Parse(endpoint.URL)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
+ }
+
+ if len(awsmiddleware.GetSigningName(ctx)) == 0 {
+ signingName := endpoint.SigningName
+ if len(signingName) == 0 {
+ signingName = "pricing"
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ }
+ ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source)
+ ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable)
+ ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
+ ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID)
+ return next.HandleSerialize(ctx, in)
+}
+func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Serialize.Insert(&ResolveEndpoint{
+ Resolver: o.EndpointResolver,
+ Options: o.EndpointOptions,
+ }, "OperationSerializer", middleware.Before)
+}
+
+func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
+ _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID())
+ return err
+}
+
+type wrappedEndpointResolver struct {
+ awsResolver aws.EndpointResolverWithOptions
+}
+
+func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ return w.awsResolver.ResolveEndpoint(ServiceID, region, options)
+}
+
+type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
+
+func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) {
+ return a(service, region)
+}
+
+var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
+
+// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver.
+// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error,
+// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked
+// via its middleware.
+//
+// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated.
+func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver {
+ var resolver aws.EndpointResolverWithOptions
+
+ if awsResolverWithOptions != nil {
+ resolver = awsResolverWithOptions
+ } else if awsResolver != nil {
+ resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
+ }
+
+ return &wrappedEndpointResolver{
+ awsResolver: resolver,
+ }
+}
+
+func finalizeClientEndpointResolverOptions(options *Options) {
+ options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage()
+
+ if len(options.EndpointOptions.ResolvedRegion) == 0 {
+ const fipsInfix = "-fips-"
+ const fipsPrefix = "fips-"
+ const fipsSuffix = "-fips"
+
+ if strings.Contains(options.Region, fipsInfix) ||
+ strings.Contains(options.Region, fipsPrefix) ||
+ strings.Contains(options.Region, fipsSuffix) {
+ options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
+ options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
+ options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled
+ }
+ }
+
+}
+
+func resolveEndpointResolverV2(options *Options) {
+ if options.EndpointResolverV2 == nil {
+ options.EndpointResolverV2 = NewDefaultEndpointResolverV2()
+ }
+}
+
+// Utility function to aid with translating pseudo-regions to classical regions
+// with the appropriate setting indicated by the pseudo-region
+func mapPseudoRegion(pr string) (region string, fips aws.FIPSEndpointState) {
+ const fipsInfix = "-fips-"
+ const fipsPrefix = "fips-"
+ const fipsSuffix = "-fips"
+
+ if strings.Contains(pr, fipsInfix) ||
+ strings.Contains(pr, fipsPrefix) ||
+ strings.Contains(pr, fipsSuffix) {
+ region = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
+ pr, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
+ fips = aws.FIPSEndpointStateEnabled
+ } else {
+ region = pr
+ }
+
+ return region, fips
+}
+
+// builtInParameterResolver is the interface responsible for resolving BuiltIn
+// values during the sourcing of EndpointParameters
+type builtInParameterResolver interface {
+ ResolveBuiltIns(*EndpointParameters) error
+}
+
+// builtInResolver resolves modeled BuiltIn values using only the members defined
+// below.
+type builtInResolver struct {
+ // The AWS region used to dispatch the request.
+ Region string
+
+ // Sourced BuiltIn value in a historical enabled or disabled state.
+ UseDualStack aws.DualStackEndpointState
+
+ // Sourced BuiltIn value in a historical enabled or disabled state.
+ UseFIPS aws.FIPSEndpointState
+
+ // Base endpoint that can potentially be modified during Endpoint resolution.
+ Endpoint *string
+}
+
+// Invoked at runtime to resolve BuiltIn Values. Only resolution code specific to
+// each BuiltIn value is generated.
+func (b *builtInResolver) ResolveBuiltIns(params *EndpointParameters) error {
+
+ region, _ := mapPseudoRegion(b.Region)
+ if len(region) == 0 {
+ return fmt.Errorf("Could not resolve AWS::Region")
+ } else {
+ params.Region = aws.String(region)
+ }
+ if b.UseDualStack == aws.DualStackEndpointStateEnabled {
+ params.UseDualStack = aws.Bool(true)
+ } else {
+ params.UseDualStack = aws.Bool(false)
+ }
+ if b.UseFIPS == aws.FIPSEndpointStateEnabled {
+ params.UseFIPS = aws.Bool(true)
+ } else {
+ params.UseFIPS = aws.Bool(false)
+ }
+ params.Endpoint = b.Endpoint
+ return nil
+}
+
+// EndpointParameters provides the parameters that influence how endpoints are
+// resolved.
+type EndpointParameters struct {
+ // The AWS region used to dispatch the request.
+ //
+ // Parameter is
+ // required.
+ //
+ // AWS::Region
+ Region *string
+
+ // When true, use the dual-stack endpoint. If the configured endpoint does not
+ // support dual-stack, dispatching the request MAY return an error.
+ //
+ // Defaults to
+ // false if no value is provided.
+ //
+ // AWS::UseDualStack
+ UseDualStack *bool
+
+ // When true, send this request to the FIPS-compliant regional endpoint. If the
+ // configured endpoint does not have a FIPS compliant endpoint, dispatching the
+ // request will return an error.
+ //
+ // Defaults to false if no value is
+ // provided.
+ //
+ // AWS::UseFIPS
+ UseFIPS *bool
+
+ // Override the endpoint used to send this request
+ //
+ // Parameter is
+ // required.
+ //
+ // SDK::Endpoint
+ Endpoint *string
+}
+
+// ValidateRequired validates required parameters are set.
+func (p EndpointParameters) ValidateRequired() error {
+ if p.UseDualStack == nil {
+ return fmt.Errorf("parameter UseDualStack is required")
+ }
+
+ if p.UseFIPS == nil {
+ return fmt.Errorf("parameter UseFIPS is required")
+ }
+
+ return nil
+}
+
+// WithDefaults returns a shallow copy of EndpointParameterswith default values
+// applied to members where applicable.
+func (p EndpointParameters) WithDefaults() EndpointParameters {
+ if p.UseDualStack == nil {
+ p.UseDualStack = ptr.Bool(false)
+ }
+
+ if p.UseFIPS == nil {
+ p.UseFIPS = ptr.Bool(false)
+ }
+ return p
+}
+
+// EndpointResolverV2 provides the interface for resolving service endpoints.
+type EndpointResolverV2 interface {
+ // ResolveEndpoint attempts to resolve the endpoint with the provided options,
+ // returning the endpoint if found. Otherwise an error is returned.
+ ResolveEndpoint(ctx context.Context, params EndpointParameters) (
+ smithyendpoints.Endpoint, error,
+ )
+}
+
+// resolver provides the implementation for resolving endpoints.
+type resolver struct{}
+
+func NewDefaultEndpointResolverV2() EndpointResolverV2 {
+ return &resolver{}
+}
+
+// ResolveEndpoint attempts to resolve the endpoint with the provided options,
+// returning the endpoint if found. Otherwise an error is returned.
+func (r *resolver) ResolveEndpoint(
+ ctx context.Context, params EndpointParameters,
+) (
+ endpoint smithyendpoints.Endpoint, err error,
+) {
+ params = params.WithDefaults()
+ if err = params.ValidateRequired(); err != nil {
+ return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err)
+ }
+ _UseDualStack := *params.UseDualStack
+ _UseFIPS := *params.UseFIPS
+
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if _UseFIPS == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported")
+ }
+ if _UseDualStack == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported")
+ }
+ uriString := _Endpoint
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ if exprVal := params.Region; exprVal != nil {
+ _Region := *exprVal
+ _ = _Region
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _PartitionResult := *exprVal
+ _ = _PartitionResult
+ if _UseFIPS == true {
+ if _UseDualStack == true {
+ if true == _PartitionResult.SupportsFIPS {
+ if true == _PartitionResult.SupportsDualStack {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://api.pricing-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DualStackDnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both")
+ }
+ }
+ if _UseFIPS == true {
+ if true == _PartitionResult.SupportsFIPS {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://api.pricing-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS")
+ }
+ if _UseDualStack == true {
+ if true == _PartitionResult.SupportsDualStack {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://api.pricing.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DualStackDnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack")
+ }
+ if "aws" == _PartitionResult.Name {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://api.pricing.")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://api.pricing.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region")
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/generated.json
new file mode 100644
index 000000000..42569732e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/generated.json
@@ -0,0 +1,34 @@
+{
+ "dependencies": {
+ "github.com/aws/aws-sdk-go-v2": "v1.4.0",
+ "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000",
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000",
+ "github.com/aws/smithy-go": "v1.4.0",
+ "github.com/google/go-cmp": "v0.5.4"
+ },
+ "files": [
+ "api_client.go",
+ "api_client_test.go",
+ "api_op_DescribeServices.go",
+ "api_op_GetAttributeValues.go",
+ "api_op_GetPriceListFileUrl.go",
+ "api_op_GetProducts.go",
+ "api_op_ListPriceLists.go",
+ "deserializers.go",
+ "doc.go",
+ "endpoints.go",
+ "endpoints_test.go",
+ "generated.json",
+ "internal/endpoints/endpoints.go",
+ "internal/endpoints/endpoints_test.go",
+ "protocol_test.go",
+ "serializers.go",
+ "types/enums.go",
+ "types/errors.go",
+ "types/types.go",
+ "validators.go"
+ ],
+ "go": "1.15",
+ "module": "github.com/aws/aws-sdk-go-v2/service/pricing",
+ "unstable": false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/go_module_metadata.go
new file mode 100644
index 000000000..a2080f67a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package pricing
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.21.6"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/internal/endpoints/endpoints.go
new file mode 100644
index 000000000..430f90869
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/internal/endpoints/endpoints.go
@@ -0,0 +1,319 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package endpoints
+
+import (
+ "github.com/aws/aws-sdk-go-v2/aws"
+ endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
+ "github.com/aws/smithy-go/logging"
+ "regexp"
+)
+
+// Options is the endpoint resolver configuration options
+type Options struct {
+ // Logger is a logging implementation that log events should be sent to.
+ Logger logging.Logger
+
+ // LogDeprecated indicates that deprecated endpoints should be logged to the
+ // provided logger.
+ LogDeprecated bool
+
+ // ResolvedRegion is used to override the region to be resolved, rather then the
+ // using the value passed to the ResolveEndpoint method. This value is used by the
+ // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative
+ // name. You must not set this value directly in your application.
+ ResolvedRegion string
+
+ // DisableHTTPS informs the resolver to return an endpoint that does not use the
+ // HTTPS scheme.
+ DisableHTTPS bool
+
+ // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint.
+ UseDualStackEndpoint aws.DualStackEndpointState
+
+ // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
+ UseFIPSEndpoint aws.FIPSEndpointState
+}
+
+func (o Options) GetResolvedRegion() string {
+ return o.ResolvedRegion
+}
+
+func (o Options) GetDisableHTTPS() bool {
+ return o.DisableHTTPS
+}
+
+func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState {
+ return o.UseDualStackEndpoint
+}
+
+func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState {
+ return o.UseFIPSEndpoint
+}
+
+func transformToSharedOptions(options Options) endpoints.Options {
+ return endpoints.Options{
+ Logger: options.Logger,
+ LogDeprecated: options.LogDeprecated,
+ ResolvedRegion: options.ResolvedRegion,
+ DisableHTTPS: options.DisableHTTPS,
+ UseDualStackEndpoint: options.UseDualStackEndpoint,
+ UseFIPSEndpoint: options.UseFIPSEndpoint,
+ }
+}
+
+// Resolver Pricing endpoint resolver
+type Resolver struct {
+ partitions endpoints.Partitions
+}
+
+// ResolveEndpoint resolves the service endpoint for the given region and options
+func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) {
+ if len(region) == 0 {
+ return endpoint, &aws.MissingRegionError{}
+ }
+
+ opt := transformToSharedOptions(options)
+ return r.partitions.ResolveEndpoint(region, opt)
+}
+
+// New returns a new Resolver
+func New() *Resolver {
+ return &Resolver{
+ partitions: defaultPartitions,
+ }
+}
+
+var partitionRegexp = struct {
+ Aws *regexp.Regexp
+ AwsCn *regexp.Regexp
+ AwsIso *regexp.Regexp
+ AwsIsoB *regexp.Regexp
+ AwsIsoE *regexp.Regexp
+ AwsIsoF *regexp.Regexp
+ AwsUsGov *regexp.Regexp
+}{
+
+ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"),
+ AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
+ AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
+ AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
+ AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
+ AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"),
+ AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
+}
+
+var defaultPartitions = endpoints.Partitions{
+ {
+ ID: "aws",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "api.pricing.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ CredentialScope: endpoints.CredentialScope{
+ Service: "pricing",
+ },
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "api.pricing-fips.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ CredentialScope: endpoints.CredentialScope{
+ Service: "pricing",
+ },
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "api.pricing-fips.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ CredentialScope: endpoints.CredentialScope{
+ Service: "pricing",
+ },
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "api.pricing.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ CredentialScope: endpoints.CredentialScope{
+ Service: "pricing",
+ },
+ },
+ },
+ RegionRegex: partitionRegexp.Aws,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "ap-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ }: endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-cn",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "api.pricing.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "api.pricing-fips.{region}.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "api.pricing-fips.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "api.pricing.{region}.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsCn,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "api.pricing-fips.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "api.pricing.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIso,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso-b",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "api.pricing-fips.{region}.sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "api.pricing.{region}.sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoB,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso-e",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "api.pricing-fips.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "api.pricing.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoE,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso-f",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "api.pricing-fips.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "api.pricing.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoF,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-us-gov",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "api.pricing.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "api.pricing-fips.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "api.pricing-fips.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "api.pricing.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsUsGov,
+ IsRegionalized: true,
+ },
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/serializers.go
new file mode 100644
index 000000000..3eaeadba5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/serializers.go
@@ -0,0 +1,468 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package pricing
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/service/pricing/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ smithyjson "github.com/aws/smithy-go/encoding/json"
+ "github.com/aws/smithy-go/middleware"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "path"
+)
+
+type awsAwsjson11_serializeOpDescribeServices struct {
+}
+
+func (*awsAwsjson11_serializeOpDescribeServices) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpDescribeServices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DescribeServicesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPriceListService.DescribeServices")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentDescribeServicesInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpGetAttributeValues struct {
+}
+
+func (*awsAwsjson11_serializeOpGetAttributeValues) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpGetAttributeValues) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetAttributeValuesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPriceListService.GetAttributeValues")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentGetAttributeValuesInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpGetPriceListFileUrl struct {
+}
+
+func (*awsAwsjson11_serializeOpGetPriceListFileUrl) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpGetPriceListFileUrl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetPriceListFileUrlInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPriceListService.GetPriceListFileUrl")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentGetPriceListFileUrlInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpGetProducts struct {
+}
+
+func (*awsAwsjson11_serializeOpGetProducts) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpGetProducts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetProductsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPriceListService.GetProducts")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentGetProductsInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpListPriceLists struct {
+}
+
+func (*awsAwsjson11_serializeOpListPriceLists) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpListPriceLists) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListPriceListsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSPriceListService.ListPriceLists")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentListPriceListsInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsAwsjson11_serializeDocumentFilter(v *types.Filter, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Field != nil {
+ ok := object.Key("Field")
+ ok.String(*v.Field)
+ }
+
+ if len(v.Type) > 0 {
+ ok := object.Key("Type")
+ ok.String(string(v.Type))
+ }
+
+ if v.Value != nil {
+ ok := object.Key("Value")
+ ok.String(*v.Value)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeDocumentFilters(v []types.Filter, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ if err := awsAwsjson11_serializeDocumentFilter(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentDescribeServicesInput(v *DescribeServicesInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.FormatVersion != nil {
+ ok := object.Key("FormatVersion")
+ ok.String(*v.FormatVersion)
+ }
+
+ if v.MaxResults != nil {
+ ok := object.Key("MaxResults")
+ ok.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ ok := object.Key("NextToken")
+ ok.String(*v.NextToken)
+ }
+
+ if v.ServiceCode != nil {
+ ok := object.Key("ServiceCode")
+ ok.String(*v.ServiceCode)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentGetAttributeValuesInput(v *GetAttributeValuesInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.AttributeName != nil {
+ ok := object.Key("AttributeName")
+ ok.String(*v.AttributeName)
+ }
+
+ if v.MaxResults != nil {
+ ok := object.Key("MaxResults")
+ ok.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ ok := object.Key("NextToken")
+ ok.String(*v.NextToken)
+ }
+
+ if v.ServiceCode != nil {
+ ok := object.Key("ServiceCode")
+ ok.String(*v.ServiceCode)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentGetPriceListFileUrlInput(v *GetPriceListFileUrlInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.FileFormat != nil {
+ ok := object.Key("FileFormat")
+ ok.String(*v.FileFormat)
+ }
+
+ if v.PriceListArn != nil {
+ ok := object.Key("PriceListArn")
+ ok.String(*v.PriceListArn)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentGetProductsInput(v *GetProductsInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Filters != nil {
+ ok := object.Key("Filters")
+ if err := awsAwsjson11_serializeDocumentFilters(v.Filters, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.FormatVersion != nil {
+ ok := object.Key("FormatVersion")
+ ok.String(*v.FormatVersion)
+ }
+
+ if v.MaxResults != nil {
+ ok := object.Key("MaxResults")
+ ok.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ ok := object.Key("NextToken")
+ ok.String(*v.NextToken)
+ }
+
+ if v.ServiceCode != nil {
+ ok := object.Key("ServiceCode")
+ ok.String(*v.ServiceCode)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentListPriceListsInput(v *ListPriceListsInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.CurrencyCode != nil {
+ ok := object.Key("CurrencyCode")
+ ok.String(*v.CurrencyCode)
+ }
+
+ if v.EffectiveDate != nil {
+ ok := object.Key("EffectiveDate")
+ ok.Double(smithytime.FormatEpochSeconds(*v.EffectiveDate))
+ }
+
+ if v.MaxResults != nil {
+ ok := object.Key("MaxResults")
+ ok.Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ ok := object.Key("NextToken")
+ ok.String(*v.NextToken)
+ }
+
+ if v.RegionCode != nil {
+ ok := object.Key("RegionCode")
+ ok.String(*v.RegionCode)
+ }
+
+ if v.ServiceCode != nil {
+ ok := object.Key("ServiceCode")
+ ok.String(*v.ServiceCode)
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/types/enums.go
new file mode 100644
index 000000000..6a3160d0e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/types/enums.go
@@ -0,0 +1,19 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+type FilterType string
+
+// Enum values for FilterType
+const (
+ FilterTypeTermMatch FilterType = "TERM_MATCH"
+)
+
+// Values returns all known values for FilterType. Note that this can be expanded
+// in the future, and so it is only as up to date as the client. The ordering of
+// this slice is not guaranteed to be stable across updates.
+func (FilterType) Values() []FilterType {
+ return []FilterType{
+ "TERM_MATCH",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/types/errors.go
new file mode 100644
index 000000000..30bf9391a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/types/errors.go
@@ -0,0 +1,165 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+)
+
+// General authentication failure. The request wasn't signed correctly.
+type AccessDeniedException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *AccessDeniedException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *AccessDeniedException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *AccessDeniedException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "AccessDeniedException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The pagination token expired. Try again without a pagination token.
+type ExpiredNextTokenException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ExpiredNextTokenException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ExpiredNextTokenException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ExpiredNextTokenException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ExpiredNextTokenException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *ExpiredNextTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// An error on the server occurred during the processing of your request. Try
+// again later.
+type InternalErrorException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InternalErrorException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InternalErrorException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InternalErrorException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InternalErrorException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InternalErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// The pagination token is invalid. Try again without a pagination token.
+type InvalidNextTokenException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidNextTokenException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidNextTokenException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidNextTokenException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidNextTokenException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidNextTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// One or more parameters had an invalid value.
+type InvalidParameterException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidParameterException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidParameterException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidParameterException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidParameterException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidParameterException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The requested resource can't be found.
+type NotFoundException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *NotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *NotFoundException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *NotFoundException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "NotFoundException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *NotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/types/types.go
new file mode 100644
index 000000000..3d358ed62
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/types/types.go
@@ -0,0 +1,97 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ smithydocument "github.com/aws/smithy-go/document"
+)
+
+// The values of a given attribute, such as Throughput Optimized HDD or
+// Provisioned IOPS for the Amazon EC2 volumeType attribute.
+type AttributeValue struct {
+
+ // The specific value of an attributeName .
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// The constraints that you want all returned products to match.
+type Filter struct {
+
+ // The product metadata field that you want to filter on. You can filter by just
+ // the service code to see all products for a specific service, filter by just the
+ // attribute name to see a specific attribute for multiple services, or use both a
+ // service code and an attribute name to retrieve only products that match both
+ // fields. Valid values include: ServiceCode , and all attribute names For example,
+ // you can filter by the AmazonEC2 service code and the volumeType attribute name
+ // to get the prices for only Amazon EC2 volumes.
+ //
+ // This member is required.
+ Field *string
+
+ // The type of filter that you want to use. Valid values are: TERM_MATCH .
+ // TERM_MATCH returns only products that match both the given filter field and the
+ // given value.
+ //
+ // This member is required.
+ Type FilterType
+
+ // The service code or attribute value that you want to filter by. If you're
+ // filtering by service code this is the actual service code, such as AmazonEC2 .
+ // If you're filtering by attribute name, this is the attribute value that you want
+ // the returned products to match, such as a Provisioned IOPS volume.
+ //
+ // This member is required.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// This feature is in preview release and is subject to change. Your use of Amazon
+// Web Services Price List API is subject to the Beta Service Participation terms
+// of the Amazon Web Services Service Terms (https://aws.amazon.com/service-terms/)
+// (Section 1.10). This is the type of price list references that match your
+// request.
+type PriceList struct {
+
+ // The three alphabetical character ISO-4217 currency code the Price List files
+ // are denominated in.
+ CurrencyCode *string
+
+ // The format you want to retrieve your Price List files. The FileFormat can be
+ // obtained from the ListPriceList (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html)
+ // response.
+ FileFormats []string
+
+ // The unique identifier that maps to where your Price List files are located.
+ // PriceListArn can be obtained from the ListPriceList (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_ListPriceLists.html)
+ // response.
+ PriceListArn *string
+
+ // This is used to filter the Price List by Amazon Web Services Region. For
+ // example, to get the price list only for the US East (N. Virginia) Region, use
+ // us-east-1 . If nothing is specified, you retrieve price lists for all applicable
+ // Regions. The available RegionCode list can be retrieved from GetAttributeValues (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetAttributeValues.html)
+ // API.
+ RegionCode *string
+
+ noSmithyDocumentSerde
+}
+
+// The metadata for a service, such as the service code and available attribute
+// names.
+type Service struct {
+
+ // The code for the Amazon Web Services service.
+ //
+ // This member is required.
+ ServiceCode *string
+
+ // The attributes that are available for this service.
+ AttributeNames []string
+
+ noSmithyDocumentSerde
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/validators.go
new file mode 100644
index 000000000..434770aa2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/pricing/validators.go
@@ -0,0 +1,222 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package pricing
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/service/pricing/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type validateOpGetAttributeValues struct {
+}
+
+func (*validateOpGetAttributeValues) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetAttributeValues) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetAttributeValuesInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetAttributeValuesInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetPriceListFileUrl struct {
+}
+
+func (*validateOpGetPriceListFileUrl) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetPriceListFileUrl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetPriceListFileUrlInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetPriceListFileUrlInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetProducts struct {
+}
+
+func (*validateOpGetProducts) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetProducts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetProductsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetProductsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListPriceLists struct {
+}
+
+func (*validateOpListPriceLists) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListPriceLists) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListPriceListsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListPriceListsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+func addOpGetAttributeValuesValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetAttributeValues{}, middleware.After)
+}
+
+func addOpGetPriceListFileUrlValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetPriceListFileUrl{}, middleware.After)
+}
+
+func addOpGetProductsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetProducts{}, middleware.After)
+}
+
+func addOpListPriceListsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListPriceLists{}, middleware.After)
+}
+
+func validateFilter(v *types.Filter) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Filter"}
+ if len(v.Type) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Type"))
+ }
+ if v.Field == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Field"))
+ }
+ if v.Value == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Value"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateFilters(v []types.Filter) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Filters"}
+ for i := range v {
+ if err := validateFilter(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetAttributeValuesInput(v *GetAttributeValuesInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetAttributeValuesInput"}
+ if v.ServiceCode == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ServiceCode"))
+ }
+ if v.AttributeName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AttributeName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetPriceListFileUrlInput(v *GetPriceListFileUrlInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetPriceListFileUrlInput"}
+ if v.PriceListArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("PriceListArn"))
+ }
+ if v.FileFormat == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FileFormat"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetProductsInput(v *GetProductsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetProductsInput"}
+ if v.ServiceCode == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ServiceCode"))
+ }
+ if v.Filters != nil {
+ if err := validateFilters(v.Filters); err != nil {
+ invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListPriceListsInput(v *ListPriceListsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListPriceListsInput"}
+ if v.ServiceCode == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ServiceCode"))
+ }
+ if v.EffectiveDate == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("EffectiveDate"))
+ }
+ if v.CurrencyCode == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CurrencyCode"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/aws/aws-sdk-go/NOTICE.txt b/vendor/github.com/aws/aws-sdk-go/NOTICE.txt
new file mode 100644
index 000000000..899129ecc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/NOTICE.txt
@@ -0,0 +1,3 @@
+AWS SDK for Go
+Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+Copyright 2014-2015 Stripe, Inc.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go b/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go
new file mode 100644
index 000000000..99849c0e1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go
@@ -0,0 +1,164 @@
+// Package awserr represents API error interface accessors for the SDK.
+package awserr
+
+// An Error wraps lower level errors with code, message and an original error.
+// The underlying concrete error type may also satisfy other interfaces which
+// can be to used to obtain more specific information about the error.
+//
+// Calling Error() or String() will always include the full information about
+// an error based on its underlying type.
+//
+// Example:
+//
+// output, err := s3manage.Upload(svc, input, opts)
+// if err != nil {
+// if awsErr, ok := err.(awserr.Error); ok {
+// // Get error details
+// log.Println("Error:", awsErr.Code(), awsErr.Message())
+//
+// // Prints out full error message, including original error if there was one.
+// log.Println("Error:", awsErr.Error())
+//
+// // Get original error
+// if origErr := awsErr.OrigErr(); origErr != nil {
+// // operate on original error.
+// }
+// } else {
+// fmt.Println(err.Error())
+// }
+// }
+//
+type Error interface {
+ // Satisfy the generic error interface.
+ error
+
+ // Returns the short phrase depicting the classification of the error.
+ Code() string
+
+ // Returns the error details message.
+ Message() string
+
+ // Returns the original error if one was set. Nil is returned if not set.
+ OrigErr() error
+}
+
+// BatchError is a batch of errors which also wraps lower level errors with
+// code, message, and original errors. Calling Error() will include all errors
+// that occurred in the batch.
+//
+// Deprecated: Replaced with BatchedErrors. Only defined for backwards
+// compatibility.
+type BatchError interface {
+ // Satisfy the generic error interface.
+ error
+
+ // Returns the short phrase depicting the classification of the error.
+ Code() string
+
+ // Returns the error details message.
+ Message() string
+
+ // Returns the original error if one was set. Nil is returned if not set.
+ OrigErrs() []error
+}
+
+// BatchedErrors is a batch of errors which also wraps lower level errors with
+// code, message, and original errors. Calling Error() will include all errors
+// that occurred in the batch.
+//
+// Replaces BatchError
+type BatchedErrors interface {
+ // Satisfy the base Error interface.
+ Error
+
+ // Returns the original error if one was set. Nil is returned if not set.
+ OrigErrs() []error
+}
+
+// New returns an Error object described by the code, message, and origErr.
+//
+// If origErr satisfies the Error interface it will not be wrapped within a new
+// Error object and will instead be returned.
+func New(code, message string, origErr error) Error {
+ var errs []error
+ if origErr != nil {
+ errs = append(errs, origErr)
+ }
+ return newBaseError(code, message, errs)
+}
+
+// NewBatchError returns an BatchedErrors with a collection of errors as an
+// array of errors.
+func NewBatchError(code, message string, errs []error) BatchedErrors {
+ return newBaseError(code, message, errs)
+}
+
+// A RequestFailure is an interface to extract request failure information from
+// an Error such as the request ID of the failed request returned by a service.
+// RequestFailures may not always have a requestID value if the request failed
+// prior to reaching the service such as a connection error.
+//
+// Example:
+//
+// output, err := s3manage.Upload(svc, input, opts)
+// if err != nil {
+// if reqerr, ok := err.(RequestFailure); ok {
+// log.Println("Request failed", reqerr.Code(), reqerr.Message(), reqerr.RequestID())
+// } else {
+// log.Println("Error:", err.Error())
+// }
+// }
+//
+// Combined with awserr.Error:
+//
+// output, err := s3manage.Upload(svc, input, opts)
+// if err != nil {
+// if awsErr, ok := err.(awserr.Error); ok {
+// // Generic AWS Error with Code, Message, and original error (if any)
+// fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+//
+// if reqErr, ok := err.(awserr.RequestFailure); ok {
+// // A service error occurred
+// fmt.Println(reqErr.StatusCode(), reqErr.RequestID())
+// }
+// } else {
+// fmt.Println(err.Error())
+// }
+// }
+//
+type RequestFailure interface {
+ Error
+
+ // The status code of the HTTP response.
+ StatusCode() int
+
+ // The request ID returned by the service for a request failure. This will
+ // be empty if no request ID is available such as the request failed due
+ // to a connection error.
+ RequestID() string
+}
+
+// NewRequestFailure returns a wrapped error with additional information for
+// request status code, and service requestID.
+//
+// Should be used to wrap all request which involve service requests. Even if
+// the request failed without a service response, but had an HTTP status code
+// that may be meaningful.
+func NewRequestFailure(err Error, statusCode int, reqID string) RequestFailure {
+ return newRequestError(err, statusCode, reqID)
+}
+
+// UnmarshalError provides the interface for the SDK failing to unmarshal data.
+type UnmarshalError interface {
+ awsError
+ Bytes() []byte
+}
+
+// NewUnmarshalError returns an initialized UnmarshalError error wrapper adding
+// the bytes that fail to unmarshal to the error.
+func NewUnmarshalError(err error, msg string, bytes []byte) UnmarshalError {
+ return &unmarshalError{
+ awsError: New("UnmarshalError", msg, err),
+ bytes: bytes,
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go b/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go
new file mode 100644
index 000000000..9cf7eaf40
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go
@@ -0,0 +1,221 @@
+package awserr
+
+import (
+ "encoding/hex"
+ "fmt"
+)
+
+// SprintError returns a string of the formatted error code.
+//
+// Both extra and origErr are optional. If they are included their lines
+// will be added, but if they are not included their lines will be ignored.
+func SprintError(code, message, extra string, origErr error) string {
+ msg := fmt.Sprintf("%s: %s", code, message)
+ if extra != "" {
+ msg = fmt.Sprintf("%s\n\t%s", msg, extra)
+ }
+ if origErr != nil {
+ msg = fmt.Sprintf("%s\ncaused by: %s", msg, origErr.Error())
+ }
+ return msg
+}
+
+// A baseError wraps the code and message which defines an error. It also
+// can be used to wrap an original error object.
+//
+// Should be used as the root for errors satisfying the awserr.Error. Also
+// for any error which does not fit into a specific error wrapper type.
+type baseError struct {
+ // Classification of error
+ code string
+
+ // Detailed information about error
+ message string
+
+ // Optional original error this error is based off of. Allows building
+ // chained errors.
+ errs []error
+}
+
+// newBaseError returns an error object for the code, message, and errors.
+//
+// code is a short no whitespace phrase depicting the classification of
+// the error that is being created.
+//
+// message is the free flow string containing detailed information about the
+// error.
+//
+// origErrs is the error objects which will be nested under the new errors to
+// be returned.
+func newBaseError(code, message string, origErrs []error) *baseError {
+ b := &baseError{
+ code: code,
+ message: message,
+ errs: origErrs,
+ }
+
+ return b
+}
+
+// Error returns the string representation of the error.
+//
+// See ErrorWithExtra for formatting.
+//
+// Satisfies the error interface.
+func (b baseError) Error() string {
+ size := len(b.errs)
+ if size > 0 {
+ return SprintError(b.code, b.message, "", errorList(b.errs))
+ }
+
+ return SprintError(b.code, b.message, "", nil)
+}
+
+// String returns the string representation of the error.
+// Alias for Error to satisfy the stringer interface.
+func (b baseError) String() string {
+ return b.Error()
+}
+
+// Code returns the short phrase depicting the classification of the error.
+func (b baseError) Code() string {
+ return b.code
+}
+
+// Message returns the error details message.
+func (b baseError) Message() string {
+ return b.message
+}
+
+// OrigErr returns the original error if one was set. Nil is returned if no
+// error was set. This only returns the first element in the list. If the full
+// list is needed, use BatchedErrors.
+func (b baseError) OrigErr() error {
+ switch len(b.errs) {
+ case 0:
+ return nil
+ case 1:
+ return b.errs[0]
+ default:
+ if err, ok := b.errs[0].(Error); ok {
+ return NewBatchError(err.Code(), err.Message(), b.errs[1:])
+ }
+ return NewBatchError("BatchedErrors",
+ "multiple errors occurred", b.errs)
+ }
+}
+
+// OrigErrs returns the original errors if one was set. An empty slice is
+// returned if no error was set.
+func (b baseError) OrigErrs() []error {
+ return b.errs
+}
+
+// So that the Error interface type can be included as an anonymous field
+// in the requestError struct and not conflict with the error.Error() method.
+type awsError Error
+
+// A requestError wraps a request or service error.
+//
+// Composed of baseError for code, message, and original error.
+type requestError struct {
+ awsError
+ statusCode int
+ requestID string
+ bytes []byte
+}
+
+// newRequestError returns a wrapped error with additional information for
+// request status code, and service requestID.
+//
+// Should be used to wrap all request which involve service requests. Even if
+// the request failed without a service response, but had an HTTP status code
+// that may be meaningful.
+//
+// Also wraps original errors via the baseError.
+func newRequestError(err Error, statusCode int, requestID string) *requestError {
+ return &requestError{
+ awsError: err,
+ statusCode: statusCode,
+ requestID: requestID,
+ }
+}
+
+// Error returns the string representation of the error.
+// Satisfies the error interface.
+func (r requestError) Error() string {
+ extra := fmt.Sprintf("status code: %d, request id: %s",
+ r.statusCode, r.requestID)
+ return SprintError(r.Code(), r.Message(), extra, r.OrigErr())
+}
+
+// String returns the string representation of the error.
+// Alias for Error to satisfy the stringer interface.
+func (r requestError) String() string {
+ return r.Error()
+}
+
+// StatusCode returns the wrapped status code for the error
+func (r requestError) StatusCode() int {
+ return r.statusCode
+}
+
+// RequestID returns the wrapped requestID
+func (r requestError) RequestID() string {
+ return r.requestID
+}
+
+// OrigErrs returns the original errors if one was set. An empty slice is
+// returned if no error was set.
+func (r requestError) OrigErrs() []error {
+ if b, ok := r.awsError.(BatchedErrors); ok {
+ return b.OrigErrs()
+ }
+ return []error{r.OrigErr()}
+}
+
+type unmarshalError struct {
+ awsError
+ bytes []byte
+}
+
+// Error returns the string representation of the error.
+// Satisfies the error interface.
+func (e unmarshalError) Error() string {
+ extra := hex.Dump(e.bytes)
+ return SprintError(e.Code(), e.Message(), extra, e.OrigErr())
+}
+
+// String returns the string representation of the error.
+// Alias for Error to satisfy the stringer interface.
+func (e unmarshalError) String() string {
+ return e.Error()
+}
+
+// Bytes returns the bytes that failed to unmarshal.
+func (e unmarshalError) Bytes() []byte {
+ return e.bytes
+}
+
+// An error list that satisfies the golang interface
+type errorList []error
+
+// Error returns the string representation of the error.
+//
+// Satisfies the error interface.
+func (e errorList) Error() string {
+ msg := ""
+ // How do we want to handle the array size being zero
+ if size := len(e); size > 0 {
+ for i := 0; i < size; i++ {
+ msg += e[i].Error()
+ // We check the next index to see if it is within the slice.
+ // If it is, then we append a newline. We do this, because unit tests
+ // could be broken with the additional '\n'
+ if i+1 < size {
+ msg += "\n"
+ }
+ }
+ }
+ return msg
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go
new file mode 100644
index 000000000..cad3b9a48
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go
@@ -0,0 +1,193 @@
+package endpoints
+
+import (
+ "encoding/json"
+ "fmt"
+ "io"
+
+ "github.com/aws/aws-sdk-go/aws/awserr"
+)
+
+type modelDefinition map[string]json.RawMessage
+
+// A DecodeModelOptions are the options for how the endpoints model definition
+// are decoded.
+type DecodeModelOptions struct {
+ SkipCustomizations bool
+}
+
+// Set combines all of the option functions together.
+func (d *DecodeModelOptions) Set(optFns ...func(*DecodeModelOptions)) {
+ for _, fn := range optFns {
+ fn(d)
+ }
+}
+
+// DecodeModel unmarshals a Regions and Endpoint model definition file into
+// a endpoint Resolver. If the file format is not supported, or an error occurs
+// when unmarshaling the model an error will be returned.
+//
+// Casting the return value of this func to a EnumPartitions will
+// allow you to get a list of the partitions in the order the endpoints
+// will be resolved in.
+//
+// resolver, err := endpoints.DecodeModel(reader)
+//
+// partitions := resolver.(endpoints.EnumPartitions).Partitions()
+// for _, p := range partitions {
+// // ... inspect partitions
+// }
+func DecodeModel(r io.Reader, optFns ...func(*DecodeModelOptions)) (Resolver, error) {
+ var opts DecodeModelOptions
+ opts.Set(optFns...)
+
+ // Get the version of the partition file to determine what
+ // unmarshaling model to use.
+ modelDef := modelDefinition{}
+ if err := json.NewDecoder(r).Decode(&modelDef); err != nil {
+ return nil, newDecodeModelError("failed to decode endpoints model", err)
+ }
+
+ var version string
+ if b, ok := modelDef["version"]; ok {
+ version = string(b)
+ } else {
+ return nil, newDecodeModelError("endpoints version not found in model", nil)
+ }
+
+ if version == "3" {
+ return decodeV3Endpoints(modelDef, opts)
+ }
+
+ return nil, newDecodeModelError(
+ fmt.Sprintf("endpoints version %s, not supported", version), nil)
+}
+
+func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resolver, error) {
+ b, ok := modelDef["partitions"]
+ if !ok {
+ return nil, newDecodeModelError("endpoints model missing partitions", nil)
+ }
+
+ ps := partitions{}
+ if err := json.Unmarshal(b, &ps); err != nil {
+ return nil, newDecodeModelError("failed to decode endpoints model", err)
+ }
+
+ if opts.SkipCustomizations {
+ return ps, nil
+ }
+
+ // Customization
+ for i := 0; i < len(ps); i++ {
+ p := &ps[i]
+ custRegionalS3(p)
+ custRmIotDataService(p)
+ custFixAppAutoscalingChina(p)
+ custFixAppAutoscalingUsGov(p)
+ }
+
+ return ps, nil
+}
+
+func custRegionalS3(p *partition) {
+ if p.ID != "aws" {
+ return
+ }
+
+ service, ok := p.Services["s3"]
+ if !ok {
+ return
+ }
+
+ const awsGlobal = "aws-global"
+ const usEast1 = "us-east-1"
+
+ // If global endpoint already exists no customization needed.
+ if _, ok := service.Endpoints[endpointKey{Region: awsGlobal}]; ok {
+ return
+ }
+
+ service.PartitionEndpoint = awsGlobal
+ if _, ok := service.Endpoints[endpointKey{Region: usEast1}]; !ok {
+ service.Endpoints[endpointKey{Region: usEast1}] = endpoint{}
+ }
+ service.Endpoints[endpointKey{Region: awsGlobal}] = endpoint{
+ Hostname: "s3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: usEast1,
+ },
+ }
+
+ p.Services["s3"] = service
+}
+
+func custRmIotDataService(p *partition) {
+ delete(p.Services, "data.iot")
+}
+
+func custFixAppAutoscalingChina(p *partition) {
+ if p.ID != "aws-cn" {
+ return
+ }
+
+ const serviceName = "application-autoscaling"
+ s, ok := p.Services[serviceName]
+ if !ok {
+ return
+ }
+
+ const expectHostname = `autoscaling.{region}.amazonaws.com`
+ serviceDefault := s.Defaults[defaultKey{}]
+ if e, a := expectHostname, serviceDefault.Hostname; e != a {
+ fmt.Printf("custFixAppAutoscalingChina: ignoring customization, expected %s, got %s\n", e, a)
+ return
+ }
+ serviceDefault.Hostname = expectHostname + ".cn"
+ s.Defaults[defaultKey{}] = serviceDefault
+ p.Services[serviceName] = s
+}
+
+func custFixAppAutoscalingUsGov(p *partition) {
+ if p.ID != "aws-us-gov" {
+ return
+ }
+
+ const serviceName = "application-autoscaling"
+ s, ok := p.Services[serviceName]
+ if !ok {
+ return
+ }
+
+ serviceDefault := s.Defaults[defaultKey{}]
+ if a := serviceDefault.CredentialScope.Service; a != "" {
+ fmt.Printf("custFixAppAutoscalingUsGov: ignoring customization, expected empty credential scope service, got %s\n", a)
+ return
+ }
+
+ if a := serviceDefault.Hostname; a != "" {
+ fmt.Printf("custFixAppAutoscalingUsGov: ignoring customization, expected empty hostname, got %s\n", a)
+ return
+ }
+
+ serviceDefault.CredentialScope.Service = "application-autoscaling"
+ serviceDefault.Hostname = "autoscaling.{region}.amazonaws.com"
+
+ if s.Defaults == nil {
+ s.Defaults = make(endpointDefaults)
+ }
+
+ s.Defaults[defaultKey{}] = serviceDefault
+
+ p.Services[serviceName] = s
+}
+
+type decodeModelError struct {
+ awsError
+}
+
+func newDecodeModelError(msg string, err error) decodeModelError {
+ return decodeModelError{
+ awsError: awserr.New("DecodeEndpointsModelError", msg, err),
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
new file mode 100644
index 000000000..2a44182a9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
@@ -0,0 +1,41704 @@
+// Code generated by aws/endpoints/v3model_codegen.go. DO NOT EDIT.
+
+package endpoints
+
+import (
+ "regexp"
+)
+
+// Partition identifiers
+const (
+ AwsPartitionID = "aws" // AWS Standard partition.
+ AwsCnPartitionID = "aws-cn" // AWS China partition.
+ AwsUsGovPartitionID = "aws-us-gov" // AWS GovCloud (US) partition.
+ AwsIsoPartitionID = "aws-iso" // AWS ISO (US) partition.
+ AwsIsoBPartitionID = "aws-iso-b" // AWS ISOB (US) partition.
+ AwsIsoEPartitionID = "aws-iso-e" // AWS ISOE (Europe) partition.
+ AwsIsoFPartitionID = "aws-iso-f" // AWS ISOF partition.
+)
+
+// AWS Standard partition's regions.
+const (
+ AfSouth1RegionID = "af-south-1" // Africa (Cape Town).
+ ApEast1RegionID = "ap-east-1" // Asia Pacific (Hong Kong).
+ ApNortheast1RegionID = "ap-northeast-1" // Asia Pacific (Tokyo).
+ ApNortheast2RegionID = "ap-northeast-2" // Asia Pacific (Seoul).
+ ApNortheast3RegionID = "ap-northeast-3" // Asia Pacific (Osaka).
+ ApSouth1RegionID = "ap-south-1" // Asia Pacific (Mumbai).
+ ApSouth2RegionID = "ap-south-2" // Asia Pacific (Hyderabad).
+ ApSoutheast1RegionID = "ap-southeast-1" // Asia Pacific (Singapore).
+ ApSoutheast2RegionID = "ap-southeast-2" // Asia Pacific (Sydney).
+ ApSoutheast3RegionID = "ap-southeast-3" // Asia Pacific (Jakarta).
+ ApSoutheast4RegionID = "ap-southeast-4" // Asia Pacific (Melbourne).
+ CaCentral1RegionID = "ca-central-1" // Canada (Central).
+ EuCentral1RegionID = "eu-central-1" // Europe (Frankfurt).
+ EuCentral2RegionID = "eu-central-2" // Europe (Zurich).
+ EuNorth1RegionID = "eu-north-1" // Europe (Stockholm).
+ EuSouth1RegionID = "eu-south-1" // Europe (Milan).
+ EuSouth2RegionID = "eu-south-2" // Europe (Spain).
+ EuWest1RegionID = "eu-west-1" // Europe (Ireland).
+ EuWest2RegionID = "eu-west-2" // Europe (London).
+ EuWest3RegionID = "eu-west-3" // Europe (Paris).
+ IlCentral1RegionID = "il-central-1" // Israel (Tel Aviv).
+ MeCentral1RegionID = "me-central-1" // Middle East (UAE).
+ MeSouth1RegionID = "me-south-1" // Middle East (Bahrain).
+ SaEast1RegionID = "sa-east-1" // South America (Sao Paulo).
+ UsEast1RegionID = "us-east-1" // US East (N. Virginia).
+ UsEast2RegionID = "us-east-2" // US East (Ohio).
+ UsWest1RegionID = "us-west-1" // US West (N. California).
+ UsWest2RegionID = "us-west-2" // US West (Oregon).
+)
+
+// AWS China partition's regions.
+const (
+ CnNorth1RegionID = "cn-north-1" // China (Beijing).
+ CnNorthwest1RegionID = "cn-northwest-1" // China (Ningxia).
+)
+
+// AWS GovCloud (US) partition's regions.
+const (
+ UsGovEast1RegionID = "us-gov-east-1" // AWS GovCloud (US-East).
+ UsGovWest1RegionID = "us-gov-west-1" // AWS GovCloud (US-West).
+)
+
+// AWS ISO (US) partition's regions.
+const (
+ UsIsoEast1RegionID = "us-iso-east-1" // US ISO East.
+ UsIsoWest1RegionID = "us-iso-west-1" // US ISO WEST.
+)
+
+// AWS ISOB (US) partition's regions.
+const (
+ UsIsobEast1RegionID = "us-isob-east-1" // US ISOB East (Ohio).
+)
+
+// AWS ISOE (Europe) partition's regions.
+const ()
+
+// AWS ISOF partition's regions.
+const ()
+
+// DefaultResolver returns an Endpoint resolver that will be able
+// to resolve endpoints for: AWS Standard, AWS China, AWS GovCloud (US), AWS ISO (US), AWS ISOB (US), AWS ISOE (Europe), and AWS ISOF.
+//
+// Use DefaultPartitions() to get the list of the default partitions.
+func DefaultResolver() Resolver {
+ return defaultPartitions
+}
+
+// DefaultPartitions returns a list of the partitions the SDK is bundled
+// with. The available partitions are: AWS Standard, AWS China, AWS GovCloud (US), AWS ISO (US), AWS ISOB (US), AWS ISOE (Europe), and AWS ISOF.
+//
+// partitions := endpoints.DefaultPartitions
+// for _, p := range partitions {
+// // ... inspect partitions
+// }
+func DefaultPartitions() []Partition {
+ return defaultPartitions.Partitions()
+}
+
+var defaultPartitions = partitions{
+ awsPartition,
+ awscnPartition,
+ awsusgovPartition,
+ awsisoPartition,
+ awsisobPartition,
+ awsisoePartition,
+ awsisofPartition,
+}
+
+// AwsPartition returns the Resolver for AWS Standard.
+func AwsPartition() Partition {
+ return awsPartition.Partition()
+}
+
+var awsPartition = partition{
+ ID: "aws",
+ Name: "AWS Standard",
+ DNSSuffix: "amazonaws.com",
+ RegionRegex: regionRegex{
+ Regexp: func() *regexp.Regexp {
+ reg, _ := regexp.Compile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$")
+ return reg
+ }(),
+ },
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Hostname: "{service}.{region}.{dnsSuffix}",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ defaultKey{
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}.{region}.{dnsSuffix}",
+ DNSSuffix: "api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ defaultKey{
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ Regions: regions{
+ "af-south-1": region{
+ Description: "Africa (Cape Town)",
+ },
+ "ap-east-1": region{
+ Description: "Asia Pacific (Hong Kong)",
+ },
+ "ap-northeast-1": region{
+ Description: "Asia Pacific (Tokyo)",
+ },
+ "ap-northeast-2": region{
+ Description: "Asia Pacific (Seoul)",
+ },
+ "ap-northeast-3": region{
+ Description: "Asia Pacific (Osaka)",
+ },
+ "ap-south-1": region{
+ Description: "Asia Pacific (Mumbai)",
+ },
+ "ap-south-2": region{
+ Description: "Asia Pacific (Hyderabad)",
+ },
+ "ap-southeast-1": region{
+ Description: "Asia Pacific (Singapore)",
+ },
+ "ap-southeast-2": region{
+ Description: "Asia Pacific (Sydney)",
+ },
+ "ap-southeast-3": region{
+ Description: "Asia Pacific (Jakarta)",
+ },
+ "ap-southeast-4": region{
+ Description: "Asia Pacific (Melbourne)",
+ },
+ "ca-central-1": region{
+ Description: "Canada (Central)",
+ },
+ "eu-central-1": region{
+ Description: "Europe (Frankfurt)",
+ },
+ "eu-central-2": region{
+ Description: "Europe (Zurich)",
+ },
+ "eu-north-1": region{
+ Description: "Europe (Stockholm)",
+ },
+ "eu-south-1": region{
+ Description: "Europe (Milan)",
+ },
+ "eu-south-2": region{
+ Description: "Europe (Spain)",
+ },
+ "eu-west-1": region{
+ Description: "Europe (Ireland)",
+ },
+ "eu-west-2": region{
+ Description: "Europe (London)",
+ },
+ "eu-west-3": region{
+ Description: "Europe (Paris)",
+ },
+ "il-central-1": region{
+ Description: "Israel (Tel Aviv)",
+ },
+ "me-central-1": region{
+ Description: "Middle East (UAE)",
+ },
+ "me-south-1": region{
+ Description: "Middle East (Bahrain)",
+ },
+ "sa-east-1": region{
+ Description: "South America (Sao Paulo)",
+ },
+ "us-east-1": region{
+ Description: "US East (N. Virginia)",
+ },
+ "us-east-2": region{
+ Description: "US East (Ohio)",
+ },
+ "us-west-1": region{
+ Description: "US West (N. California)",
+ },
+ "us-west-2": region{
+ Description: "US West (Oregon)",
+ },
+ },
+ Services: services{
+ "a4b": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "access-analyzer": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "access-analyzer-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "access-analyzer-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "access-analyzer-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "access-analyzer-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "access-analyzer-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "access-analyzer-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "access-analyzer-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "access-analyzer-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "access-analyzer-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "access-analyzer-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "account": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "account.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ },
+ },
+ "acm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "acm-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1-fips",
+ }: endpoint{
+ Hostname: "acm-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "acm-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "acm-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "acm-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "acm-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "acm-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "acm-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "acm-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "acm-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "acm-pca": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "acm-pca-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "acm-pca-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "acm-pca-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "acm-pca-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "acm-pca-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "acm-pca-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "acm-pca-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "acm-pca-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "acm-pca-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "acm-pca-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "airflow": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "amplify": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "amplifybackend": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "amplifyuibuilder": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "aoss": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "api.detective": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.detective-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "api.detective-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.detective-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "api.detective-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.detective-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "api.detective-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.detective-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "api.detective-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "api.ecr": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecr-fips.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{
+ Hostname: "api.ecr.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{
+ Hostname: "api.ecr.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "api.ecr.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "api.ecr.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{
+ Hostname: "api.ecr.ap-northeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{
+ Hostname: "api.ecr.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{
+ Hostname: "api.ecr.ap-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "api.ecr.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "api.ecr.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{
+ Hostname: "api.ecr.ap-southeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{
+ Hostname: "api.ecr.ap-southeast-4.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-4",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Hostname: "api.ecr.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "dkr-us-east-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dkr-us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecr-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dkr-us-east-2",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dkr-us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecr-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dkr-us-west-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dkr-us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecr-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dkr-us-west-2",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dkr-us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecr-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "api.ecr.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{
+ Hostname: "api.ecr.eu-central-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{
+ Hostname: "api.ecr.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{
+ Hostname: "api.ecr.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{
+ Hostname: "api.ecr.eu-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "api.ecr.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Hostname: "api.ecr.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{
+ Hostname: "api.ecr.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpointKey{
+ Region: "fips-dkr-us-east-1",
+ }: endpoint{
+ Hostname: "ecr-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-dkr-us-east-2",
+ }: endpoint{
+ Hostname: "ecr-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-dkr-us-west-1",
+ }: endpoint{
+ Hostname: "ecr-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-dkr-us-west-2",
+ }: endpoint{
+ Hostname: "ecr-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "ecr-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "ecr-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "ecr-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "ecr-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{
+ Hostname: "api.ecr.il-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "il-central-1",
+ },
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{
+ Hostname: "api.ecr.me-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-central-1",
+ },
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{
+ Hostname: "api.ecr.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Hostname: "api.ecr.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "api.ecr.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecr-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "api.ecr.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecr-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{
+ Hostname: "api.ecr.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecr-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "api.ecr.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecr-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "api.ecr-public": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "api.ecr-public.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "api.ecr-public.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "api.elastic-inference": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "api.elastic-inference.ap-northeast-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "api.elastic-inference.ap-northeast-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "api.elastic-inference.eu-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "api.elastic-inference.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "api.elastic-inference.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "api.elastic-inference.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "api.fleethub.iot": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.fleethub.iot-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "api.fleethub.iot-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "api.fleethub.iot-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "api.fleethub.iot-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "api.fleethub.iot-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.fleethub.iot-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.fleethub.iot-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.fleethub.iot-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "api.iotdeviceadvisor": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "api.iotdeviceadvisor.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "api.iotdeviceadvisor.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "api.iotdeviceadvisor.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "api.iotdeviceadvisor.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "api.iotwireless": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "api.iotwireless.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "api.iotwireless.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "api.iotwireless.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "api.iotwireless.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Hostname: "api.iotwireless.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "api.iotwireless.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "api.iotwireless.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "api.mediatailor": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "api.pricing": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "pricing",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "api.sagemaker": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api-fips.sagemaker.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api-fips.sagemaker.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "api-fips.sagemaker.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api-fips.sagemaker.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "api-fips.sagemaker.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api-fips.sagemaker.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "api-fips.sagemaker.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api-fips.sagemaker.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "api-fips.sagemaker.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "api.tunneling.iot": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "apigateway": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "apigateway-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "apigateway-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "apigateway-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "apigateway-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "apigateway-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "apigateway-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "apigateway-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "apigateway-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "apigateway-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "apigateway-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "app-integrations": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "appconfig": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "appconfigdata": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "appflow": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "application-autoscaling": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "applicationinsights": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "appmesh": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "af-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.af-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.ap-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.ap-northeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.ap-northeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.ap-northeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.ap-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.ap-southeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.ap-southeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.ap-southeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.ca-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "appmesh-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh-fips.ca-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "ca-central-1-fips",
+ }: endpoint{
+ Hostname: "appmesh-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.eu-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.eu-north-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.eu-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.eu-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.eu-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.eu-west-3.api.aws",
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.il-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.me-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.sa-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.us-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "appmesh-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh-fips.us-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "appmesh-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.us-east-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "appmesh-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh-fips.us-east-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "appmesh-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.us-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "appmesh-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh-fips.us-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "appmesh-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.us-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "appmesh-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh-fips.us-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "appmesh-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "apprunner": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "apprunner-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "apprunner-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "apprunner-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "apprunner-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "apprunner-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "apprunner-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "appstream2": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ CredentialScope: credentialScope{
+ Service: "appstream",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips",
+ }: endpoint{
+ Hostname: "appstream2-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "appstream2-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "appstream2-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "appstream2-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "appstream2-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "appsync": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "aps": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "arc-zonal-shift": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "athena": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "af-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.af-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.ap-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.ap-northeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.ap-northeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.ap-northeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.ap-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.ap-south-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.ap-southeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.ap-southeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.ap-southeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.ap-southeast-4.api.aws",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.ca-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.eu-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.eu-central-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.eu-north-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.eu-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.eu-south-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.eu-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.eu-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.eu-west-3.api.aws",
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "athena-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "athena-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "athena-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "athena-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.il-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.me-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.me-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.sa-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.us-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "athena-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "athena-fips.us-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.us-east-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "athena-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "athena-fips.us-east-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.us-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "athena-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "athena-fips.us-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.us-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "athena-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "athena-fips.us-west-2.api.aws",
+ },
+ },
+ },
+ "auditmanager": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "autoscaling": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "autoscaling-plans": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "backup": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "backup-gateway": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "backupstorage": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "batch": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.batch.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "fips.batch.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "fips.batch.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "fips.batch.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "fips.batch.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.batch.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.batch.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.batch.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.batch.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "billingconductor": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "billingconductor.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ },
+ },
+ "braket": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "budgets": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "budgets.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ },
+ },
+ "cases": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{},
+ },
+ },
+ "cassandra": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "cassandra-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "cassandra-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cassandra-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cassandra-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "catalog.marketplace": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "ce": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "ce.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ },
+ },
+ "chime": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "chime.us-east-1.amazonaws.com",
+ Protocols: []string{"https"},
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ },
+ },
+ "cleanrooms": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "cloud9": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "cloudcontrolapi": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudcontrolapi-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "cloudcontrolapi-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "cloudcontrolapi-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "cloudcontrolapi-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "cloudcontrolapi-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "cloudcontrolapi-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudcontrolapi-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudcontrolapi-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudcontrolapi-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudcontrolapi-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "clouddirectory": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "cloudformation": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudformation-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "cloudformation-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudformation-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "cloudformation-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudformation-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "cloudformation-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudformation-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "cloudformation-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "cloudfront": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "cloudfront.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ },
+ },
+ "cloudhsm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "cloudhsmv2": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "cloudhsm",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "cloudsearch": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "cloudtrail": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "cloudtrail-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "cloudtrail-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "cloudtrail-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "cloudtrail-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudtrail-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudtrail-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudtrail-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudtrail-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "cloudtrail-data": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "codeartifact": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "codebuild": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codebuild-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "codebuild-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codebuild-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "codebuild-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codebuild-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "codebuild-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codebuild-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "codebuild-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "codecatalyst": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "codecatalyst.global.api.aws",
+ },
+ },
+ },
+ "codecommit": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codecommit-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1-fips",
+ }: endpoint{
+ Hostname: "codecommit-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips",
+ }: endpoint{
+ Hostname: "codecommit-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codecommit-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "codecommit-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codecommit-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "codecommit-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codecommit-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "codecommit-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codecommit-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "codecommit-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "codedeploy": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codedeploy-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "codedeploy-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codedeploy-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "codedeploy-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codedeploy-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "codedeploy-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codedeploy-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "codedeploy-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "codeguru-reviewer": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "codepipeline": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codepipeline-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "codepipeline-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "codepipeline-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "codepipeline-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "codepipeline-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "codepipeline-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codepipeline-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codepipeline-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codepipeline-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codepipeline-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "codestar": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "codestar-connections": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "codestar-notifications": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "cognito-identity": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "cognito-identity-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "cognito-identity-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "cognito-identity-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "cognito-identity-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cognito-identity-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cognito-identity-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cognito-identity-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cognito-identity-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "cognito-idp": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "cognito-idp-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "cognito-idp-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "cognito-idp-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "cognito-idp-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cognito-idp-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cognito-idp-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cognito-idp-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cognito-idp-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "cognito-sync": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "comprehend": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "comprehend-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "comprehend-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "comprehend-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "comprehend-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "comprehend-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "comprehend-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "comprehendmedical": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "comprehendmedical-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "comprehendmedical-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "comprehendmedical-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "comprehendmedical-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "comprehendmedical-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "comprehendmedical-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "compute-optimizer": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "compute-optimizer.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{
+ Hostname: "compute-optimizer.ap-northeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "compute-optimizer.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Hostname: "compute-optimizer.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{
+ Hostname: "compute-optimizer.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "compute-optimizer.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "compute-optimizer.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "config": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "config-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "config-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "config-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "config-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "config-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "config-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "config-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "config-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "connect": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "connect-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "connect-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "connect-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "connect-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "connect-campaigns": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "connect-campaigns-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "connect-campaigns-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "connect-campaigns-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "connect-campaigns-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "contact-lens": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "controltower": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "controltower-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1-fips",
+ }: endpoint{
+ Hostname: "controltower-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "controltower-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "controltower-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "controltower-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "controltower-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "controltower-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "controltower-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "controltower-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "controltower-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "cur": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "data-ats.iot": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ CredentialScope: credentialScope{
+ Service: "iotdata",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.iot-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "data.iot-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Service: "iotdata",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "data.iot-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Service: "iotdata",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "data.iot-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Service: "iotdata",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "data.iot-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Service: "iotdata",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "data.iot-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Service: "iotdata",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.iot-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.iot-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.iot-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.iot-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "data.jobs.iot": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.jobs.iot-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "data.jobs.iot-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "data.jobs.iot-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "data.jobs.iot-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "data.jobs.iot-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "data.jobs.iot-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.jobs.iot-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.jobs.iot-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.jobs.iot-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.jobs.iot-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "data.mediastore": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "databrew": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "databrew-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "databrew-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "databrew-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "databrew-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "databrew-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "databrew-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "databrew-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "databrew-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "dataexchange": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "datapipeline": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "datasync": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "datasync-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "datasync-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "datasync-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "datasync-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "datasync-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "datasync-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "datasync-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "datasync-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "datasync-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "datasync-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "dax": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "devicefarm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "devops-guru": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "devops-guru-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "devops-guru-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "devops-guru-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "devops-guru-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "devops-guru-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "devops-guru-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "devops-guru-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "devops-guru-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "devops-guru-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "devops-guru-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "directconnect": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "directconnect-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "directconnect-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "directconnect-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "directconnect-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "directconnect-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "directconnect-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "directconnect-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "directconnect-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "discovery": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "dlm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "dms": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "dms",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dms",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dms-fips",
+ }: endpoint{
+ Hostname: "dms-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "dms-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "dms-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "dms-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "dms-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "docdb": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "rds.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "rds.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{
+ Hostname: "rds.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "rds.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "rds.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Hostname: "rds.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "rds.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "rds.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Hostname: "rds.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{
+ Hostname: "rds.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Hostname: "rds.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "rds.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "rds.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "rds.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "drs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "ds": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ds-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "ds-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "ds-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "ds-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "ds-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "ds-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ds-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ds-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ds-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ds-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "dynamodb": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dynamodb-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1-fips",
+ }: endpoint{
+ Hostname: "dynamodb-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "local",
+ }: endpoint{
+ Hostname: "localhost:8000",
+ Protocols: []string{"http"},
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dynamodb-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "dynamodb-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dynamodb-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "dynamodb-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dynamodb-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "dynamodb-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dynamodb-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "dynamodb-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "ebs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ebs-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "ebs-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "ebs-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "ebs-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "ebs-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "ebs-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ebs-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ebs-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ebs-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ebs-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "ec2": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "ec2.ap-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ec2-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "ec2.eu-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "ec2-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "ec2-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "ec2-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "ec2-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "ec2-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "ec2.sa-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "ec2.us-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ec2-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "ec2.us-east-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ec2-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ec2-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "ec2.us-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ec2-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "ecs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "ecs-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "ecs-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "ecs-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "ecs-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecs-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecs-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecs-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecs-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "edge.sagemaker": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "eks": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.eks.{region}.{dnsSuffix}",
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "fips.eks.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "fips.eks.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "fips.eks.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "fips.eks.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.eks.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.eks.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.eks.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.eks.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "elasticache": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips",
+ }: endpoint{
+ Hostname: "elasticache-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticache-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "elasticache-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticache-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "elasticache-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticache-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "elasticache-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticache-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "elasticache-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "elasticbeanstalk": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "elasticbeanstalk-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "elasticbeanstalk-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "elasticbeanstalk-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "elasticbeanstalk-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticbeanstalk-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticbeanstalk-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticbeanstalk-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticbeanstalk-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "elasticfilesystem": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "af-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.af-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-northeast-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-northeast-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-northeast-3.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-south-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-southeast-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-southeast-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-southeast-3.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-southeast-4.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-central-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-north-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-south-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-west-3.amazonaws.com",
+ },
+ endpointKey{
+ Region: "fips-af-south-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-east-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-northeast-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-northeast-2",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-northeast-3",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-northeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-south-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-south-2",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-2",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-3",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-southeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-4",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ap-southeast-4.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-4",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-central-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-central-2",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-central-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-north-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-south-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-south-2",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-2",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-3",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-il-central-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.il-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "il-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-me-central-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.me-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-me-south-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-sa-east-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.il-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.me-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.me-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.sa-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "elasticloadbalancing": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "elasticloadbalancing-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "elasticloadbalancing-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "elasticloadbalancing-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "elasticloadbalancing-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticloadbalancing-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticloadbalancing-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticloadbalancing-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticloadbalancing-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "elasticmapreduce": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ SSLCommonName: "{region}.{service}.{dnsSuffix}",
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticmapreduce-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ SSLCommonName: "{service}.{region}.{dnsSuffix}",
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "elasticmapreduce-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "elasticmapreduce-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "elasticmapreduce-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "elasticmapreduce-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "elasticmapreduce-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ SSLCommonName: "{service}.{region}.{dnsSuffix}",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticmapreduce-fips.us-east-1.amazonaws.com",
+ SSLCommonName: "{service}.{region}.{dnsSuffix}",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticmapreduce-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticmapreduce-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticmapreduce-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "elastictranscoder": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "email": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "email-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "email-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "email-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "email-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "emr-containers": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "emr-containers-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "emr-containers-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "emr-containers-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "emr-containers-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "emr-containers-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "emr-containers-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "emr-containers-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "emr-containers-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "emr-containers-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "emr-containers-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "emr-serverless": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "emr-serverless-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "emr-serverless-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "emr-serverless-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "emr-serverless-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "emr-serverless-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "emr-serverless-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "emr-serverless-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "emr-serverless-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "emr-serverless-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "emr-serverless-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "entitlement.marketplace": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "aws-marketplace",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "es": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "af-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.af-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.ap-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.ap-northeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.ap-northeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.ap-northeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.ap-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.ap-south-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.ap-southeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.ap-southeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.ap-southeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.ap-southeast-4.api.aws",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.ca-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.eu-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.eu-central-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.eu-north-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.eu-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.eu-south-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.eu-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.eu-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.eu-west-3.api.aws",
+ },
+ endpointKey{
+ Region: "fips",
+ }: endpoint{
+ Hostname: "es-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.il-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.me-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.me-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.sa-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.us-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "es-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "es-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.us-east-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "es-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "es-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.us-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "es-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "es-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.us-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "es-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "es-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "events": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "events-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "events-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "events-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "events-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "events-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "events-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "events-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "events-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "evidently": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "evidently.ap-northeast-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "evidently.ap-southeast-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "evidently.ap-southeast-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "evidently.eu-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{
+ Hostname: "evidently.eu-north-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "evidently.eu-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "evidently.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "evidently.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "evidently.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "finspace": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "finspace-api": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "firehose": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "firehose-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "firehose-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "firehose-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "firehose-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "firehose-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "firehose-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "firehose-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "firehose-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "fms": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "af-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.af-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.ap-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.ap-northeast-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.ap-northeast-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.ap-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.ap-southeast-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.ap-southeast-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.eu-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.eu-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.eu-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.eu-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.eu-west-3.amazonaws.com",
+ },
+ endpointKey{
+ Region: "fips-af-south-1",
+ }: endpoint{
+ Hostname: "fms-fips.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-east-1",
+ }: endpoint{
+ Hostname: "fms-fips.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-northeast-1",
+ }: endpoint{
+ Hostname: "fms-fips.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-northeast-2",
+ }: endpoint{
+ Hostname: "fms-fips.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-south-1",
+ }: endpoint{
+ Hostname: "fms-fips.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-1",
+ }: endpoint{
+ Hostname: "fms-fips.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-2",
+ }: endpoint{
+ Hostname: "fms-fips.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "fms-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-central-1",
+ }: endpoint{
+ Hostname: "fms-fips.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-south-1",
+ }: endpoint{
+ Hostname: "fms-fips.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-1",
+ }: endpoint{
+ Hostname: "fms-fips.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-2",
+ }: endpoint{
+ Hostname: "fms-fips.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-3",
+ }: endpoint{
+ Hostname: "fms-fips.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-me-south-1",
+ }: endpoint{
+ Hostname: "fms-fips.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-sa-east-1",
+ }: endpoint{
+ Hostname: "fms-fips.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "fms-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "fms-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "fms-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "fms-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.me-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.sa-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "forecast": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "forecast-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "forecast-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "forecast-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "forecast-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "forecast-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "forecast-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "forecastquery": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "forecastquery-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "forecastquery-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "forecastquery-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "forecastquery-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "forecastquery-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "forecastquery-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "frauddetector": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "fsx": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fsx-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "fsx-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-prod-ca-central-1",
+ }: endpoint{
+ Hostname: "fsx-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-prod-us-east-1",
+ }: endpoint{
+ Hostname: "fsx-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-prod-us-east-2",
+ }: endpoint{
+ Hostname: "fsx-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-prod-us-west-1",
+ }: endpoint{
+ Hostname: "fsx-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-prod-us-west-2",
+ }: endpoint{
+ Hostname: "fsx-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "fsx-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "fsx-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "fsx-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "fsx-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "prod-ca-central-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "prod-ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fsx-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "prod-us-east-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "prod-us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fsx-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "prod-us-east-2",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "prod-us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fsx-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "prod-us-west-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "prod-us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fsx-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "prod-us-west-2",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "prod-us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fsx-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fsx-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fsx-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fsx-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fsx-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "gamelift": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "gamesparks": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "geo": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "glacier": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "glacier-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "glacier-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "glacier-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "glacier-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "glacier-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "glacier-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "glacier-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "glacier-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "glacier-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "glacier-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "glue": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "glue-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "glue-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "glue-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "glue-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "glue-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "glue-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "glue-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "glue-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "grafana": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "grafana.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "grafana.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "grafana.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "grafana.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "grafana.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "grafana.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Hostname: "grafana.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "grafana.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "grafana.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "grafana.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "greengrass": service{
+ IsRegionalized: boxedTrue,
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "greengrass-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "greengrass-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "greengrass-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "greengrass-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "greengrass-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "greengrass-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "greengrass-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "greengrass-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "groundstation": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "groundstation-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "groundstation-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "groundstation-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "groundstation-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "groundstation-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "groundstation-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "guardduty": service{
+ IsRegionalized: boxedTrue,
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "guardduty-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "guardduty-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "guardduty-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "guardduty-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "guardduty-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "guardduty-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "guardduty-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "guardduty-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "health": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ SSLCommonName: "health.us-east-1.amazonaws.com",
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "global.health.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "health-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "health-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "healthlake": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "honeycode": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "iam": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "iam.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "aws-global",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iam-fips.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "aws-global-fips",
+ }: endpoint{
+ Hostname: "iam-fips.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "iam",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "iam",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iam-fips.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "iam-fips",
+ }: endpoint{
+ Hostname: "iam-fips.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "identity-chime": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "identity-chime-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "identity-chime-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "identitystore": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "importexport": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "importexport.amazonaws.com",
+ SignatureVersions: []string{"v2", "v4"},
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ Service: "IngestionService",
+ },
+ },
+ },
+ },
+ "ingest.timestream": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ingest-fips-us-east-1",
+ }: endpoint{
+ Hostname: "ingest.timestream-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ingest-fips-us-east-2",
+ }: endpoint{
+ Hostname: "ingest.timestream-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ingest-fips-us-west-2",
+ }: endpoint{
+ Hostname: "ingest.timestream-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ingest-us-east-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ingest-us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ingest.timestream-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ingest-us-east-2",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ingest-us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ingest.timestream-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ingest-us-west-2",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ingest-us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ingest.timestream-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "inspector": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "inspector-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "inspector-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "inspector-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "inspector-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "inspector-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "inspector-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "inspector-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "inspector-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "inspector2": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "inspector2-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "inspector2-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "inspector2-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "inspector2-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "inspector2-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "inspector2-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "inspector2-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "inspector2-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "internetmonitor": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ DNSSuffix: "api.aws",
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "api.aws",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{
+ Hostname: "internetmonitor.af-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{
+ Hostname: "internetmonitor.ap-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "internetmonitor.ap-northeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "internetmonitor.ap-northeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{
+ Hostname: "internetmonitor.ap-northeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{
+ Hostname: "internetmonitor.ap-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{
+ Hostname: "internetmonitor.ap-south-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "internetmonitor.ap-southeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "internetmonitor.ap-southeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{
+ Hostname: "internetmonitor.ap-southeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{
+ Hostname: "internetmonitor.ap-southeast-4.api.aws",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Hostname: "internetmonitor.ca-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "internetmonitor-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "internetmonitor.eu-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{
+ Hostname: "internetmonitor.eu-central-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{
+ Hostname: "internetmonitor.eu-north-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{
+ Hostname: "internetmonitor.eu-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{
+ Hostname: "internetmonitor.eu-south-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "internetmonitor.eu-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Hostname: "internetmonitor.eu-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{
+ Hostname: "internetmonitor.eu-west-3.api.aws",
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{
+ Hostname: "internetmonitor.il-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{
+ Hostname: "internetmonitor.me-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{
+ Hostname: "internetmonitor.me-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Hostname: "internetmonitor.sa-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "internetmonitor.us-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "internetmonitor-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "internetmonitor.us-east-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "internetmonitor-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{
+ Hostname: "internetmonitor.us-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "internetmonitor-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "internetmonitor.us-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "internetmonitor-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "iot": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iot-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "iot-fips.ca-central-1.amazonaws.com",
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "iot-fips.us-east-1.amazonaws.com",
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "iot-fips.us-east-2.amazonaws.com",
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "iot-fips.us-west-1.amazonaws.com",
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "iot-fips.us-west-2.amazonaws.com",
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iot-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iot-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iot-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iot-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "iotanalytics": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "iotevents": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iotevents-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "iotevents-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "iotevents-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "iotevents-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "iotevents-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iotevents-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iotevents-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iotevents-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "ioteventsdata": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "data.iotevents.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "data.iotevents.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{
+ Hostname: "data.iotevents.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "data.iotevents.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "data.iotevents.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Hostname: "data.iotevents.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.iotevents-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "data.iotevents.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "data.iotevents.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Hostname: "data.iotevents.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "data.iotevents-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "data.iotevents-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "data.iotevents-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "data.iotevents-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "data.iotevents.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.iotevents-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "data.iotevents.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.iotevents-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "data.iotevents.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.iotevents-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "iotfleetwise": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "iotroborunner": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "iotsecuredtunneling": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "iotsitewise": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iotsitewise-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "iotsitewise-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "iotsitewise-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "iotsitewise-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "iotsitewise-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iotsitewise-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iotsitewise-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iotsitewise-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "iotthingsgraph": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "iotthingsgraph",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "iottwinmaker": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "api-ap-southeast-1",
+ }: endpoint{
+ Hostname: "api.iottwinmaker.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "api-ap-southeast-2",
+ }: endpoint{
+ Hostname: "api.iottwinmaker.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "api-eu-central-1",
+ }: endpoint{
+ Hostname: "api.iottwinmaker.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "api-eu-west-1",
+ }: endpoint{
+ Hostname: "api.iottwinmaker.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "api-us-east-1",
+ }: endpoint{
+ Hostname: "api.iottwinmaker.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "api-us-west-2",
+ }: endpoint{
+ Hostname: "api.iottwinmaker.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "data-ap-southeast-1",
+ }: endpoint{
+ Hostname: "data.iottwinmaker.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "data-ap-southeast-2",
+ }: endpoint{
+ Hostname: "data.iottwinmaker.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "data-eu-central-1",
+ }: endpoint{
+ Hostname: "data.iottwinmaker.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "data-eu-west-1",
+ }: endpoint{
+ Hostname: "data.iottwinmaker.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "data-us-east-1",
+ }: endpoint{
+ Hostname: "data.iottwinmaker.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "data-us-west-2",
+ }: endpoint{
+ Hostname: "data.iottwinmaker.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-api-us-east-1",
+ }: endpoint{
+ Hostname: "api.iottwinmaker-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-api-us-west-2",
+ }: endpoint{
+ Hostname: "api.iottwinmaker-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "fips-data-us-east-1",
+ }: endpoint{
+ Hostname: "data.iottwinmaker-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-data-us-west-2",
+ }: endpoint{
+ Hostname: "data.iottwinmaker-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "iottwinmaker-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "iottwinmaker-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iottwinmaker-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iottwinmaker-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "iotwireless": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "api.iotwireless.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "api.iotwireless.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "api.iotwireless.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "api.iotwireless.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "api.iotwireless.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "ivs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "ivschat": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "ivsrealtime": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "kafka": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kafka-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "kafka-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "kafka-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "kafka-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "kafka-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "kafka-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kafka-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kafka-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kafka-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kafka-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "kafkaconnect": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "kendra": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "kendra-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "kendra-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "kendra-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kendra-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kendra-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kendra-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "kendra-ranking": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ DNSSuffix: "api.aws",
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "api.aws",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.af-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.ap-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.ap-northeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "kendra-ranking.ap-northeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{
+ Hostname: "kendra-ranking.ap-northeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.ap-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{
+ Hostname: "kendra-ranking.ap-south-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.ap-southeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "kendra-ranking.ap-southeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{
+ Hostname: "kendra-ranking.ap-southeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{
+ Hostname: "kendra-ranking.ap-southeast-4.api.aws",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.ca-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kendra-ranking-fips.ca-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{
+ Hostname: "kendra-ranking.eu-central-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.eu-north-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.eu-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{
+ Hostname: "kendra-ranking.eu-south-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.eu-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{
+ Hostname: "kendra-ranking.eu-west-3.api.aws",
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.il-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.me-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.me-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.sa-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.us-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kendra-ranking-fips.us-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "kendra-ranking.us-east-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kendra-ranking-fips.us-east-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.us-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "kendra-ranking.us-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kendra-ranking-fips.us-west-2.api.aws",
+ },
+ },
+ },
+ "kinesis": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "kinesis-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "kinesis-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "kinesis-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "kinesis-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kinesis-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kinesis-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kinesis-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kinesis-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "kinesisanalytics": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "kinesisvideo": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "kms": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ProdFips",
+ }: endpoint{
+ Hostname: "kms-fips.eu-central-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "af-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.af-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "af-south-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.ap-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-east-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.ap-northeast-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-northeast-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.ap-northeast-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-northeast-2-fips",
+ }: endpoint{
+ Hostname: "kms-fips.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.ap-northeast-3.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-northeast-3-fips",
+ }: endpoint{
+ Hostname: "kms-fips.ap-northeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.ap-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-south-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.ap-south-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-south-2-fips",
+ }: endpoint{
+ Hostname: "kms-fips.ap-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.ap-southeast-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.ap-southeast-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-2-fips",
+ }: endpoint{
+ Hostname: "kms-fips.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.ap-southeast-3.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-3-fips",
+ }: endpoint{
+ Hostname: "kms-fips.ap-southeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.ap-southeast-4.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-4-fips",
+ }: endpoint{
+ Hostname: "kms-fips.ap-southeast-4.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-4",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.eu-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.eu-central-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-2-fips",
+ }: endpoint{
+ Hostname: "kms-fips.eu-central-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.eu-north-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-north-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.eu-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-south-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.eu-south-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-south-2-fips",
+ }: endpoint{
+ Hostname: "kms-fips.eu-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.eu-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-west-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.eu-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-west-2-fips",
+ }: endpoint{
+ Hostname: "kms-fips.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.eu-west-3.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-west-3-fips",
+ }: endpoint{
+ Hostname: "kms-fips.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.il-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "il-central-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.il-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "il-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.me-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "me-central-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.me-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.me-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "me-south-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.sa-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "sa-east-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "kms-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "kms-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "lakeformation": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "lakeformation-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "lakeformation-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "lakeformation-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "lakeformation-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "lakeformation-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "lakeformation-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "lakeformation-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "lakeformation-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "lambda": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "af-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.af-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.ap-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.ap-northeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.ap-northeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.ap-northeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.ap-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.ap-south-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.ap-southeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.ap-southeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.ap-southeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.ap-southeast-4.api.aws",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.ca-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.eu-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.eu-central-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.eu-north-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.eu-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.eu-south-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.eu-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.eu-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.eu-west-3.api.aws",
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "lambda-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "lambda-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "lambda-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "lambda-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.il-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.me-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.me-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.sa-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.us-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "lambda-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.us-east-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "lambda-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.us-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "lambda-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.us-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "lambda-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "license-manager": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "license-manager-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "license-manager-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "license-manager-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "license-manager-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "license-manager-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "license-manager-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "license-manager-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "license-manager-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "license-manager-linux-subscriptions": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "license-manager-linux-subscriptions-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "license-manager-linux-subscriptions-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "license-manager-linux-subscriptions-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "license-manager-linux-subscriptions-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "license-manager-linux-subscriptions-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "license-manager-linux-subscriptions-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "license-manager-linux-subscriptions-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "license-manager-linux-subscriptions-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "license-manager-user-subscriptions": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "license-manager-user-subscriptions-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "license-manager-user-subscriptions-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "license-manager-user-subscriptions-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "license-manager-user-subscriptions-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "license-manager-user-subscriptions-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "license-manager-user-subscriptions-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "license-manager-user-subscriptions-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "license-manager-user-subscriptions-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "lightsail": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "logs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "logs-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "logs-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "logs-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "logs-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "logs-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "logs-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "logs-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "logs-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "lookoutequipment": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "lookoutmetrics": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "lookoutvision": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "m2": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{},
+ },
+ },
+ "machinelearning": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "macie": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "macie-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "macie-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "macie-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "macie-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "macie2": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "macie2-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "macie2-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "macie2-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "macie2-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "macie2-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "macie2-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "macie2-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "macie2-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "managedblockchain": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "marketplacecommerceanalytics": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "media-pipelines-chime": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "media-pipelines-chime-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "media-pipelines-chime-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "media-pipelines-chime-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "media-pipelines-chime-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "mediaconnect": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "mediaconvert": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mediaconvert-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "mediaconvert-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "mediaconvert-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "mediaconvert-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "mediaconvert-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "mediaconvert-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mediaconvert-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mediaconvert-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mediaconvert-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mediaconvert-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "medialive": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "medialive-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "medialive-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "medialive-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "medialive-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "medialive-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "medialive-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "mediapackage": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "mediapackage-vod": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "mediapackagev2": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "mediastore": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "meetings-chime": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "meetings-chime-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "meetings-chime-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "meetings-chime-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "meetings-chime-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "memory-db": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips",
+ }: endpoint{
+ Hostname: "memory-db-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "messaging-chime": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "messaging-chime-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "messaging-chime-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "metering.marketplace": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "aws-marketplace",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "metrics.sagemaker": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "mgh": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "mgn": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "mgn-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "mgn-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "mgn-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "mgn-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mgn-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mgn-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mgn-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mgn-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "migrationhub-orchestrator": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "migrationhub-strategy": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "mobileanalytics": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "models-v2-lex": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "models.lex": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "lex",
+ },
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "models-fips.lex.{region}.{dnsSuffix}",
+ CredentialScope: credentialScope{
+ Service: "lex",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "models-fips.lex.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "models-fips.lex.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "models-fips.lex.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "models-fips.lex.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "monitoring": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "monitoring-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "monitoring-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "monitoring-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "monitoring-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "monitoring-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "monitoring-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "monitoring-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "monitoring-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "mq": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "mq-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "mq-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "mq-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "mq-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mq-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mq-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mq-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mq-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "mturk-requester": service{
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "sandbox",
+ }: endpoint{
+ Hostname: "mturk-requester-sandbox.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "neptune": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{
+ Hostname: "rds.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "rds.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "rds.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{
+ Hostname: "rds.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "rds.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "rds.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Hostname: "rds.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "rds.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{
+ Hostname: "rds.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "rds.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Hostname: "rds.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{
+ Hostname: "rds.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{
+ Hostname: "rds.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Hostname: "rds.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "rds.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "rds.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{
+ Hostname: "rds.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "rds.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "network-firewall": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "network-firewall-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "network-firewall-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "network-firewall-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "network-firewall-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "network-firewall-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "network-firewall-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "network-firewall-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "network-firewall-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "network-firewall-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "network-firewall-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "networkmanager": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "networkmanager.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "aws-global",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "networkmanager-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "fips-aws-global",
+ }: endpoint{
+ Hostname: "networkmanager-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "nimble": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "oam": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "oidc": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{
+ Hostname: "oidc.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{
+ Hostname: "oidc.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "oidc.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "oidc.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{
+ Hostname: "oidc.ap-northeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{
+ Hostname: "oidc.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "oidc.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "oidc.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{
+ Hostname: "oidc.ap-southeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Hostname: "oidc.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "oidc.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{
+ Hostname: "oidc.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{
+ Hostname: "oidc.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "oidc.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Hostname: "oidc.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{
+ Hostname: "oidc.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{
+ Hostname: "oidc.il-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "il-central-1",
+ },
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{
+ Hostname: "oidc.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Hostname: "oidc.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "oidc.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "oidc.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{
+ Hostname: "oidc.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "oidc.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "omics": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "omics.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "omics.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "omics.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Hostname: "omics.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "omics-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "omics-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "omics.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "omics-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "omics.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "omics-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "opsworks": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "opsworks-cm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "organizations": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "organizations.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "aws-global",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "organizations-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-aws-global",
+ }: endpoint{
+ Hostname: "organizations-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "osis": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "outposts": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "outposts-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "outposts-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "outposts-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "outposts-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "outposts-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "outposts-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "outposts-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "outposts-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "outposts-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "outposts-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "participant.connect": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "participant.connect-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "participant.connect-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "participant.connect-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "participant.connect-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "personalize": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "pi": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "pinpoint": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "mobiletargeting",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Hostname: "pinpoint.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "pinpoint-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "pinpoint-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "pinpoint-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "pinpoint-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "pinpoint-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "pinpoint.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "pinpoint-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "pinpoint.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "pinpoint-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "pinpoint.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "pinpoint-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "pipes": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "polly": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "polly-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "polly-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "polly-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "polly-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "polly-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "polly-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "polly-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "polly-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "portal.sso": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{
+ Hostname: "portal.sso.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{
+ Hostname: "portal.sso.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "portal.sso.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "portal.sso.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{
+ Hostname: "portal.sso.ap-northeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{
+ Hostname: "portal.sso.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "portal.sso.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "portal.sso.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{
+ Hostname: "portal.sso.ap-southeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Hostname: "portal.sso.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "portal.sso.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{
+ Hostname: "portal.sso.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{
+ Hostname: "portal.sso.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "portal.sso.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Hostname: "portal.sso.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{
+ Hostname: "portal.sso.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{
+ Hostname: "portal.sso.il-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "il-central-1",
+ },
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{
+ Hostname: "portal.sso.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Hostname: "portal.sso.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "portal.sso.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "portal.sso.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{
+ Hostname: "portal.sso.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "portal.sso.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "profile": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "profile-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "profile-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "profile-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "profile-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "profile-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "profile-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "projects.iot1click": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "proton": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "qldb": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "qldb-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "qldb-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "qldb-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "qldb-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "qldb-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "qldb-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "qldb-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "qldb-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "quicksight": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "ram": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ram-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "ram-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "ram-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "ram-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "ram-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "ram-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ram-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ram-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ram-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ram-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "rbin": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rbin-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "rbin-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "rbin-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "rbin-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "rbin-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "rbin-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rbin-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rbin-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rbin-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rbin-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "rds": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1-fips",
+ }: endpoint{
+ Hostname: "rds-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "rds-fips.ca-central-1",
+ }: endpoint{
+ Hostname: "rds-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds-fips.us-east-1",
+ }: endpoint{
+ Hostname: "rds-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds-fips.us-east-2",
+ }: endpoint{
+ Hostname: "rds-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds-fips.us-west-1",
+ }: endpoint{
+ Hostname: "rds-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds-fips.us-west-2",
+ }: endpoint{
+ Hostname: "rds-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds.ca-central-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds.ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds.us-east-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds.us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds.us-east-2",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds.us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds.us-west-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds.us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds.us-west-2",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds.us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ SSLCommonName: "{service}.{dnsSuffix}",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds-fips.us-east-1.amazonaws.com",
+ SSLCommonName: "{service}.{dnsSuffix}",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "rds-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "rds-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "rds-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "rds-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "rds-data": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "rds-data-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "rds-data-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "rds-data-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "rds-data-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds-data-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds-data-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds-data-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds-data-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "redshift": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "redshift-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "redshift-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "redshift-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "redshift-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "redshift-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "redshift-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "redshift-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "redshift-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "redshift-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "redshift-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "redshift-serverless": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "rekognition": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1-fips",
+ }: endpoint{
+ Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "rekognition-fips.ca-central-1",
+ }: endpoint{
+ Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition-fips.us-east-1",
+ }: endpoint{
+ Hostname: "rekognition-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition-fips.us-east-2",
+ }: endpoint{
+ Hostname: "rekognition-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition-fips.us-west-1",
+ }: endpoint{
+ Hostname: "rekognition-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition-fips.us-west-2",
+ }: endpoint{
+ Hostname: "rekognition-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition.ca-central-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition.ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition.us-east-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition.us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rekognition-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition.us-east-2",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition.us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rekognition-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition.us-west-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition.us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rekognition-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition.us-west-2",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition.us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rekognition-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rekognition-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "rekognition-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rekognition-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "rekognition-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rekognition-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "rekognition-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rekognition-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "rekognition-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "resiliencehub": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "resource-explorer-2": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ DNSSuffix: "api.aws",
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "api.aws",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.ap-northeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "resource-explorer-2.ap-northeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{
+ Hostname: "resource-explorer-2.ap-northeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.ap-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{
+ Hostname: "resource-explorer-2.ap-south-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.ap-southeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "resource-explorer-2.ap-southeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{
+ Hostname: "resource-explorer-2.ap-southeast-4.api.aws",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.ca-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.eu-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{
+ Hostname: "resource-explorer-2.eu-central-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.eu-north-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.eu-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Hostname: "resource-explorer-2.eu-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{
+ Hostname: "resource-explorer-2.eu-west-3.api.aws",
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.il-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.sa-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.us-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "resource-explorer-2.us-east-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.us-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "resource-explorer-2.us-west-2.api.aws",
+ },
+ },
+ },
+ "resource-groups": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "resource-groups-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "resource-groups-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "resource-groups-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "resource-groups-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "resource-groups-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "resource-groups-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "resource-groups-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "resource-groups-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "robomaker": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "rolesanywhere": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "route53": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "route53.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "aws-global",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "route53-fips.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-aws-global",
+ }: endpoint{
+ Hostname: "route53-fips.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "route53-recovery-control-config": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "route53-recovery-control-config.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "route53domains": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ },
+ },
+ "route53resolver": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "rum": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "runtime-v2-lex": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "runtime.lex": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "lex",
+ },
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "runtime-fips.lex.{region}.{dnsSuffix}",
+ CredentialScope: credentialScope{
+ Service: "lex",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "runtime-fips.lex.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "runtime-fips.lex.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "runtime-fips.lex.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "runtime-fips.lex.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "runtime.sagemaker": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "runtime-fips.sagemaker.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "runtime-fips.sagemaker.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "runtime-fips.sagemaker.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "runtime-fips.sagemaker.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "runtime-fips.sagemaker.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "runtime-fips.sagemaker.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "runtime-fips.sagemaker.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "runtime-fips.sagemaker.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "runtime-fips.sagemaker.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "s3": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedTrue,
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ defaultKey{
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
+ DNSSuffix: "amazonaws.com",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ defaultKey{
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
+ DNSSuffix: "amazonaws.com",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "af-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.af-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.ap-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "s3.ap-northeast-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.ap-northeast-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.ap-northeast-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.ap-northeast-3.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.ap-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.ap-south-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "s3.ap-southeast-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.ap-southeast-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "s3.ap-southeast-2.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.ap-southeast-2.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.ap-southeast-3.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.ap-southeast-4.amazonaws.com",
+ },
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "s3.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "s3-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-fips.dualstack.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.eu-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.eu-central-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.eu-north-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.eu-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.eu-south-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "s3.eu-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.eu-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.eu-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.eu-west-3.amazonaws.com",
+ },
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "s3-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "s3-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "s3-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "s3-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "s3-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.il-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.me-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.me-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "s3-external-1",
+ }: endpoint{
+ Hostname: "s3-external-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Hostname: "s3.sa-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.sa-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "s3.us-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.us-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "s3-fips.us-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-fips.dualstack.us-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "s3-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-fips.dualstack.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{
+ Hostname: "s3.us-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.us-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "s3-fips.us-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-fips.dualstack.us-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "s3.us-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.us-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "s3-fips.us-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-fips.dualstack.us-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ },
+ },
+ "s3-control": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ defaultKey{
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
+ DNSSuffix: "amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ defaultKey{
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
+ DNSSuffix: "amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "s3-control.ap-northeast-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.ap-northeast-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "s3-control.ap-northeast-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.ap-northeast-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{
+ Hostname: "s3-control.ap-northeast-3.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.ap-northeast-3.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{
+ Hostname: "s3-control.ap-south-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.ap-south-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "s3-control.ap-southeast-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.ap-southeast-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "s3-control.ap-southeast-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.ap-southeast-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Hostname: "s3-control.ca-central-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.ca-central-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "s3-control-fips.ca-central-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control-fips.dualstack.ca-central-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1-fips",
+ }: endpoint{
+ Hostname: "s3-control-fips.ca-central-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "s3-control.eu-central-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.eu-central-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{
+ Hostname: "s3-control.eu-north-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.eu-north-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "s3-control.eu-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.eu-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Hostname: "s3-control.eu-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.eu-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{
+ Hostname: "s3-control.eu-west-3.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.eu-west-3.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Hostname: "s3-control.sa-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.sa-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "s3-control.us-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.us-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "s3-control-fips.us-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control-fips.dualstack.us-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "s3-control-fips.us-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "s3-control.us-east-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.us-east-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "s3-control-fips.us-east-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control-fips.dualstack.us-east-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "s3-control-fips.us-east-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{
+ Hostname: "s3-control.us-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.us-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "s3-control-fips.us-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control-fips.dualstack.us-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "s3-control-fips.us-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "s3-control.us-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.us-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "s3-control-fips.us-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control-fips.dualstack.us-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "s3-control-fips.us-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "s3-outposts": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{},
+ },
+ },
+ "sagemaker-geospatial": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "savingsplans": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "savingsplans.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ },
+ },
+ "scheduler": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "schemas": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "sdb": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"v2"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "sdb.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "secretsmanager": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "secretsmanager-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1-fips",
+ }: endpoint{
+ Hostname: "secretsmanager-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "secretsmanager-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "secretsmanager-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "secretsmanager-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "secretsmanager-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "secretsmanager-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "secretsmanager-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "secretsmanager-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "secretsmanager-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "securityhub": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "securityhub-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "securityhub-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "securityhub-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "securityhub-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "securityhub-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "securityhub-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "securityhub-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "securityhub-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "securitylake": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "serverlessrepo": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ },
+ "servicecatalog": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicecatalog-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "servicecatalog-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicecatalog-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "servicecatalog-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicecatalog-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "servicecatalog-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicecatalog-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "servicecatalog-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "servicecatalog-appregistry": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicecatalog-appregistry-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "servicecatalog-appregistry-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "servicecatalog-appregistry-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "servicecatalog-appregistry-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "servicecatalog-appregistry-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "servicecatalog-appregistry-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicecatalog-appregistry-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicecatalog-appregistry-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicecatalog-appregistry-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicecatalog-appregistry-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "servicediscovery": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "af-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.af-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.ap-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.ap-northeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.ap-northeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.ap-northeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.ap-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.ap-south-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.ap-southeast-1.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.ap-southeast-2.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.ap-southeast-3.api.aws",
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.ap-southeast-4.api.aws",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.ca-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.ca-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "ca-central-1-fips",
+ }: endpoint{
+ Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.eu-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.eu-central-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.eu-north-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.eu-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.eu-south-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.eu-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.eu-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.eu-west-3.api.aws",
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.il-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.me-central-1.api.aws",
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.me-south-1.api.aws",
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.sa-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.us-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.us-east-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-east-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.us-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.us-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-west-2.api.aws",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "servicequotas": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "session.qldb": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "session.qldb-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "session.qldb-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "session.qldb-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "session.qldb-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "session.qldb-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "session.qldb-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "shield": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ SSLCommonName: "shield.us-east-1.amazonaws.com",
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "shield.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "aws-global",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "shield-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-aws-global",
+ }: endpoint{
+ Hostname: "shield-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "signer": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "signer-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "signer-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "signer-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "signer-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "signer-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "signer-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "signer-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "signer-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "simspaceweaver": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "sms": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "sms-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sms-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "sms-voice": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sms-voice-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "sms-voice-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "sms-voice-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "sms-voice-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sms-voice-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sms-voice-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "snowball": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.ap-northeast-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.ap-northeast-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.ap-northeast-3.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.ap-south-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.ap-southeast-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.ap-southeast-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.eu-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.eu-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.eu-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.eu-west-3.amazonaws.com",
+ },
+ endpointKey{
+ Region: "fips-ap-northeast-1",
+ }: endpoint{
+ Hostname: "snowball-fips.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-northeast-2",
+ }: endpoint{
+ Hostname: "snowball-fips.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-northeast-3",
+ }: endpoint{
+ Hostname: "snowball-fips.ap-northeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-south-1",
+ }: endpoint{
+ Hostname: "snowball-fips.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-1",
+ }: endpoint{
+ Hostname: "snowball-fips.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-2",
+ }: endpoint{
+ Hostname: "snowball-fips.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "snowball-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-central-1",
+ }: endpoint{
+ Hostname: "snowball-fips.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-1",
+ }: endpoint{
+ Hostname: "snowball-fips.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-2",
+ }: endpoint{
+ Hostname: "snowball-fips.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-3",
+ }: endpoint{
+ Hostname: "snowball-fips.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-sa-east-1",
+ }: endpoint{
+ Hostname: "snowball-fips.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "snowball-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "snowball-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "snowball-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "snowball-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.sa-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "sns": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "sns-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "sns-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "sns-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "sns-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sns-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sns-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sns-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sns-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "sqs": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ SSLCommonName: "{region}.queue.{dnsSuffix}",
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "sqs-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "sqs-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "sqs-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "sqs-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ SSLCommonName: "queue.{dnsSuffix}",
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sqs-fips.us-east-1.amazonaws.com",
+ SSLCommonName: "queue.{dnsSuffix}",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sqs-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sqs-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sqs-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "ssm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "ssm-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "ssm-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "ssm-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "ssm-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "ssm-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "ssm-contacts": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "ssm-contacts-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "ssm-contacts-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "ssm-contacts-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "ssm-contacts-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-contacts-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-contacts-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-contacts-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-contacts-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "ssm-incidents": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-incidents-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "ssm-incidents-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "ssm-incidents-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "ssm-incidents-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "ssm-incidents-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "ssm-incidents-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-incidents-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-incidents-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-incidents-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-incidents-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "ssm-sap": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-sap-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "ssm-sap-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "ssm-sap-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "ssm-sap-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "ssm-sap-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "ssm-sap-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-sap-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-sap-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-sap-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm-sap-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "sso": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "states": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "states-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "states-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "states-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "states-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "states-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "states-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "states-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "states-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "storagegateway": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "storagegateway-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1-fips",
+ }: endpoint{
+ Hostname: "storagegateway-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "storagegateway-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "storagegateway-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "storagegateway-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "storagegateway-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "storagegateway-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "storagegateway-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "storagegateway-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "storagegateway-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "streams.dynamodb": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ CredentialScope: credentialScope{
+ Service: "dynamodb",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "local",
+ }: endpoint{
+ Hostname: "localhost:8000",
+ Protocols: []string{"http"},
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "sts": service{
+ PartitionEndpoint: "aws-global",
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "sts.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sts-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "sts-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sts-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "sts-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sts-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1-fips",
+ }: endpoint{
+ Hostname: "sts-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sts-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "sts-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "support": service{
+ PartitionEndpoint: "aws-global",
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "support.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ },
+ },
+ "supportapp": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "swf": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "swf-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "swf-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "swf-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "swf-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "swf-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "swf-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "swf-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "swf-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "synthetics": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "synthetics-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "synthetics-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "synthetics-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "synthetics-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "synthetics-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "synthetics-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "synthetics-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "synthetics-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "tagging": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "textract": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "textract-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "textract-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "textract-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "textract-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "textract-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "textract-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "textract-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "textract-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "textract-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "textract-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "tnb": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "transcribe": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.transcribe.{region}.{dnsSuffix}",
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.transcribe.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "fips.transcribe.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "fips.transcribe.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "fips.transcribe.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "fips.transcribe.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "fips.transcribe.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.transcribe.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.transcribe.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.transcribe.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.transcribe.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "transcribestreaming": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "transcribestreaming-ca-central-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "transcribestreaming-ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "transcribestreaming-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "transcribestreaming-fips-ca-central-1",
+ }: endpoint{
+ Hostname: "transcribestreaming-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "transcribestreaming-fips-us-east-1",
+ }: endpoint{
+ Hostname: "transcribestreaming-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "transcribestreaming-fips-us-east-2",
+ }: endpoint{
+ Hostname: "transcribestreaming-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "transcribestreaming-fips-us-west-2",
+ }: endpoint{
+ Hostname: "transcribestreaming-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "transcribestreaming-us-east-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "transcribestreaming-us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "transcribestreaming-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "transcribestreaming-us-east-2",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "transcribestreaming-us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "transcribestreaming-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "transcribestreaming-us-west-2",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "transcribestreaming-us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "transcribestreaming-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "transfer": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "transfer-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "transfer-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "transfer-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "transfer-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "transfer-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "transfer-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "transfer-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "transfer-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "transfer-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "transfer-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "translate": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "translate-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "translate-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "translate-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2-fips",
+ }: endpoint{
+ Hostname: "translate-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "translate-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "translate-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "verifiedpermissions": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "voice-chime": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "voice-chime-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "ca-central-1-fips",
+ }: endpoint{
+ Hostname: "voice-chime-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "voice-chime-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-1-fips",
+ }: endpoint{
+ Hostname: "voice-chime-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "voice-chime-fips.us-west-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2-fips",
+ }: endpoint{
+ Hostname: "voice-chime-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "voiceid": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "voiceid-fips.ca-central-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "voiceid-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "voiceid-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "voiceid-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "voiceid-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "voiceid-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "vpc-lattice": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "waf": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "aws",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-fips.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "aws-fips",
+ }: endpoint{
+ Hostname: "waf-fips.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "aws-global",
+ }: endpoint{
+ Hostname: "waf.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "aws-global",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-fips.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "aws-global-fips",
+ }: endpoint{
+ Hostname: "waf-fips.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "waf-regional": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{
+ Hostname: "waf-regional.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ },
+ endpointKey{
+ Region: "af-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{
+ Hostname: "waf-regional.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "waf-regional.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "waf-regional.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{
+ Hostname: "waf-regional.ap-northeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-northeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{
+ Hostname: "waf-regional.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{
+ Hostname: "waf-regional.ap-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "waf-regional.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "waf-regional.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{
+ Hostname: "waf-regional.ap-southeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-southeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{
+ Hostname: "waf-regional.ap-southeast-4.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-4",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-southeast-4.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-4",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Hostname: "waf-regional.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "waf-regional.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{
+ Hostname: "waf-regional.eu-central-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-central-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{
+ Hostname: "waf-regional.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{
+ Hostname: "waf-regional.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{
+ Hostname: "waf-regional.eu-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "waf-regional.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Hostname: "waf-regional.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{
+ Hostname: "waf-regional.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpointKey{
+ Region: "fips-af-south-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-east-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-northeast-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-northeast-2",
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-northeast-3",
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-northeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-south-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-south-2",
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-2",
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-3",
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-southeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-4",
+ }: endpoint{
+ Hostname: "waf-regional-fips.ap-southeast-4.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-4",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-central-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-central-2",
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-central-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-north-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-south-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-south-2",
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-2",
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-3",
+ }: endpoint{
+ Hostname: "waf-regional-fips.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-il-central-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.il-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "il-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-me-central-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.me-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-me-south-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-sa-east-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "waf-regional-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "waf-regional-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{
+ Hostname: "waf-regional.il-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "il-central-1",
+ },
+ },
+ endpointKey{
+ Region: "il-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.il-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "il-central-1",
+ },
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{
+ Hostname: "waf-regional.me-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-central-1",
+ },
+ },
+ endpointKey{
+ Region: "me-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.me-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-central-1",
+ },
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{
+ Hostname: "waf-regional.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ },
+ endpointKey{
+ Region: "me-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Hostname: "waf-regional.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "waf-regional.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "waf-regional.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{
+ Hostname: "waf-regional.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "waf-regional.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "wafv2": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{
+ Hostname: "wafv2.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ },
+ endpointKey{
+ Region: "af-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{
+ Hostname: "wafv2.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{
+ Hostname: "wafv2.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{
+ Hostname: "wafv2.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{
+ Hostname: "wafv2.ap-northeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-northeast-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-northeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{
+ Hostname: "wafv2.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{
+ Hostname: "wafv2.ap-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-south-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{
+ Hostname: "wafv2.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{
+ Hostname: "wafv2.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{
+ Hostname: "wafv2.ap-southeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-southeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-3",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{
+ Hostname: "wafv2.ap-southeast-4.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-4",
+ },
+ },
+ endpointKey{
+ Region: "ap-southeast-4",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-southeast-4.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-4",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{
+ Hostname: "wafv2.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "ca-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{
+ Hostname: "wafv2.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{
+ Hostname: "wafv2.eu-central-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-central-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-central-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{
+ Hostname: "wafv2.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-north-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{
+ Hostname: "wafv2.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{
+ Hostname: "wafv2.eu-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-south-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{
+ Hostname: "wafv2.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{
+ Hostname: "wafv2.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{
+ Hostname: "wafv2.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpointKey{
+ Region: "eu-west-3",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpointKey{
+ Region: "fips-af-south-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.af-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "af-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-east-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-northeast-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-northeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-northeast-2",
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-northeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-northeast-3",
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-northeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-northeast-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-south-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-south-2",
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-south-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-southeast-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-2",
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-southeast-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-3",
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-southeast-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ap-southeast-4",
+ }: endpoint{
+ Hostname: "wafv2-fips.ap-southeast-4.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ap-southeast-4",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.ca-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-central-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-central-2",
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-central-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-central-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-north-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-north-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-north-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-south-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-south-2",
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-south-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-south-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-2",
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-eu-west-3",
+ }: endpoint{
+ Hostname: "wafv2-fips.eu-west-3.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-3",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-il-central-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.il-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "il-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-me-central-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.me-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-central-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-me-south-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-sa-east-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "wafv2-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "wafv2-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{
+ Hostname: "wafv2.il-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "il-central-1",
+ },
+ },
+ endpointKey{
+ Region: "il-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.il-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "il-central-1",
+ },
+ },
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{
+ Hostname: "wafv2.me-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-central-1",
+ },
+ },
+ endpointKey{
+ Region: "me-central-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.me-central-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-central-1",
+ },
+ },
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{
+ Hostname: "wafv2.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ },
+ endpointKey{
+ Region: "me-south-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.me-south-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "me-south-1",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{
+ Hostname: "wafv2.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.sa-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{
+ Hostname: "wafv2.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{
+ Hostname: "wafv2.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{
+ Hostname: "wafv2.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{
+ Hostname: "wafv2.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ "wellarchitected": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "wisdom": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "ui-ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ui-ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ui-eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ui-eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ui-us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ui-us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{},
+ },
+ },
+ "workdocs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "workdocs-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "workdocs-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "workdocs-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "workdocs-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "workmail": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "workspaces": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "workspaces-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "workspaces-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "workspaces-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "workspaces-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ "workspaces-web": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ },
+ },
+ "xray": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "af-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-northeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "ap-southeast-4",
+ }: endpoint{},
+ endpointKey{
+ Region: "ca-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-central-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-south-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "eu-west-3",
+ }: endpoint{},
+ endpointKey{
+ Region: "fips-us-east-1",
+ }: endpoint{
+ Hostname: "xray-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-east-2",
+ }: endpoint{
+ Hostname: "xray-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-1",
+ }: endpoint{
+ Hostname: "xray-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-west-2",
+ }: endpoint{
+ Hostname: "xray-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "il-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-central-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "me-south-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "sa-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "xray-fips.us-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-east-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-east-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "xray-fips.us-east-2.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "xray-fips.us-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-west-2",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-west-2",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "xray-fips.us-west-2.amazonaws.com",
+ },
+ },
+ },
+ },
+}
+
+// AwsCnPartition returns the Resolver for AWS China.
+func AwsCnPartition() Partition {
+ return awscnPartition.Partition()
+}
+
+var awscnPartition = partition{
+ ID: "aws-cn",
+ Name: "AWS China",
+ DNSSuffix: "amazonaws.com.cn",
+ RegionRegex: regionRegex{
+ Regexp: func() *regexp.Regexp {
+ reg, _ := regexp.Compile("^cn\\-\\w+\\-\\d+$")
+ return reg
+ }(),
+ },
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Hostname: "{service}.{region}.{dnsSuffix}",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ defaultKey{
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}.{region}.{dnsSuffix}",
+ DNSSuffix: "api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ defaultKey{
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ Regions: regions{
+ "cn-north-1": region{
+ Description: "China (Beijing)",
+ },
+ "cn-northwest-1": region{
+ Description: "China (Ningxia)",
+ },
+ },
+ Services: services{
+ "access-analyzer": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "account": service{
+ PartitionEndpoint: "aws-cn-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-cn-global",
+ }: endpoint{
+ Hostname: "account.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "acm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "airflow": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "api.ecr": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{
+ Hostname: "api.ecr.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{
+ Hostname: "api.ecr.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "api.sagemaker": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "api.tunneling.iot": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "apigateway": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "appconfig": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "appconfigdata": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "application-autoscaling": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "applicationinsights": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "appmesh": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.cn-north-1.api.amazonwebservices.com.cn",
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "appmesh.cn-northwest-1.api.amazonwebservices.com.cn",
+ },
+ },
+ },
+ "appsync": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "arc-zonal-shift": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "athena": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.cn-north-1.api.amazonwebservices.com.cn",
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.cn-northwest-1.api.amazonwebservices.com.cn",
+ },
+ },
+ },
+ "autoscaling": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "autoscaling-plans": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "backup": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "backupstorage": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "batch": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "budgets": service{
+ PartitionEndpoint: "aws-cn-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-cn-global",
+ }: endpoint{
+ Hostname: "budgets.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "cassandra": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "ce": service{
+ PartitionEndpoint: "aws-cn-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-cn-global",
+ }: endpoint{
+ Hostname: "ce.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "cloudcontrolapi": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "cloudformation": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "cloudfront": service{
+ PartitionEndpoint: "aws-cn-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-cn-global",
+ }: endpoint{
+ Hostname: "cloudfront.cn-northwest-1.amazonaws.com.cn",
+ Protocols: []string{"http", "https"},
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "cloudtrail": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "codebuild": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "codecommit": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "codedeploy": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "codepipeline": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "cognito-identity": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ },
+ },
+ "compute-optimizer": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{
+ Hostname: "compute-optimizer.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "config": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "cur": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "data-ats.iot": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ CredentialScope: credentialScope{
+ Service: "iotdata",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{
+ Hostname: "data.ats.iot.cn-north-1.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "data.jobs.iot": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "databrew": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "datasync": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "dax": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "directconnect": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "dlm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "dms": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "docdb": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{
+ Hostname: "rds.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "ds": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "dynamodb": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "ebs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "ec2": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "ecs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "eks": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "elasticache": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "elasticbeanstalk": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "elasticfilesystem": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-north-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.cn-north-1.amazonaws.com.cn",
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.cn-northwest-1.amazonaws.com.cn",
+ },
+ endpointKey{
+ Region: "fips-cn-north-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-cn-northwest-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "elasticloadbalancing": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "elasticmapreduce": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "emr-containers": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "emr-serverless": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "es": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.cn-north-1.api.amazonwebservices.com.cn",
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.cn-northwest-1.api.amazonwebservices.com.cn",
+ },
+ },
+ },
+ "events": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "firehose": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "firehose.cn-north-1.api.amazonwebservices.com.cn",
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "firehose.cn-northwest-1.api.amazonwebservices.com.cn",
+ },
+ },
+ },
+ "fms": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "fsx": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "gamelift": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "glacier": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "glue": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "greengrass": service{
+ IsRegionalized: boxedTrue,
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ },
+ },
+ "guardduty": service{
+ IsRegionalized: boxedTrue,
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "health": service{
+ PartitionEndpoint: "aws-cn-global",
+ IsRegionalized: boxedFalse,
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ SSLCommonName: "health.cn-northwest-1.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-cn-global",
+ }: endpoint{
+ Hostname: "global.health.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "iam": service{
+ PartitionEndpoint: "aws-cn-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-cn-global",
+ }: endpoint{
+ Hostname: "iam.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ },
+ },
+ "identitystore": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "internetmonitor": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ DNSSuffix: "api.amazonwebservices.com.cn",
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "api.amazonwebservices.com.cn",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{
+ Hostname: "internetmonitor.cn-north-1.api.amazonwebservices.com.cn",
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{
+ Hostname: "internetmonitor.cn-northwest-1.api.amazonwebservices.com.cn",
+ },
+ },
+ },
+ "iot": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "iotanalytics": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ },
+ },
+ "iotevents": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ },
+ },
+ "ioteventsdata": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{
+ Hostname: "data.iotevents.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ },
+ },
+ "iotsecuredtunneling": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "iotsitewise": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ },
+ },
+ "kafka": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "kendra-ranking": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ DNSSuffix: "api.amazonwebservices.com.cn",
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "api.amazonwebservices.com.cn",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.cn-north-1.api.amazonwebservices.com.cn",
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.cn-northwest-1.api.amazonwebservices.com.cn",
+ },
+ },
+ },
+ "kinesis": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "kinesisanalytics": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "kinesisvideo": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ },
+ },
+ "kms": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "lakeformation": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "lambda": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.cn-north-1.api.amazonwebservices.com.cn",
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.cn-northwest-1.api.amazonwebservices.com.cn",
+ },
+ },
+ },
+ "license-manager": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "license-manager-linux-subscriptions": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "logs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "mediaconvert": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{
+ Hostname: "subscribe.mediaconvert.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "memory-db": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "metrics.sagemaker": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "monitoring": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "mq": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "neptune": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{
+ Hostname: "rds.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{
+ Hostname: "rds.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "oam": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "organizations": service{
+ PartitionEndpoint: "aws-cn-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-cn-global",
+ }: endpoint{
+ Hostname: "organizations.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "personalize": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ },
+ },
+ "pi": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "polly": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "ram": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "rbin": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "rds": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "redshift": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "resource-explorer-2": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ DNSSuffix: "api.amazonwebservices.com.cn",
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "api.amazonwebservices.com.cn",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.cn-north-1.api.amazonwebservices.com.cn",
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.cn-northwest-1.api.amazonwebservices.com.cn",
+ },
+ },
+ },
+ "resource-groups": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "rolesanywhere": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "route53": service{
+ PartitionEndpoint: "aws-cn-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-cn-global",
+ }: endpoint{
+ Hostname: "route53.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "route53resolver": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "runtime.sagemaker": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "s3": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ defaultKey{
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
+ DNSSuffix: "amazonaws.com.cn",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.cn-north-1.amazonaws.com.cn",
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.cn-northwest-1.amazonaws.com.cn",
+ },
+ },
+ },
+ "s3-control": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ defaultKey{
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
+ DNSSuffix: "amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{
+ Hostname: "s3-control.cn-north-1.amazonaws.com.cn",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ endpointKey{
+ Region: "cn-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.cn-north-1.amazonaws.com.cn",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{
+ Hostname: "s3-control.cn-northwest-1.amazonaws.com.cn",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.cn-northwest-1.amazonaws.com.cn",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "savingsplans": service{
+ IsRegionalized: boxedTrue,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{
+ Hostname: "savingsplans.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{
+ Hostname: "savingsplans.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "schemas": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "secretsmanager": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "securityhub": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "serverlessrepo": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ },
+ "servicecatalog": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "servicediscovery": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-north-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.cn-north-1.api.amazonwebservices.com.cn",
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.cn-northwest-1.api.amazonwebservices.com.cn",
+ },
+ },
+ },
+ "servicequotas": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "signer": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "sms": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ },
+ },
+ "snowball": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-north-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.cn-north-1.amazonaws.com.cn",
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.cn-northwest-1.amazonaws.com.cn",
+ },
+ endpointKey{
+ Region: "fips-cn-north-1",
+ }: endpoint{
+ Hostname: "snowball-fips.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-cn-northwest-1",
+ }: endpoint{
+ Hostname: "snowball-fips.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "sns": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "sqs": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ SSLCommonName: "{region}.queue.{dnsSuffix}",
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "ssm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "states": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "storagegateway": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "streams.dynamodb": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ CredentialScope: credentialScope{
+ Service: "dynamodb",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "sts": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "support": service{
+ PartitionEndpoint: "aws-cn-global",
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-cn-global",
+ }: endpoint{
+ Hostname: "support.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ },
+ },
+ "swf": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "synthetics": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "tagging": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "transcribe": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{
+ Hostname: "cn.transcribe.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{
+ Hostname: "cn.transcribe.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ },
+ },
+ "transcribestreaming": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "transfer": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "waf-regional": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{
+ Hostname: "waf-regional.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ endpointKey{
+ Region: "cn-north-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{
+ Hostname: "waf-regional.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-cn-north-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-cn-northwest-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "wafv2": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{
+ Hostname: "wafv2.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ endpointKey{
+ Region: "cn-north-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{
+ Hostname: "wafv2.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ endpointKey{
+ Region: "cn-northwest-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-cn-north-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.cn-north-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-north-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-cn-northwest-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.cn-northwest-1.amazonaws.com.cn",
+ CredentialScope: credentialScope{
+ Region: "cn-northwest-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "workspaces": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ "xray": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "cn-north-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "cn-northwest-1",
+ }: endpoint{},
+ },
+ },
+ },
+}
+
+// AwsUsGovPartition returns the Resolver for AWS GovCloud (US).
+func AwsUsGovPartition() Partition {
+ return awsusgovPartition.Partition()
+}
+
+var awsusgovPartition = partition{
+ ID: "aws-us-gov",
+ Name: "AWS GovCloud (US)",
+ DNSSuffix: "amazonaws.com",
+ RegionRegex: regionRegex{
+ Regexp: func() *regexp.Regexp {
+ reg, _ := regexp.Compile("^us\\-gov\\-\\w+\\-\\d+$")
+ return reg
+ }(),
+ },
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Hostname: "{service}.{region}.{dnsSuffix}",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ defaultKey{
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}.{region}.{dnsSuffix}",
+ DNSSuffix: "api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ defaultKey{
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ Regions: regions{
+ "us-gov-east-1": region{
+ Description: "AWS GovCloud (US-East)",
+ },
+ "us-gov-west-1": region{
+ Description: "AWS GovCloud (US-West)",
+ },
+ },
+ Services: services{
+ "access-analyzer": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "access-analyzer.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "access-analyzer.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "access-analyzer.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "access-analyzer.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "access-analyzer.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "access-analyzer.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "acm": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "acm.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "acm.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "acm.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "acm-pca": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "acm-pca.{region}.{dnsSuffix}",
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "acm-pca.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "acm-pca.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "acm-pca.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "acm-pca.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "api.detective": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.detective-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "api.detective-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.detective-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "api.detective-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "api.ecr": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecr-fips.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "dkr-us-gov-east-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dkr-us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dkr-us-gov-west-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dkr-us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-dkr-us-gov-east-1",
+ }: endpoint{
+ Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-dkr-us-gov-west-1",
+ }: endpoint{
+ Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "api.ecr.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "api.ecr.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "api.sagemaker": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api-fips.sagemaker.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api-fips.sagemaker.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "api-fips.sagemaker.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips-secondary",
+ }: endpoint{
+ Hostname: "api.sagemaker.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1-secondary",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1-secondary",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.sagemaker.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "api.tunneling.iot": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "apigateway": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "appconfig": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "appconfig.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "appconfig.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "appconfig.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "appconfig.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "appconfigdata": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "application-autoscaling": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Hostname: "autoscaling.{region}.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ CredentialScope: credentialScope{
+ Service: "application-autoscaling",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "application-autoscaling.us-gov-east-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "application-autoscaling.us-gov-east-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "application-autoscaling.us-gov-east-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "application-autoscaling.us-gov-west-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "application-autoscaling.us-gov-west-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "application-autoscaling.us-gov-west-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "applicationinsights": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "applicationinsights.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "applicationinsights.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "appstream2": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ CredentialScope: credentialScope{
+ Service: "appstream",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips",
+ }: endpoint{
+ Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "appstream2-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "appstream2-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "athena": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "athena-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "athena-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.us-gov-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "athena-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "athena-fips.us-gov-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "athena.us-gov-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "athena-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "athena-fips.us-gov-west-1.api.aws",
+ },
+ },
+ },
+ "autoscaling": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "autoscaling.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ },
+ "autoscaling-plans": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ },
+ "backup": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "backup-gateway": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "backupstorage": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "batch": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "batch.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "batch.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "batch.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "batch.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "batch.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "cassandra": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "cassandra.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cassandra.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "cassandra.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "cassandra.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cassandra.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "cassandra.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "cloudcontrolapi": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "cloudcontrolapi-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "cloudcontrolapi-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudcontrolapi-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudcontrolapi-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "clouddirectory": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "clouddirectory.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "clouddirectory.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "cloudformation": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "cloudformation.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudformation.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "cloudformation.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "cloudformation.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudformation.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "cloudformation.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "cloudhsm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "cloudhsmv2": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "cloudhsm",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "cloudtrail": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudtrail.us-gov-west-1.amazonaws.com",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "cloudtrail.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "cloudtrail.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudtrail.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cloudtrail.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "codebuild": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codebuild-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "codebuild-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codebuild-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "codebuild-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "codecommit": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips",
+ }: endpoint{
+ Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codecommit-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "codecommit-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "codedeploy": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codedeploy-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "codedeploy-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codedeploy-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "codedeploy-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "codepipeline": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "codepipeline-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "codepipeline-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codepipeline-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "codepipeline-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "cognito-identity": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "cognito-identity-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cognito-identity-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "cognito-idp": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "cognito-idp-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "cognito-idp-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "comprehend": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "comprehend-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "comprehend-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "comprehendmedical": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "comprehendmedical-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "comprehendmedical-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "compute-optimizer": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "compute-optimizer-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "compute-optimizer-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "config": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "config.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "config.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "config.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "config.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "config.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "connect": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "connect.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "connect.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "controltower": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "data-ats.iot": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ CredentialScope: credentialScope{
+ Service: "iotdata",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "data.iot-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Service: "iotdata",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "data.iot-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Service: "iotdata",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.iot-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.iot-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "data.jobs.iot": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "data.jobs.iot-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "data.jobs.iot-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.jobs.iot-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.jobs.iot-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "databrew": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "databrew.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "databrew.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "datasync": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "datasync-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "datasync-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "datasync-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "datasync-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "directconnect": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "directconnect.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "directconnect.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "dlm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dlm.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "dlm.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dlm.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "dlm.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "dms": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "dms",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dms",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dms-fips",
+ }: endpoint{
+ Hostname: "dms.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "dms.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "dms.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "docdb": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "rds.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "ds": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "ds-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "ds-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ds-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ds-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "dynamodb": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dynamodb.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dynamodb.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "dynamodb.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dynamodb.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "dynamodb.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "ebs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "ec2": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ec2.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "ec2.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "ec2.us-gov-east-1.api.aws",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "ec2.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "ec2.us-gov-west-1.api.aws",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "ecs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "ecs-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "ecs-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecs-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ecs-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "eks": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "eks.{region}.{dnsSuffix}",
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "eks.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "eks.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "eks.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "eks.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "elasticache": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticache.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips",
+ }: endpoint{
+ Hostname: "elasticache.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticache.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "elasticache.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "elasticbeanstalk": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "elasticbeanstalk.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticbeanstalk.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "elasticbeanstalk.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "elasticbeanstalk.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticbeanstalk.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "elasticbeanstalk.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "elasticfilesystem": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "elasticloadbalancing": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticloadbalancing.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "elasticloadbalancing.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "elasticloadbalancing.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticloadbalancing.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticloadbalancing.us-gov-west-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ },
+ },
+ "elasticmapreduce": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticmapreduce.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "elasticmapreduce.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "elasticmapreduce.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticmapreduce.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticmapreduce.us-gov-west-1.amazonaws.com",
+ Protocols: []string{"https"},
+ },
+ },
+ },
+ "email": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "email-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "email-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "emr-containers": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "es": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips",
+ }: endpoint{
+ Hostname: "es-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.us-gov-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "es-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "es-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "aos.us-gov-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "es-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "es-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "events": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "events.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "events.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "events.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "events.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "firehose": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "firehose-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "firehose-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "firehose-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "firehose-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "fms": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "fms-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "fms-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fms-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "fsx": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-prod-us-gov-east-1",
+ }: endpoint{
+ Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-prod-us-gov-west-1",
+ }: endpoint{
+ Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "prod-us-gov-east-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "prod-us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "prod-us-gov-west-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "prod-us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "geo": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "geo-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "geo-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "glacier": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "glacier.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "glacier.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "glacier.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "glacier.us-gov-west-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ },
+ },
+ "glue": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "glue-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "glue-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "glue-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "glue-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "greengrass": service{
+ IsRegionalized: boxedTrue,
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "dataplane-us-gov-east-1",
+ }: endpoint{
+ Hostname: "greengrass-ats.iot.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "dataplane-us-gov-west-1",
+ }: endpoint{
+ Hostname: "greengrass-ats.iot.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "greengrass.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "greengrass.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "greengrass.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "greengrass.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "guardduty": service{
+ IsRegionalized: boxedTrue,
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "guardduty.{region}.{dnsSuffix}",
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "guardduty.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "guardduty.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "guardduty.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "guardduty.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "health": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "health-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "health-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "iam": service{
+ PartitionEndpoint: "aws-us-gov-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-us-gov-global",
+ }: endpoint{
+ Hostname: "iam.us-gov.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "aws-us-gov-global",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iam.us-gov.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "aws-us-gov-global-fips",
+ }: endpoint{
+ Hostname: "iam.us-gov.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "iam-govcloud",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "iam-govcloud",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iam.us-gov.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "iam-govcloud-fips",
+ }: endpoint{
+ Hostname: "iam.us-gov.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "identitystore": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "identitystore.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "identitystore.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "identitystore.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "identitystore.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "identitystore.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "ingest.timestream": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ingest.timestream.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "ingest.timestream.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "inspector": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "inspector-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "inspector-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "inspector-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "inspector-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "inspector2": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "inspector2-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "inspector2-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "inspector2-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "inspector2-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "internetmonitor": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ DNSSuffix: "api.aws",
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "api.aws",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "internetmonitor.us-gov-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "internetmonitor.us-gov-west-1.api.aws",
+ },
+ },
+ },
+ "iot": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "iot-fips.us-gov-east-1.amazonaws.com",
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "iot-fips.us-gov-west-1.amazonaws.com",
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iot-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iot-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "iotevents": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "iotevents-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iotevents-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "ioteventsdata": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "data.iotevents-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "data.iotevents.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "data.iotevents-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "iotsecuredtunneling": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "iotsitewise": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "iotsitewise-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iotsitewise-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "iottwinmaker": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "api-us-gov-west-1",
+ }: endpoint{
+ Hostname: "api.iottwinmaker.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "data-us-gov-west-1",
+ }: endpoint{
+ Hostname: "data.iottwinmaker.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-api-us-gov-west-1",
+ }: endpoint{
+ Hostname: "api.iottwinmaker-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-data-us-gov-west-1",
+ }: endpoint{
+ Hostname: "data.iottwinmaker-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "iottwinmaker-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "iottwinmaker-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "kafka": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "kafka.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kafka.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "kafka.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "kafka.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kafka.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "kafka.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "kendra": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "kendra-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kendra-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "kendra-ranking": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ DNSSuffix: "api.aws",
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "api.aws",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.us-gov-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "kendra-ranking.us-gov-west-1.api.aws",
+ },
+ },
+ },
+ "kinesis": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "kinesis.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "kinesis.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "kinesis.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kinesis.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "kinesis.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kinesis.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "kinesisanalytics": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "kms": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ProdFips",
+ }: endpoint{
+ Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "lakeformation": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "lakeformation-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "lakeformation-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "lakeformation-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "lakeformation-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "lambda": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "lambda-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "lambda-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.us-gov-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "lambda-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "lambda.us-gov-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "lambda-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "license-manager": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "license-manager-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "license-manager-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "license-manager-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "license-manager-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "license-manager-linux-subscriptions": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "logs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "logs.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "logs.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "logs.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "logs.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "managedblockchain": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "mediaconvert": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "mediaconvert.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mediaconvert.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "meetings-chime": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "meetings-chime-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "meetings-chime-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "meetings-chime-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "meetings-chime-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "metering.marketplace": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "aws-marketplace",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "metrics.sagemaker": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "mgn": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "mgn-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "mgn-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mgn-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mgn-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "models.lex": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "lex",
+ },
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "models-fips.lex.{region}.{dnsSuffix}",
+ CredentialScope: credentialScope{
+ Service: "lex",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "models-fips.lex.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "models-fips.lex.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "monitoring": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "monitoring.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "monitoring.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "monitoring.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "monitoring.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "monitoring.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "mq": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "mq-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "mq-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mq-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "mq-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "neptune": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "rds.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "rds.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "network-firewall": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "network-firewall-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "network-firewall-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "network-firewall-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "network-firewall-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "networkmanager": service{
+ PartitionEndpoint: "aws-us-gov-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-us-gov-global",
+ }: endpoint{
+ Hostname: "networkmanager.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "aws-us-gov-global",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "networkmanager.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-aws-us-gov-global",
+ }: endpoint{
+ Hostname: "networkmanager.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "oidc": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "oidc.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "oidc.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "organizations": service{
+ PartitionEndpoint: "aws-us-gov-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-us-gov-global",
+ }: endpoint{
+ Hostname: "organizations.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "aws-us-gov-global",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "organizations.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-aws-us-gov-global",
+ }: endpoint{
+ Hostname: "organizations.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "outposts": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "outposts.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "outposts.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "outposts.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "outposts.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "participant.connect": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "participant.connect.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "participant.connect.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "pi": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "pinpoint": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "mobiletargeting",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "pinpoint-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "pinpoint.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "pinpoint-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "polly": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "polly-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "polly-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "portal.sso": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "portal.sso.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "portal.sso.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "quicksight": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "api",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "ram": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "ram.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ram.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "ram.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "ram.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ram.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "ram.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "rbin": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "rbin-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "rbin-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rbin-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rbin-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "rds": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "rds.us-gov-east-1",
+ }: endpoint{
+ Hostname: "rds.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rds.us-gov-west-1",
+ }: endpoint{
+ Hostname: "rds.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "rds.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rds.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "rds.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "redshift": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "redshift.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "redshift.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "rekognition": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "rekognition-fips.us-gov-west-1",
+ }: endpoint{
+ Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition.us-gov-west-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "rekognition.us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "resource-explorer-2": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ DNSSuffix: "api.aws",
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "api.aws",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.us-gov-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "resource-explorer-2.us-gov-west-1.api.aws",
+ },
+ },
+ },
+ "resource-groups": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "resource-groups.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "resource-groups.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "resource-groups.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "resource-groups.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "resource-groups.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "robomaker": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "route53": service{
+ PartitionEndpoint: "aws-us-gov-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-us-gov-global",
+ }: endpoint{
+ Hostname: "route53.us-gov.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "aws-us-gov-global",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "route53.us-gov.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-aws-us-gov-global",
+ }: endpoint{
+ Hostname: "route53.us-gov.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "route53resolver": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "route53resolver.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "route53resolver.us-gov-east-1.amazonaws.com",
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "route53resolver.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "route53resolver.us-gov-west-1.amazonaws.com",
+
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "runtime.lex": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "lex",
+ },
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "runtime-fips.lex.{region}.{dnsSuffix}",
+ CredentialScope: credentialScope{
+ Service: "lex",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "runtime-fips.lex.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "runtime-fips.lex.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "runtime.sagemaker": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "runtime.sagemaker.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "runtime.sagemaker.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "runtime.sagemaker.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "s3": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ defaultKey{
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
+ DNSSuffix: "amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ defaultKey{
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
+ DNSSuffix: "amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "s3-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "s3-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "s3.us-gov-east-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.us-gov-east-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "s3-fips.us-gov-east-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "s3.us-gov-west-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3.dualstack.us-gov-west-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "s3-fips.us-gov-west-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ },
+ },
+ "s3-control": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ defaultKey{
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
+ DNSSuffix: "amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ defaultKey{
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
+ DNSSuffix: "amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "s3-control.us-gov-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.us-gov-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "s3-control-fips.us-gov-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control-fips.dualstack.us-gov-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "s3-control-fips.us-gov-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "s3-control.us-gov-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control.dualstack.us-gov-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "s3-control-fips.us-gov-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "s3-control-fips.dualstack.us-gov-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "s3-control-fips.us-gov-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3v4"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "s3-outposts": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{},
+ },
+ },
+ "secretsmanager": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "secretsmanager-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "secretsmanager-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "secretsmanager-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "secretsmanager-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "securityhub": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "securityhub-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "securityhub-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "securityhub-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "securityhub-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "serverlessrepo": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "serverlessrepo.us-gov-east-1.amazonaws.com",
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "serverlessrepo.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "serverlessrepo.us-gov-west-1.amazonaws.com",
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "serverlessrepo.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "servicecatalog": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicecatalog-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "servicecatalog-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicecatalog-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "servicecatalog-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "servicecatalog-appregistry": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicecatalog-appregistry.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "servicediscovery": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "servicediscovery",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "servicediscovery",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "servicediscovery-fips",
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.us-gov-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-gov-east-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery.us-gov-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant | dualStackVariant,
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-gov-west-1.api.aws",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "servicequotas": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicequotas.{region}.{dnsSuffix}",
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "servicequotas.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "servicequotas.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicequotas.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "servicequotas.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "simspaceweaver": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "sms": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "sms-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sms-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "sms-voice": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "sms-voice-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sms-voice-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "snowball": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "snowball-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "snowball-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "snowball-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "sns": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "sns.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "sns.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sns.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sns.us-gov-west-1.amazonaws.com",
+ Protocols: []string{"https"},
+ },
+ },
+ },
+ "sqs": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sqs.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "sqs.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "sqs.us-gov-west-1.amazonaws.com",
+ SSLCommonName: "{region}.queue.{dnsSuffix}",
+ Protocols: []string{"http", "https"},
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "ssm": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "ssm.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "ssm.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "ssm.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "sso": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "sso.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "sso.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "states": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "states-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "states.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "states-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "states.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "storagegateway": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips",
+ }: endpoint{
+ Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "storagegateway-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "storagegateway-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "streams.dynamodb": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "dynamodb",
+ },
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "streams.dynamodb.{region}.{dnsSuffix}",
+ CredentialScope: credentialScope{
+ Service: "dynamodb",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "streams.dynamodb.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "streams.dynamodb.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "streams.dynamodb.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "streams.dynamodb.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "sts": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sts.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sts.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "sts.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "sts.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "sts.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "support": service{
+ PartitionEndpoint: "aws-us-gov-global",
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-us-gov-global",
+ }: endpoint{
+ Hostname: "support.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "support.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "support.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "swf": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "swf.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "swf.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoint{
+ Hostname: "swf.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "swf.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "swf.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "swf.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "synthetics": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "synthetics-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "synthetics-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "synthetics-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "synthetics-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "tagging": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "textract": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "textract-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "textract-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "textract-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "textract-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "transcribe": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.transcribe.{region}.{dnsSuffix}",
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "fips.transcribe.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "fips.transcribe.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.transcribe.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "fips.transcribe.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "transcribestreaming": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "transfer": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "transfer-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "transfer-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "transfer-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "transfer-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "translate": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "translate-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoint{
+ Hostname: "translate-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "waf-regional": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "waf-regional-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "waf-regional.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "waf-regional.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "waf-regional-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "wafv2": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "wafv2-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{
+ Hostname: "wafv2.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{
+ Hostname: "wafv2.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "wafv2-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+ "wellarchitected": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ },
+ },
+ "workspaces": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "workspaces-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "workspaces-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "workspaces-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "workspaces-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ "xray": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoint{
+ Hostname: "xray-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoint{
+ Hostname: "xray-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-gov-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "xray-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpointKey{
+ Region: "us-gov-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-gov-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "xray-fips.us-gov-west-1.amazonaws.com",
+ },
+ },
+ },
+ },
+}
+
+// AwsIsoPartition returns the Resolver for AWS ISO (US).
+func AwsIsoPartition() Partition {
+ return awsisoPartition.Partition()
+}
+
+var awsisoPartition = partition{
+ ID: "aws-iso",
+ Name: "AWS ISO (US)",
+ DNSSuffix: "c2s.ic.gov",
+ RegionRegex: regionRegex{
+ Regexp: func() *regexp.Regexp {
+ reg, _ := regexp.Compile("^us\\-iso\\-\\w+\\-\\d+$")
+ return reg
+ }(),
+ },
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Hostname: "{service}.{region}.{dnsSuffix}",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ Regions: regions{
+ "us-iso-east-1": region{
+ Description: "US ISO East",
+ },
+ "us-iso-west-1": region{
+ Description: "US ISO WEST",
+ },
+ },
+ Services: services{
+ "api.ecr": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{
+ Hostname: "api.ecr.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-east-1",
+ },
+ },
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{
+ Hostname: "api.ecr.us-iso-west-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-west-1",
+ },
+ },
+ },
+ },
+ "api.sagemaker": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "apigateway": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "appconfig": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "appconfigdata": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "application-autoscaling": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "athena": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "autoscaling": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "cloudcontrolapi": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "cloudformation": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "cloudtrail": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "codedeploy": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "comprehend": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "config": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "datapipeline": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "directconnect": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "dlm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "dms": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "dms",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-iso-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dms",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dms-fips",
+ }: endpoint{
+ Hostname: "dms.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms.us-iso-east-1.c2s.ic.gov",
+ },
+ endpointKey{
+ Region: "us-iso-east-1-fips",
+ }: endpoint{
+ Hostname: "dms.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms.us-iso-west-1.c2s.ic.gov",
+ },
+ endpointKey{
+ Region: "us-iso-west-1-fips",
+ }: endpoint{
+ Hostname: "dms.us-iso-west-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "ds": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "dynamodb": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "ebs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "ec2": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "ecs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "eks": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "elasticache": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "elasticfilesystem": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-iso-east-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-iso-west-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-iso-west-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-iso-east-1.c2s.ic.gov",
+ },
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-iso-west-1.c2s.ic.gov",
+ },
+ },
+ },
+ "elasticloadbalancing": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "elasticmapreduce": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "es": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "events": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "firehose": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "glacier": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "glue": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "health": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "iam": service{
+ PartitionEndpoint: "aws-iso-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-iso-global",
+ }: endpoint{
+ Hostname: "iam.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-east-1",
+ },
+ },
+ },
+ },
+ "kinesis": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "kms": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ProdFips",
+ }: endpoint{
+ Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
+ },
+ endpointKey{
+ Region: "us-iso-east-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.us-iso-west-1.c2s.ic.gov",
+ },
+ endpointKey{
+ Region: "us-iso-west-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.us-iso-west-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "lambda": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "license-manager": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "logs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "medialive": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "mediapackage": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "metrics.sagemaker": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "monitoring": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "outposts": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "ram": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "rbin": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-iso-east-1",
+ }: endpoint{
+ Hostname: "rbin-fips.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "fips-us-iso-west-1",
+ }: endpoint{
+ Hostname: "rbin-fips.us-iso-west-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-west-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rbin-fips.us-iso-east-1.c2s.ic.gov",
+ },
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rbin-fips.us-iso-west-1.c2s.ic.gov",
+ },
+ },
+ },
+ "rds": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "redshift": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "resource-groups": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "route53": service{
+ PartitionEndpoint: "aws-iso-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-iso-global",
+ }: endpoint{
+ Hostname: "route53.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-east-1",
+ },
+ },
+ },
+ },
+ "route53resolver": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "runtime.sagemaker": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "s3": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ SignatureVersions: []string{"s3v4"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "secretsmanager": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "snowball": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "sns": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "sqs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "ssm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "states": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "streams.dynamodb": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "dynamodb",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "sts": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "support": service{
+ PartitionEndpoint: "aws-iso-global",
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-iso-global",
+ }: endpoint{
+ Hostname: "support.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: credentialScope{
+ Region: "us-iso-east-1",
+ },
+ },
+ },
+ },
+ "swf": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "synthetics": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "tagging": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ "transcribe": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "transcribestreaming": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "translate": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ },
+ },
+ "workspaces": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-iso-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-iso-west-1",
+ }: endpoint{},
+ },
+ },
+ },
+}
+
+// AwsIsoBPartition returns the Resolver for AWS ISOB (US).
+func AwsIsoBPartition() Partition {
+ return awsisobPartition.Partition()
+}
+
+var awsisobPartition = partition{
+ ID: "aws-iso-b",
+ Name: "AWS ISOB (US)",
+ DNSSuffix: "sc2s.sgov.gov",
+ RegionRegex: regionRegex{
+ Regexp: func() *regexp.Regexp {
+ reg, _ := regexp.Compile("^us\\-isob\\-\\w+\\-\\d+$")
+ return reg
+ }(),
+ },
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Hostname: "{service}.{region}.{dnsSuffix}",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ Regions: regions{
+ "us-isob-east-1": region{
+ Description: "US ISOB East (Ohio)",
+ },
+ },
+ Services: services{
+ "api.ecr": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{
+ Hostname: "api.ecr.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: credentialScope{
+ Region: "us-isob-east-1",
+ },
+ },
+ },
+ },
+ "appconfig": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "appconfigdata": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "application-autoscaling": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "autoscaling": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "cloudformation": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "cloudtrail": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "codedeploy": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "config": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "directconnect": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "dlm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "dms": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{},
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms.{region}.{dnsSuffix}",
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "dms",
+ }: endpoint{
+ CredentialScope: credentialScope{
+ Region: "us-isob-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dms",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: credentialScope{
+ Region: "us-isob-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "dms-fips",
+ }: endpoint{
+ Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: credentialScope{
+ Region: "us-isob-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-isob-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
+ },
+ endpointKey{
+ Region: "us-isob-east-1-fips",
+ }: endpoint{
+ Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: credentialScope{
+ Region: "us-isob-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "ds": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "dynamodb": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "ebs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "ec2": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "ecs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "eks": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "elasticache": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "elasticfilesystem": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-isob-east-1",
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: credentialScope{
+ Region: "us-isob-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-isob-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "elasticfilesystem-fips.us-isob-east-1.sc2s.sgov.gov",
+ },
+ },
+ },
+ "elasticloadbalancing": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ },
+ "elasticmapreduce": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "es": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "events": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "glacier": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "health": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "iam": service{
+ PartitionEndpoint: "aws-iso-b-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-iso-b-global",
+ }: endpoint{
+ Hostname: "iam.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: credentialScope{
+ Region: "us-isob-east-1",
+ },
+ },
+ },
+ },
+ "kinesis": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "kms": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "ProdFips",
+ }: endpoint{
+ Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: credentialScope{
+ Region: "us-isob-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-isob-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
+ },
+ endpointKey{
+ Region: "us-isob-east-1-fips",
+ }: endpoint{
+ Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: credentialScope{
+ Region: "us-isob-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ },
+ },
+ "lambda": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "license-manager": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "logs": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "metering.marketplace": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ CredentialScope: credentialScope{
+ Service: "aws-marketplace",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "metrics.sagemaker": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "monitoring": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "outposts": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "ram": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "rbin": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "fips-us-isob-east-1",
+ }: endpoint{
+ Hostname: "rbin-fips.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: credentialScope{
+ Region: "us-isob-east-1",
+ },
+ Deprecated: boxedTrue,
+ },
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ endpointKey{
+ Region: "us-isob-east-1",
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "rbin-fips.us-isob-east-1.sc2s.sgov.gov",
+ },
+ },
+ },
+ "rds": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "redshift": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "resource-groups": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "route53": service{
+ PartitionEndpoint: "aws-iso-b-global",
+ IsRegionalized: boxedFalse,
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-iso-b-global",
+ }: endpoint{
+ Hostname: "route53.sc2s.sgov.gov",
+ CredentialScope: credentialScope{
+ Region: "us-isob-east-1",
+ },
+ },
+ },
+ },
+ "route53resolver": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "s3": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "secretsmanager": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "snowball": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "sns": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "sqs": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ SSLCommonName: "{region}.queue.{dnsSuffix}",
+ Protocols: []string{"http", "https"},
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "ssm": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "states": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "streams.dynamodb": service{
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Protocols: []string{"http", "https"},
+ CredentialScope: credentialScope{
+ Service: "dynamodb",
+ },
+ },
+ },
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "sts": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "support": service{
+ PartitionEndpoint: "aws-iso-b-global",
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "aws-iso-b-global",
+ }: endpoint{
+ Hostname: "support.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: credentialScope{
+ Region: "us-isob-east-1",
+ },
+ },
+ },
+ },
+ "swf": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "synthetics": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "tagging": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ "workspaces": service{
+ Endpoints: serviceEndpoints{
+ endpointKey{
+ Region: "us-isob-east-1",
+ }: endpoint{},
+ },
+ },
+ },
+}
+
+// AwsIsoEPartition returns the Resolver for AWS ISOE (Europe).
+func AwsIsoEPartition() Partition {
+ return awsisoePartition.Partition()
+}
+
+var awsisoePartition = partition{
+ ID: "aws-iso-e",
+ Name: "AWS ISOE (Europe)",
+ DNSSuffix: "cloud.adc-e.uk",
+ RegionRegex: regionRegex{
+ Regexp: func() *regexp.Regexp {
+ reg, _ := regexp.Compile("^eu\\-isoe\\-\\w+\\-\\d+$")
+ return reg
+ }(),
+ },
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Hostname: "{service}.{region}.{dnsSuffix}",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ Regions: regions{},
+ Services: services{},
+}
+
+// AwsIsoFPartition returns the Resolver for AWS ISOF.
+func AwsIsoFPartition() Partition {
+ return awsisofPartition.Partition()
+}
+
+var awsisofPartition = partition{
+ ID: "aws-iso-f",
+ Name: "AWS ISOF",
+ DNSSuffix: "csp.hci.ic.gov",
+ RegionRegex: regionRegex{
+ Regexp: func() *regexp.Regexp {
+ reg, _ := regexp.Compile("^us\\-isof\\-\\w+\\-\\d+$")
+ return reg
+ }(),
+ },
+ Defaults: endpointDefaults{
+ defaultKey{}: endpoint{
+ Hostname: "{service}.{region}.{dnsSuffix}",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ defaultKey{
+ Variant: fipsVariant,
+ }: endpoint{
+ Hostname: "{service}-fips.{region}.{dnsSuffix}",
+ DNSSuffix: "csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ Regions: regions{},
+ Services: services{},
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/dep_service_ids.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/dep_service_ids.go
new file mode 100644
index 000000000..ca8fc828e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/dep_service_ids.go
@@ -0,0 +1,141 @@
+package endpoints
+
+// Service identifiers
+//
+// Deprecated: Use client package's EndpointsID value instead of these
+// ServiceIDs. These IDs are not maintained, and are out of date.
+const (
+ A4bServiceID = "a4b" // A4b.
+ AcmServiceID = "acm" // Acm.
+ AcmPcaServiceID = "acm-pca" // AcmPca.
+ ApiMediatailorServiceID = "api.mediatailor" // ApiMediatailor.
+ ApiPricingServiceID = "api.pricing" // ApiPricing.
+ ApiSagemakerServiceID = "api.sagemaker" // ApiSagemaker.
+ ApigatewayServiceID = "apigateway" // Apigateway.
+ ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling.
+ Appstream2ServiceID = "appstream2" // Appstream2.
+ AppsyncServiceID = "appsync" // Appsync.
+ AthenaServiceID = "athena" // Athena.
+ AutoscalingServiceID = "autoscaling" // Autoscaling.
+ AutoscalingPlansServiceID = "autoscaling-plans" // AutoscalingPlans.
+ BatchServiceID = "batch" // Batch.
+ BudgetsServiceID = "budgets" // Budgets.
+ CeServiceID = "ce" // Ce.
+ ChimeServiceID = "chime" // Chime.
+ Cloud9ServiceID = "cloud9" // Cloud9.
+ ClouddirectoryServiceID = "clouddirectory" // Clouddirectory.
+ CloudformationServiceID = "cloudformation" // Cloudformation.
+ CloudfrontServiceID = "cloudfront" // Cloudfront.
+ CloudhsmServiceID = "cloudhsm" // Cloudhsm.
+ Cloudhsmv2ServiceID = "cloudhsmv2" // Cloudhsmv2.
+ CloudsearchServiceID = "cloudsearch" // Cloudsearch.
+ CloudtrailServiceID = "cloudtrail" // Cloudtrail.
+ CodebuildServiceID = "codebuild" // Codebuild.
+ CodecommitServiceID = "codecommit" // Codecommit.
+ CodedeployServiceID = "codedeploy" // Codedeploy.
+ CodepipelineServiceID = "codepipeline" // Codepipeline.
+ CodestarServiceID = "codestar" // Codestar.
+ CognitoIdentityServiceID = "cognito-identity" // CognitoIdentity.
+ CognitoIdpServiceID = "cognito-idp" // CognitoIdp.
+ CognitoSyncServiceID = "cognito-sync" // CognitoSync.
+ ComprehendServiceID = "comprehend" // Comprehend.
+ ConfigServiceID = "config" // Config.
+ CurServiceID = "cur" // Cur.
+ DatapipelineServiceID = "datapipeline" // Datapipeline.
+ DaxServiceID = "dax" // Dax.
+ DevicefarmServiceID = "devicefarm" // Devicefarm.
+ DirectconnectServiceID = "directconnect" // Directconnect.
+ DiscoveryServiceID = "discovery" // Discovery.
+ DmsServiceID = "dms" // Dms.
+ DsServiceID = "ds" // Ds.
+ DynamodbServiceID = "dynamodb" // Dynamodb.
+ Ec2ServiceID = "ec2" // Ec2.
+ Ec2metadataServiceID = "ec2metadata" // Ec2metadata.
+ EcrServiceID = "ecr" // Ecr.
+ EcsServiceID = "ecs" // Ecs.
+ ElasticacheServiceID = "elasticache" // Elasticache.
+ ElasticbeanstalkServiceID = "elasticbeanstalk" // Elasticbeanstalk.
+ ElasticfilesystemServiceID = "elasticfilesystem" // Elasticfilesystem.
+ ElasticloadbalancingServiceID = "elasticloadbalancing" // Elasticloadbalancing.
+ ElasticmapreduceServiceID = "elasticmapreduce" // Elasticmapreduce.
+ ElastictranscoderServiceID = "elastictranscoder" // Elastictranscoder.
+ EmailServiceID = "email" // Email.
+ EntitlementMarketplaceServiceID = "entitlement.marketplace" // EntitlementMarketplace.
+ EsServiceID = "es" // Es.
+ EventsServiceID = "events" // Events.
+ FirehoseServiceID = "firehose" // Firehose.
+ FmsServiceID = "fms" // Fms.
+ GameliftServiceID = "gamelift" // Gamelift.
+ GlacierServiceID = "glacier" // Glacier.
+ GlueServiceID = "glue" // Glue.
+ GreengrassServiceID = "greengrass" // Greengrass.
+ GuarddutyServiceID = "guardduty" // Guardduty.
+ HealthServiceID = "health" // Health.
+ IamServiceID = "iam" // Iam.
+ ImportexportServiceID = "importexport" // Importexport.
+ InspectorServiceID = "inspector" // Inspector.
+ IotServiceID = "iot" // Iot.
+ IotanalyticsServiceID = "iotanalytics" // Iotanalytics.
+ KinesisServiceID = "kinesis" // Kinesis.
+ KinesisanalyticsServiceID = "kinesisanalytics" // Kinesisanalytics.
+ KinesisvideoServiceID = "kinesisvideo" // Kinesisvideo.
+ KmsServiceID = "kms" // Kms.
+ LambdaServiceID = "lambda" // Lambda.
+ LightsailServiceID = "lightsail" // Lightsail.
+ LogsServiceID = "logs" // Logs.
+ MachinelearningServiceID = "machinelearning" // Machinelearning.
+ MarketplacecommerceanalyticsServiceID = "marketplacecommerceanalytics" // Marketplacecommerceanalytics.
+ MediaconvertServiceID = "mediaconvert" // Mediaconvert.
+ MedialiveServiceID = "medialive" // Medialive.
+ MediapackageServiceID = "mediapackage" // Mediapackage.
+ MediastoreServiceID = "mediastore" // Mediastore.
+ MeteringMarketplaceServiceID = "metering.marketplace" // MeteringMarketplace.
+ MghServiceID = "mgh" // Mgh.
+ MobileanalyticsServiceID = "mobileanalytics" // Mobileanalytics.
+ ModelsLexServiceID = "models.lex" // ModelsLex.
+ MonitoringServiceID = "monitoring" // Monitoring.
+ MturkRequesterServiceID = "mturk-requester" // MturkRequester.
+ NeptuneServiceID = "neptune" // Neptune.
+ OpsworksServiceID = "opsworks" // Opsworks.
+ OpsworksCmServiceID = "opsworks-cm" // OpsworksCm.
+ OrganizationsServiceID = "organizations" // Organizations.
+ PinpointServiceID = "pinpoint" // Pinpoint.
+ PollyServiceID = "polly" // Polly.
+ RdsServiceID = "rds" // Rds.
+ RedshiftServiceID = "redshift" // Redshift.
+ RekognitionServiceID = "rekognition" // Rekognition.
+ ResourceGroupsServiceID = "resource-groups" // ResourceGroups.
+ Route53ServiceID = "route53" // Route53.
+ Route53domainsServiceID = "route53domains" // Route53domains.
+ RuntimeLexServiceID = "runtime.lex" // RuntimeLex.
+ RuntimeSagemakerServiceID = "runtime.sagemaker" // RuntimeSagemaker.
+ S3ServiceID = "s3" // S3.
+ S3ControlServiceID = "s3-control" // S3Control.
+ SagemakerServiceID = "api.sagemaker" // Sagemaker.
+ SdbServiceID = "sdb" // Sdb.
+ SecretsmanagerServiceID = "secretsmanager" // Secretsmanager.
+ ServerlessrepoServiceID = "serverlessrepo" // Serverlessrepo.
+ ServicecatalogServiceID = "servicecatalog" // Servicecatalog.
+ ServicediscoveryServiceID = "servicediscovery" // Servicediscovery.
+ ShieldServiceID = "shield" // Shield.
+ SmsServiceID = "sms" // Sms.
+ SnowballServiceID = "snowball" // Snowball.
+ SnsServiceID = "sns" // Sns.
+ SqsServiceID = "sqs" // Sqs.
+ SsmServiceID = "ssm" // Ssm.
+ StatesServiceID = "states" // States.
+ StoragegatewayServiceID = "storagegateway" // Storagegateway.
+ StreamsDynamodbServiceID = "streams.dynamodb" // StreamsDynamodb.
+ StsServiceID = "sts" // Sts.
+ SupportServiceID = "support" // Support.
+ SwfServiceID = "swf" // Swf.
+ TaggingServiceID = "tagging" // Tagging.
+ TransferServiceID = "transfer" // Transfer.
+ TranslateServiceID = "translate" // Translate.
+ WafServiceID = "waf" // Waf.
+ WafRegionalServiceID = "waf-regional" // WafRegional.
+ WorkdocsServiceID = "workdocs" // Workdocs.
+ WorkmailServiceID = "workmail" // Workmail.
+ WorkspacesServiceID = "workspaces" // Workspaces.
+ XrayServiceID = "xray" // Xray.
+)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
new file mode 100644
index 000000000..66dec6beb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
@@ -0,0 +1,65 @@
+// Package endpoints provides the types and functionality for defining regions
+// and endpoints, as well as querying those definitions.
+//
+// The SDK's Regions and Endpoints metadata is code generated into the endpoints
+// package, and is accessible via the DefaultResolver function. This function
+// returns a endpoint Resolver will search the metadata and build an associated
+// endpoint if one is found. The default resolver will search all partitions
+// known by the SDK. e.g AWS Standard (aws), AWS China (aws-cn), and
+// AWS GovCloud (US) (aws-us-gov).
+// .
+//
+// # Enumerating Regions and Endpoint Metadata
+//
+// Casting the Resolver returned by DefaultResolver to a EnumPartitions interface
+// will allow you to get access to the list of underlying Partitions with the
+// Partitions method. This is helpful if you want to limit the SDK's endpoint
+// resolving to a single partition, or enumerate regions, services, and endpoints
+// in the partition.
+//
+// resolver := endpoints.DefaultResolver()
+// partitions := resolver.(endpoints.EnumPartitions).Partitions()
+//
+// for _, p := range partitions {
+// fmt.Println("Regions for", p.ID())
+// for id, _ := range p.Regions() {
+// fmt.Println("*", id)
+// }
+//
+// fmt.Println("Services for", p.ID())
+// for id, _ := range p.Services() {
+// fmt.Println("*", id)
+// }
+// }
+//
+// # Using Custom Endpoints
+//
+// The endpoints package also gives you the ability to use your own logic how
+// endpoints are resolved. This is a great way to define a custom endpoint
+// for select services, without passing that logic down through your code.
+//
+// If a type implements the Resolver interface it can be used to resolve
+// endpoints. To use this with the SDK's Session and Config set the value
+// of the type to the EndpointsResolver field of aws.Config when initializing
+// the session, or service client.
+//
+// In addition the ResolverFunc is a wrapper for a func matching the signature
+// of Resolver.EndpointFor, converting it to a type that satisfies the
+// Resolver interface.
+//
+// myCustomResolver := func(service, region string, optFns ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) {
+// if service == endpoints.S3ServiceID {
+// return endpoints.ResolvedEndpoint{
+// URL: "s3.custom.endpoint.com",
+// SigningRegion: "custom-signing-region",
+// }, nil
+// }
+//
+// return endpoints.DefaultResolver().EndpointFor(service, region, optFns...)
+// }
+//
+// sess := session.Must(session.NewSession(&aws.Config{
+// Region: aws.String("us-west-2"),
+// EndpointResolver: endpoints.ResolverFunc(myCustomResolver),
+// }))
+package endpoints
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
new file mode 100644
index 000000000..a686a48fa
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
@@ -0,0 +1,708 @@
+package endpoints
+
+import (
+ "fmt"
+ "regexp"
+ "strings"
+
+ "github.com/aws/aws-sdk-go/aws/awserr"
+)
+
+// A Logger is a minimalistic interface for the SDK to log messages to.
+type Logger interface {
+ Log(...interface{})
+}
+
+// DualStackEndpointState is a constant to describe the dual-stack endpoint resolution
+// behavior.
+type DualStackEndpointState uint
+
+const (
+ // DualStackEndpointStateUnset is the default value behavior for dual-stack endpoint
+ // resolution.
+ DualStackEndpointStateUnset DualStackEndpointState = iota
+
+ // DualStackEndpointStateEnabled enable dual-stack endpoint resolution for endpoints.
+ DualStackEndpointStateEnabled
+
+ // DualStackEndpointStateDisabled disables dual-stack endpoint resolution for endpoints.
+ DualStackEndpointStateDisabled
+)
+
+// FIPSEndpointState is a constant to describe the FIPS endpoint resolution behavior.
+type FIPSEndpointState uint
+
+const (
+ // FIPSEndpointStateUnset is the default value behavior for FIPS endpoint resolution.
+ FIPSEndpointStateUnset FIPSEndpointState = iota
+
+ // FIPSEndpointStateEnabled enables FIPS endpoint resolution for service endpoints.
+ FIPSEndpointStateEnabled
+
+ // FIPSEndpointStateDisabled disables FIPS endpoint resolution for endpoints.
+ FIPSEndpointStateDisabled
+)
+
+// Options provide the configuration needed to direct how the
+// endpoints will be resolved.
+type Options struct {
+ // DisableSSL forces the endpoint to be resolved as HTTP.
+ // instead of HTTPS if the service supports it.
+ DisableSSL bool
+
+ // Sets the resolver to resolve the endpoint as a dualstack endpoint
+ // for the service. If dualstack support for a service is not known and
+ // StrictMatching is not enabled a dualstack endpoint for the service will
+ // be returned. This endpoint may not be valid. If StrictMatching is
+ // enabled only services that are known to support dualstack will return
+ // dualstack endpoints.
+ //
+ // Deprecated: This option will continue to function for S3 and S3 Control for backwards compatibility.
+ // UseDualStackEndpoint should be used to enable usage of a service's dual-stack endpoint for all service clients
+ // moving forward. For S3 and S3 Control, when UseDualStackEndpoint is set to a non-zero value it takes higher
+ // precedence then this option.
+ UseDualStack bool
+
+ // Sets the resolver to resolve a dual-stack endpoint for the service.
+ UseDualStackEndpoint DualStackEndpointState
+
+ // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
+ UseFIPSEndpoint FIPSEndpointState
+
+ // Enables strict matching of services and regions resolved endpoints.
+ // If the partition doesn't enumerate the exact service and region an
+ // error will be returned. This option will prevent returning endpoints
+ // that look valid, but may not resolve to any real endpoint.
+ StrictMatching bool
+
+ // Enables resolving a service endpoint based on the region provided if the
+ // service does not exist. The service endpoint ID will be used as the service
+ // domain name prefix. By default the endpoint resolver requires the service
+ // to be known when resolving endpoints.
+ //
+ // If resolving an endpoint on the partition list the provided region will
+ // be used to determine which partition's domain name pattern to the service
+ // endpoint ID with. If both the service and region are unknown and resolving
+ // the endpoint on partition list an UnknownEndpointError error will be returned.
+ //
+ // If resolving and endpoint on a partition specific resolver that partition's
+ // domain name pattern will be used with the service endpoint ID. If both
+ // region and service do not exist when resolving an endpoint on a specific
+ // partition the partition's domain pattern will be used to combine the
+ // endpoint and region together.
+ //
+ // This option is ignored if StrictMatching is enabled.
+ ResolveUnknownService bool
+
+ // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
+ EC2MetadataEndpointMode EC2IMDSEndpointModeState
+
+ // STS Regional Endpoint flag helps with resolving the STS endpoint
+ STSRegionalEndpoint STSRegionalEndpoint
+
+ // S3 Regional Endpoint flag helps with resolving the S3 endpoint
+ S3UsEast1RegionalEndpoint S3UsEast1RegionalEndpoint
+
+ // ResolvedRegion is the resolved region string. If provided (non-zero length) it takes priority
+ // over the region name passed to the ResolveEndpoint call.
+ ResolvedRegion string
+
+ // Logger is the logger that will be used to log messages.
+ Logger Logger
+
+ // Determines whether logging of deprecated endpoints usage is enabled.
+ LogDeprecated bool
+}
+
+func (o Options) getEndpointVariant(service string) (v endpointVariant) {
+ const s3 = "s3"
+ const s3Control = "s3-control"
+
+ if (o.UseDualStackEndpoint == DualStackEndpointStateEnabled) ||
+ ((service == s3 || service == s3Control) && (o.UseDualStackEndpoint == DualStackEndpointStateUnset && o.UseDualStack)) {
+ v |= dualStackVariant
+ }
+ if o.UseFIPSEndpoint == FIPSEndpointStateEnabled {
+ v |= fipsVariant
+ }
+ return v
+}
+
+// EC2IMDSEndpointModeState is an enum configuration variable describing the client endpoint mode.
+type EC2IMDSEndpointModeState uint
+
+// Enumeration values for EC2IMDSEndpointModeState
+const (
+ EC2IMDSEndpointModeStateUnset EC2IMDSEndpointModeState = iota
+ EC2IMDSEndpointModeStateIPv4
+ EC2IMDSEndpointModeStateIPv6
+)
+
+// SetFromString sets the EC2IMDSEndpointModeState based on the provided string value. Unknown values will default to EC2IMDSEndpointModeStateUnset
+func (e *EC2IMDSEndpointModeState) SetFromString(v string) error {
+ v = strings.TrimSpace(v)
+
+ switch {
+ case len(v) == 0:
+ *e = EC2IMDSEndpointModeStateUnset
+ case strings.EqualFold(v, "IPv6"):
+ *e = EC2IMDSEndpointModeStateIPv6
+ case strings.EqualFold(v, "IPv4"):
+ *e = EC2IMDSEndpointModeStateIPv4
+ default:
+ return fmt.Errorf("unknown EC2 IMDS endpoint mode, must be either IPv6 or IPv4")
+ }
+ return nil
+}
+
+// STSRegionalEndpoint is an enum for the states of the STS Regional Endpoint
+// options.
+type STSRegionalEndpoint int
+
+func (e STSRegionalEndpoint) String() string {
+ switch e {
+ case LegacySTSEndpoint:
+ return "legacy"
+ case RegionalSTSEndpoint:
+ return "regional"
+ case UnsetSTSEndpoint:
+ return ""
+ default:
+ return "unknown"
+ }
+}
+
+const (
+
+ // UnsetSTSEndpoint represents that STS Regional Endpoint flag is not specified.
+ UnsetSTSEndpoint STSRegionalEndpoint = iota
+
+ // LegacySTSEndpoint represents when STS Regional Endpoint flag is specified
+ // to use legacy endpoints.
+ LegacySTSEndpoint
+
+ // RegionalSTSEndpoint represents when STS Regional Endpoint flag is specified
+ // to use regional endpoints.
+ RegionalSTSEndpoint
+)
+
+// GetSTSRegionalEndpoint function returns the STSRegionalEndpointFlag based
+// on the input string provided in env config or shared config by the user.
+//
+// `legacy`, `regional` are the only case-insensitive valid strings for
+// resolving the STS regional Endpoint flag.
+func GetSTSRegionalEndpoint(s string) (STSRegionalEndpoint, error) {
+ switch {
+ case strings.EqualFold(s, "legacy"):
+ return LegacySTSEndpoint, nil
+ case strings.EqualFold(s, "regional"):
+ return RegionalSTSEndpoint, nil
+ default:
+ return UnsetSTSEndpoint, fmt.Errorf("unable to resolve the value of STSRegionalEndpoint for %v", s)
+ }
+}
+
+// S3UsEast1RegionalEndpoint is an enum for the states of the S3 us-east-1
+// Regional Endpoint options.
+type S3UsEast1RegionalEndpoint int
+
+func (e S3UsEast1RegionalEndpoint) String() string {
+ switch e {
+ case LegacyS3UsEast1Endpoint:
+ return "legacy"
+ case RegionalS3UsEast1Endpoint:
+ return "regional"
+ case UnsetS3UsEast1Endpoint:
+ return ""
+ default:
+ return "unknown"
+ }
+}
+
+const (
+
+ // UnsetS3UsEast1Endpoint represents that S3 Regional Endpoint flag is not
+ // specified.
+ UnsetS3UsEast1Endpoint S3UsEast1RegionalEndpoint = iota
+
+ // LegacyS3UsEast1Endpoint represents when S3 Regional Endpoint flag is
+ // specified to use legacy endpoints.
+ LegacyS3UsEast1Endpoint
+
+ // RegionalS3UsEast1Endpoint represents when S3 Regional Endpoint flag is
+ // specified to use regional endpoints.
+ RegionalS3UsEast1Endpoint
+)
+
+// GetS3UsEast1RegionalEndpoint function returns the S3UsEast1RegionalEndpointFlag based
+// on the input string provided in env config or shared config by the user.
+//
+// `legacy`, `regional` are the only case-insensitive valid strings for
+// resolving the S3 regional Endpoint flag.
+func GetS3UsEast1RegionalEndpoint(s string) (S3UsEast1RegionalEndpoint, error) {
+ switch {
+ case strings.EqualFold(s, "legacy"):
+ return LegacyS3UsEast1Endpoint, nil
+ case strings.EqualFold(s, "regional"):
+ return RegionalS3UsEast1Endpoint, nil
+ default:
+ return UnsetS3UsEast1Endpoint,
+ fmt.Errorf("unable to resolve the value of S3UsEast1RegionalEndpoint for %v", s)
+ }
+}
+
+// Set combines all of the option functions together.
+func (o *Options) Set(optFns ...func(*Options)) {
+ for _, fn := range optFns {
+ fn(o)
+ }
+}
+
+// DisableSSLOption sets the DisableSSL options. Can be used as a functional
+// option when resolving endpoints.
+func DisableSSLOption(o *Options) {
+ o.DisableSSL = true
+}
+
+// UseDualStackOption sets the UseDualStack option. Can be used as a functional
+// option when resolving endpoints.
+//
+// Deprecated: UseDualStackEndpointOption should be used to enable usage of a service's dual-stack endpoint.
+// When DualStackEndpointState is set to a non-zero value it takes higher precedence then this option.
+func UseDualStackOption(o *Options) {
+ o.UseDualStack = true
+}
+
+// UseDualStackEndpointOption sets the UseDualStackEndpoint option to enabled. Can be used as a functional
+// option when resolving endpoints.
+func UseDualStackEndpointOption(o *Options) {
+ o.UseDualStackEndpoint = DualStackEndpointStateEnabled
+}
+
+// UseFIPSEndpointOption sets the UseFIPSEndpoint option to enabled. Can be used as a functional
+// option when resolving endpoints.
+func UseFIPSEndpointOption(o *Options) {
+ o.UseFIPSEndpoint = FIPSEndpointStateEnabled
+}
+
+// StrictMatchingOption sets the StrictMatching option. Can be used as a functional
+// option when resolving endpoints.
+func StrictMatchingOption(o *Options) {
+ o.StrictMatching = true
+}
+
+// ResolveUnknownServiceOption sets the ResolveUnknownService option. Can be used
+// as a functional option when resolving endpoints.
+func ResolveUnknownServiceOption(o *Options) {
+ o.ResolveUnknownService = true
+}
+
+// STSRegionalEndpointOption enables the STS endpoint resolver behavior to resolve
+// STS endpoint to their regional endpoint, instead of the global endpoint.
+func STSRegionalEndpointOption(o *Options) {
+ o.STSRegionalEndpoint = RegionalSTSEndpoint
+}
+
+// A Resolver provides the interface for functionality to resolve endpoints.
+// The build in Partition and DefaultResolver return value satisfy this interface.
+type Resolver interface {
+ EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error)
+}
+
+// ResolverFunc is a helper utility that wraps a function so it satisfies the
+// Resolver interface. This is useful when you want to add additional endpoint
+// resolving logic, or stub out specific endpoints with custom values.
+type ResolverFunc func(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error)
+
+// EndpointFor wraps the ResolverFunc function to satisfy the Resolver interface.
+func (fn ResolverFunc) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
+ return fn(service, region, opts...)
+}
+
+var schemeRE = regexp.MustCompile("^([^:]+)://")
+
+// AddScheme adds the HTTP or HTTPS schemes to a endpoint URL if there is no
+// scheme. If disableSSL is true HTTP will set HTTP instead of the default HTTPS.
+//
+// If disableSSL is set, it will only set the URL's scheme if the URL does not
+// contain a scheme.
+func AddScheme(endpoint string, disableSSL bool) string {
+ if !schemeRE.MatchString(endpoint) {
+ scheme := "https"
+ if disableSSL {
+ scheme = "http"
+ }
+ endpoint = fmt.Sprintf("%s://%s", scheme, endpoint)
+ }
+
+ return endpoint
+}
+
+// EnumPartitions a provides a way to retrieve the underlying partitions that
+// make up the SDK's default Resolver, or any resolver decoded from a model
+// file.
+//
+// Use this interface with DefaultResolver and DecodeModels to get the list of
+// Partitions.
+type EnumPartitions interface {
+ Partitions() []Partition
+}
+
+// RegionsForService returns a map of regions for the partition and service.
+// If either the partition or service does not exist false will be returned
+// as the second parameter.
+//
+// This example shows how to get the regions for DynamoDB in the AWS partition.
+//
+// rs, exists := endpoints.RegionsForService(endpoints.DefaultPartitions(), endpoints.AwsPartitionID, endpoints.DynamodbServiceID)
+//
+// This is equivalent to using the partition directly.
+//
+// rs := endpoints.AwsPartition().Services()[endpoints.DynamodbServiceID].Regions()
+func RegionsForService(ps []Partition, partitionID, serviceID string) (map[string]Region, bool) {
+ for _, p := range ps {
+ if p.ID() != partitionID {
+ continue
+ }
+ if _, ok := p.p.Services[serviceID]; !(ok || serviceID == Ec2metadataServiceID) {
+ break
+ }
+
+ s := Service{
+ id: serviceID,
+ p: p.p,
+ }
+ return s.Regions(), true
+ }
+
+ return map[string]Region{}, false
+}
+
+// PartitionForRegion returns the first partition which includes the region
+// passed in. This includes both known regions and regions which match
+// a pattern supported by the partition which may include regions that are
+// not explicitly known by the partition. Use the Regions method of the
+// returned Partition if explicit support is needed.
+func PartitionForRegion(ps []Partition, regionID string) (Partition, bool) {
+ for _, p := range ps {
+ if _, ok := p.p.Regions[regionID]; ok || p.p.RegionRegex.MatchString(regionID) {
+ return p, true
+ }
+ }
+
+ return Partition{}, false
+}
+
+// A Partition provides the ability to enumerate the partition's regions
+// and services.
+type Partition struct {
+ id, dnsSuffix string
+ p *partition
+}
+
+// DNSSuffix returns the base domain name of the partition.
+func (p Partition) DNSSuffix() string { return p.dnsSuffix }
+
+// ID returns the identifier of the partition.
+func (p Partition) ID() string { return p.id }
+
+// EndpointFor attempts to resolve the endpoint based on service and region.
+// See Options for information on configuring how the endpoint is resolved.
+//
+// If the service cannot be found in the metadata the UnknownServiceError
+// error will be returned. This validation will occur regardless if
+// StrictMatching is enabled. To enable resolving unknown services set the
+// "ResolveUnknownService" option to true. When StrictMatching is disabled
+// this option allows the partition resolver to resolve a endpoint based on
+// the service endpoint ID provided.
+//
+// When resolving endpoints you can choose to enable StrictMatching. This will
+// require the provided service and region to be known by the partition.
+// If the endpoint cannot be strictly resolved an error will be returned. This
+// mode is useful to ensure the endpoint resolved is valid. Without
+// StrictMatching enabled the endpoint returned may look valid but may not work.
+// StrictMatching requires the SDK to be updated if you want to take advantage
+// of new regions and services expansions.
+//
+// Errors that can be returned.
+// - UnknownServiceError
+// - UnknownEndpointError
+func (p Partition) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
+ return p.p.EndpointFor(service, region, opts...)
+}
+
+// Regions returns a map of Regions indexed by their ID. This is useful for
+// enumerating over the regions in a partition.
+func (p Partition) Regions() map[string]Region {
+ rs := make(map[string]Region, len(p.p.Regions))
+ for id, r := range p.p.Regions {
+ rs[id] = Region{
+ id: id,
+ desc: r.Description,
+ p: p.p,
+ }
+ }
+
+ return rs
+}
+
+// Services returns a map of Service indexed by their ID. This is useful for
+// enumerating over the services in a partition.
+func (p Partition) Services() map[string]Service {
+ ss := make(map[string]Service, len(p.p.Services))
+
+ for id := range p.p.Services {
+ ss[id] = Service{
+ id: id,
+ p: p.p,
+ }
+ }
+
+ // Since we have removed the customization that injected this into the model
+ // we still need to pretend that this is a modeled service.
+ if _, ok := ss[Ec2metadataServiceID]; !ok {
+ ss[Ec2metadataServiceID] = Service{
+ id: Ec2metadataServiceID,
+ p: p.p,
+ }
+ }
+
+ return ss
+}
+
+// A Region provides information about a region, and ability to resolve an
+// endpoint from the context of a region, given a service.
+type Region struct {
+ id, desc string
+ p *partition
+}
+
+// ID returns the region's identifier.
+func (r Region) ID() string { return r.id }
+
+// Description returns the region's description. The region description
+// is free text, it can be empty, and it may change between SDK releases.
+func (r Region) Description() string { return r.desc }
+
+// ResolveEndpoint resolves an endpoint from the context of the region given
+// a service. See Partition.EndpointFor for usage and errors that can be returned.
+func (r Region) ResolveEndpoint(service string, opts ...func(*Options)) (ResolvedEndpoint, error) {
+ return r.p.EndpointFor(service, r.id, opts...)
+}
+
+// Services returns a list of all services that are known to be in this region.
+func (r Region) Services() map[string]Service {
+ ss := map[string]Service{}
+ for id, s := range r.p.Services {
+ if _, ok := s.Endpoints[endpointKey{Region: r.id}]; ok {
+ ss[id] = Service{
+ id: id,
+ p: r.p,
+ }
+ }
+ }
+
+ return ss
+}
+
+// A Service provides information about a service, and ability to resolve an
+// endpoint from the context of a service, given a region.
+type Service struct {
+ id string
+ p *partition
+}
+
+// ID returns the identifier for the service.
+func (s Service) ID() string { return s.id }
+
+// ResolveEndpoint resolves an endpoint from the context of a service given
+// a region. See Partition.EndpointFor for usage and errors that can be returned.
+func (s Service) ResolveEndpoint(region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
+ return s.p.EndpointFor(s.id, region, opts...)
+}
+
+// Regions returns a map of Regions that the service is present in.
+//
+// A region is the AWS region the service exists in. Whereas a Endpoint is
+// an URL that can be resolved to a instance of a service.
+func (s Service) Regions() map[string]Region {
+ rs := map[string]Region{}
+
+ service, ok := s.p.Services[s.id]
+
+ // Since ec2metadata customization has been removed we need to check
+ // if it was defined in non-standard endpoints.json file. If it's not
+ // then we can return the empty map as there is no regional-endpoints for IMDS.
+ // Otherwise, we iterate need to iterate the non-standard model.
+ if s.id == Ec2metadataServiceID && !ok {
+ return rs
+ }
+
+ for id := range service.Endpoints {
+ if id.Variant != 0 {
+ continue
+ }
+ if r, ok := s.p.Regions[id.Region]; ok {
+ rs[id.Region] = Region{
+ id: id.Region,
+ desc: r.Description,
+ p: s.p,
+ }
+ }
+ }
+
+ return rs
+}
+
+// Endpoints returns a map of Endpoints indexed by their ID for all known
+// endpoints for a service.
+//
+// A region is the AWS region the service exists in. Whereas a Endpoint is
+// an URL that can be resolved to a instance of a service.
+func (s Service) Endpoints() map[string]Endpoint {
+ es := make(map[string]Endpoint, len(s.p.Services[s.id].Endpoints))
+ for id := range s.p.Services[s.id].Endpoints {
+ if id.Variant != 0 {
+ continue
+ }
+ es[id.Region] = Endpoint{
+ id: id.Region,
+ serviceID: s.id,
+ p: s.p,
+ }
+ }
+
+ return es
+}
+
+// A Endpoint provides information about endpoints, and provides the ability
+// to resolve that endpoint for the service, and the region the endpoint
+// represents.
+type Endpoint struct {
+ id string
+ serviceID string
+ p *partition
+}
+
+// ID returns the identifier for an endpoint.
+func (e Endpoint) ID() string { return e.id }
+
+// ServiceID returns the identifier the endpoint belongs to.
+func (e Endpoint) ServiceID() string { return e.serviceID }
+
+// ResolveEndpoint resolves an endpoint from the context of a service and
+// region the endpoint represents. See Partition.EndpointFor for usage and
+// errors that can be returned.
+func (e Endpoint) ResolveEndpoint(opts ...func(*Options)) (ResolvedEndpoint, error) {
+ return e.p.EndpointFor(e.serviceID, e.id, opts...)
+}
+
+// A ResolvedEndpoint is an endpoint that has been resolved based on a partition
+// service, and region.
+type ResolvedEndpoint struct {
+ // The endpoint URL
+ URL string
+
+ // The endpoint partition
+ PartitionID string
+
+ // The region that should be used for signing requests.
+ SigningRegion string
+
+ // The service name that should be used for signing requests.
+ SigningName string
+
+ // States that the signing name for this endpoint was derived from metadata
+ // passed in, but was not explicitly modeled.
+ SigningNameDerived bool
+
+ // The signing method that should be used for signing requests.
+ SigningMethod string
+}
+
+// So that the Error interface type can be included as an anonymous field
+// in the requestError struct and not conflict with the error.Error() method.
+type awsError awserr.Error
+
+// A EndpointNotFoundError is returned when in StrictMatching mode, and the
+// endpoint for the service and region cannot be found in any of the partitions.
+type EndpointNotFoundError struct {
+ awsError
+ Partition string
+ Service string
+ Region string
+}
+
+// A UnknownServiceError is returned when the service does not resolve to an
+// endpoint. Includes a list of all known services for the partition. Returned
+// when a partition does not support the service.
+type UnknownServiceError struct {
+ awsError
+ Partition string
+ Service string
+ Known []string
+}
+
+// NewUnknownServiceError builds and returns UnknownServiceError.
+func NewUnknownServiceError(p, s string, known []string) UnknownServiceError {
+ return UnknownServiceError{
+ awsError: awserr.New("UnknownServiceError",
+ "could not resolve endpoint for unknown service", nil),
+ Partition: p,
+ Service: s,
+ Known: known,
+ }
+}
+
+// String returns the string representation of the error.
+func (e UnknownServiceError) Error() string {
+ extra := fmt.Sprintf("partition: %q, service: %q",
+ e.Partition, e.Service)
+ if len(e.Known) > 0 {
+ extra += fmt.Sprintf(", known: %v", e.Known)
+ }
+ return awserr.SprintError(e.Code(), e.Message(), extra, e.OrigErr())
+}
+
+// String returns the string representation of the error.
+func (e UnknownServiceError) String() string {
+ return e.Error()
+}
+
+// A UnknownEndpointError is returned when in StrictMatching mode and the
+// service is valid, but the region does not resolve to an endpoint. Includes
+// a list of all known endpoints for the service.
+type UnknownEndpointError struct {
+ awsError
+ Partition string
+ Service string
+ Region string
+ Known []string
+}
+
+// NewUnknownEndpointError builds and returns UnknownEndpointError.
+func NewUnknownEndpointError(p, s, r string, known []string) UnknownEndpointError {
+ return UnknownEndpointError{
+ awsError: awserr.New("UnknownEndpointError",
+ "could not resolve endpoint", nil),
+ Partition: p,
+ Service: s,
+ Region: r,
+ Known: known,
+ }
+}
+
+// String returns the string representation of the error.
+func (e UnknownEndpointError) Error() string {
+ extra := fmt.Sprintf("partition: %q, service: %q, region: %q",
+ e.Partition, e.Service, e.Region)
+ if len(e.Known) > 0 {
+ extra += fmt.Sprintf(", known: %v", e.Known)
+ }
+ return awserr.SprintError(e.Code(), e.Message(), extra, e.OrigErr())
+}
+
+// String returns the string representation of the error.
+func (e UnknownEndpointError) String() string {
+ return e.Error()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/legacy_regions.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/legacy_regions.go
new file mode 100644
index 000000000..df75e899a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/legacy_regions.go
@@ -0,0 +1,24 @@
+package endpoints
+
+var legacyGlobalRegions = map[string]map[string]struct{}{
+ "sts": {
+ "ap-northeast-1": {},
+ "ap-south-1": {},
+ "ap-southeast-1": {},
+ "ap-southeast-2": {},
+ "ca-central-1": {},
+ "eu-central-1": {},
+ "eu-north-1": {},
+ "eu-west-1": {},
+ "eu-west-2": {},
+ "eu-west-3": {},
+ "sa-east-1": {},
+ "us-east-1": {},
+ "us-east-2": {},
+ "us-west-1": {},
+ "us-west-2": {},
+ },
+ "s3": {
+ "us-east-1": {},
+ },
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go
new file mode 100644
index 000000000..89f6627dc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go
@@ -0,0 +1,594 @@
+package endpoints
+
+import (
+ "encoding/json"
+ "fmt"
+ "regexp"
+ "strconv"
+ "strings"
+)
+
+const (
+ ec2MetadataEndpointIPv6 = "http://[fd00:ec2::254]/latest"
+ ec2MetadataEndpointIPv4 = "http://169.254.169.254/latest"
+)
+
+const dnsSuffixTemplateKey = "{dnsSuffix}"
+
+// defaultKey is a compound map key of a variant and other values.
+type defaultKey struct {
+ Variant endpointVariant
+ ServiceVariant serviceVariant
+}
+
+// endpointKey is a compound map key of a region and associated variant value.
+type endpointKey struct {
+ Region string
+ Variant endpointVariant
+}
+
+// endpointVariant is a bit field to describe the endpoints attributes.
+type endpointVariant uint64
+
+// serviceVariant is a bit field to describe the service endpoint attributes.
+type serviceVariant uint64
+
+const (
+ // fipsVariant indicates that the endpoint is FIPS capable.
+ fipsVariant endpointVariant = 1 << (64 - 1 - iota)
+
+ // dualStackVariant indicates that the endpoint is DualStack capable.
+ dualStackVariant
+)
+
+var regionValidationRegex = regexp.MustCompile(`^[[:alnum:]]([[:alnum:]\-]*[[:alnum:]])?$`)
+
+type partitions []partition
+
+func (ps partitions) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
+ var opt Options
+ opt.Set(opts...)
+
+ if len(opt.ResolvedRegion) > 0 {
+ region = opt.ResolvedRegion
+ }
+
+ for i := 0; i < len(ps); i++ {
+ if !ps[i].canResolveEndpoint(service, region, opt) {
+ continue
+ }
+
+ return ps[i].EndpointFor(service, region, opts...)
+ }
+
+ // If loose matching fallback to first partition format to use
+ // when resolving the endpoint.
+ if !opt.StrictMatching && len(ps) > 0 {
+ return ps[0].EndpointFor(service, region, opts...)
+ }
+
+ return ResolvedEndpoint{}, NewUnknownEndpointError("all partitions", service, region, []string{})
+}
+
+// Partitions satisfies the EnumPartitions interface and returns a list
+// of Partitions representing each partition represented in the SDK's
+// endpoints model.
+func (ps partitions) Partitions() []Partition {
+ parts := make([]Partition, 0, len(ps))
+ for i := 0; i < len(ps); i++ {
+ parts = append(parts, ps[i].Partition())
+ }
+
+ return parts
+}
+
+type endpointWithVariants struct {
+ endpoint
+ Variants []endpointWithTags `json:"variants"`
+}
+
+type endpointWithTags struct {
+ endpoint
+ Tags []string `json:"tags"`
+}
+
+type endpointDefaults map[defaultKey]endpoint
+
+func (p *endpointDefaults) UnmarshalJSON(data []byte) error {
+ if *p == nil {
+ *p = make(endpointDefaults)
+ }
+
+ var e endpointWithVariants
+ if err := json.Unmarshal(data, &e); err != nil {
+ return err
+ }
+
+ (*p)[defaultKey{Variant: 0}] = e.endpoint
+
+ e.Hostname = ""
+ e.DNSSuffix = ""
+
+ for _, variant := range e.Variants {
+ endpointVariant, unknown := parseVariantTags(variant.Tags)
+ if unknown {
+ continue
+ }
+
+ var ve endpoint
+ ve.mergeIn(e.endpoint)
+ ve.mergeIn(variant.endpoint)
+
+ (*p)[defaultKey{Variant: endpointVariant}] = ve
+ }
+
+ return nil
+}
+
+func parseVariantTags(tags []string) (ev endpointVariant, unknown bool) {
+ if len(tags) == 0 {
+ unknown = true
+ return
+ }
+
+ for _, tag := range tags {
+ switch {
+ case strings.EqualFold("fips", tag):
+ ev |= fipsVariant
+ case strings.EqualFold("dualstack", tag):
+ ev |= dualStackVariant
+ default:
+ unknown = true
+ }
+ }
+ return ev, unknown
+}
+
+type partition struct {
+ ID string `json:"partition"`
+ Name string `json:"partitionName"`
+ DNSSuffix string `json:"dnsSuffix"`
+ RegionRegex regionRegex `json:"regionRegex"`
+ Defaults endpointDefaults `json:"defaults"`
+ Regions regions `json:"regions"`
+ Services services `json:"services"`
+}
+
+func (p partition) Partition() Partition {
+ return Partition{
+ dnsSuffix: p.DNSSuffix,
+ id: p.ID,
+ p: &p,
+ }
+}
+
+func (p partition) canResolveEndpoint(service, region string, options Options) bool {
+ s, hasService := p.Services[service]
+ _, hasEndpoint := s.Endpoints[endpointKey{
+ Region: region,
+ Variant: options.getEndpointVariant(service),
+ }]
+
+ if hasEndpoint && hasService {
+ return true
+ }
+
+ if options.StrictMatching {
+ return false
+ }
+
+ return p.RegionRegex.MatchString(region)
+}
+
+func allowLegacyEmptyRegion(service string) bool {
+ legacy := map[string]struct{}{
+ "budgets": {},
+ "ce": {},
+ "chime": {},
+ "cloudfront": {},
+ "ec2metadata": {},
+ "iam": {},
+ "importexport": {},
+ "organizations": {},
+ "route53": {},
+ "sts": {},
+ "support": {},
+ "waf": {},
+ }
+
+ _, allowed := legacy[service]
+ return allowed
+}
+
+func (p partition) EndpointFor(service, region string, opts ...func(*Options)) (resolved ResolvedEndpoint, err error) {
+ var opt Options
+ opt.Set(opts...)
+
+ if len(opt.ResolvedRegion) > 0 {
+ region = opt.ResolvedRegion
+ }
+
+ s, hasService := p.Services[service]
+
+ if service == Ec2metadataServiceID && !hasService {
+ endpoint := getEC2MetadataEndpoint(p.ID, service, opt.EC2MetadataEndpointMode)
+ return endpoint, nil
+ }
+
+ if len(service) == 0 || !(hasService || opt.ResolveUnknownService) {
+ // Only return error if the resolver will not fallback to creating
+ // endpoint based on service endpoint ID passed in.
+ return resolved, NewUnknownServiceError(p.ID, service, serviceList(p.Services))
+ }
+
+ if len(region) == 0 && allowLegacyEmptyRegion(service) && len(s.PartitionEndpoint) != 0 {
+ region = s.PartitionEndpoint
+ }
+
+ if r, ok := isLegacyGlobalRegion(service, region, opt); ok {
+ region = r
+ }
+
+ variant := opt.getEndpointVariant(service)
+
+ endpoints := s.Endpoints
+
+ serviceDefaults, hasServiceDefault := s.Defaults[defaultKey{Variant: variant}]
+ // If we searched for a variant which may have no explicit service defaults,
+ // then we need to inherit the standard service defaults except the hostname and dnsSuffix
+ if variant != 0 && !hasServiceDefault {
+ serviceDefaults = s.Defaults[defaultKey{}]
+ serviceDefaults.Hostname = ""
+ serviceDefaults.DNSSuffix = ""
+ }
+
+ partitionDefaults, hasPartitionDefault := p.Defaults[defaultKey{Variant: variant}]
+
+ var dnsSuffix string
+ if len(serviceDefaults.DNSSuffix) > 0 {
+ dnsSuffix = serviceDefaults.DNSSuffix
+ } else if variant == 0 {
+ // For legacy reasons the partition dnsSuffix is not in the defaults, so if we looked for
+ // a non-variant endpoint then we need to set the dnsSuffix.
+ dnsSuffix = p.DNSSuffix
+ }
+
+ noDefaults := !hasServiceDefault && !hasPartitionDefault
+
+ e, hasEndpoint := s.endpointForRegion(region, endpoints, variant)
+ if len(region) == 0 || (!hasEndpoint && (opt.StrictMatching || noDefaults)) {
+ return resolved, NewUnknownEndpointError(p.ID, service, region, endpointList(endpoints, variant))
+ }
+
+ defs := []endpoint{partitionDefaults, serviceDefaults}
+
+ return e.resolve(service, p.ID, region, dnsSuffixTemplateKey, dnsSuffix, defs, opt)
+}
+
+func getEC2MetadataEndpoint(partitionID, service string, mode EC2IMDSEndpointModeState) ResolvedEndpoint {
+ switch mode {
+ case EC2IMDSEndpointModeStateIPv6:
+ return ResolvedEndpoint{
+ URL: ec2MetadataEndpointIPv6,
+ PartitionID: partitionID,
+ SigningRegion: "aws-global",
+ SigningName: service,
+ SigningNameDerived: true,
+ SigningMethod: "v4",
+ }
+ case EC2IMDSEndpointModeStateIPv4:
+ fallthrough
+ default:
+ return ResolvedEndpoint{
+ URL: ec2MetadataEndpointIPv4,
+ PartitionID: partitionID,
+ SigningRegion: "aws-global",
+ SigningName: service,
+ SigningNameDerived: true,
+ SigningMethod: "v4",
+ }
+ }
+}
+
+func isLegacyGlobalRegion(service string, region string, opt Options) (string, bool) {
+ if opt.getEndpointVariant(service) != 0 {
+ return "", false
+ }
+
+ const (
+ sts = "sts"
+ s3 = "s3"
+ awsGlobal = "aws-global"
+ )
+
+ switch {
+ case service == sts && opt.STSRegionalEndpoint == RegionalSTSEndpoint:
+ return region, false
+ case service == s3 && opt.S3UsEast1RegionalEndpoint == RegionalS3UsEast1Endpoint:
+ return region, false
+ default:
+ if _, ok := legacyGlobalRegions[service][region]; ok {
+ return awsGlobal, true
+ }
+ }
+
+ return region, false
+}
+
+func serviceList(ss services) []string {
+ list := make([]string, 0, len(ss))
+ for k := range ss {
+ list = append(list, k)
+ }
+ return list
+}
+func endpointList(es serviceEndpoints, variant endpointVariant) []string {
+ list := make([]string, 0, len(es))
+ for k := range es {
+ if k.Variant != variant {
+ continue
+ }
+ list = append(list, k.Region)
+ }
+ return list
+}
+
+type regionRegex struct {
+ *regexp.Regexp
+}
+
+func (rr *regionRegex) UnmarshalJSON(b []byte) (err error) {
+ // Strip leading and trailing quotes
+ regex, err := strconv.Unquote(string(b))
+ if err != nil {
+ return fmt.Errorf("unable to strip quotes from regex, %v", err)
+ }
+
+ rr.Regexp, err = regexp.Compile(regex)
+ if err != nil {
+ return fmt.Errorf("unable to unmarshal region regex, %v", err)
+ }
+ return nil
+}
+
+type regions map[string]region
+
+type region struct {
+ Description string `json:"description"`
+}
+
+type services map[string]service
+
+type service struct {
+ PartitionEndpoint string `json:"partitionEndpoint"`
+ IsRegionalized boxedBool `json:"isRegionalized,omitempty"`
+ Defaults endpointDefaults `json:"defaults"`
+ Endpoints serviceEndpoints `json:"endpoints"`
+}
+
+func (s *service) endpointForRegion(region string, endpoints serviceEndpoints, variant endpointVariant) (endpoint, bool) {
+ if e, ok := endpoints[endpointKey{Region: region, Variant: variant}]; ok {
+ return e, true
+ }
+
+ if s.IsRegionalized == boxedFalse {
+ return endpoints[endpointKey{Region: s.PartitionEndpoint, Variant: variant}], region == s.PartitionEndpoint
+ }
+
+ // Unable to find any matching endpoint, return
+ // blank that will be used for generic endpoint creation.
+ return endpoint{}, false
+}
+
+type serviceEndpoints map[endpointKey]endpoint
+
+func (s *serviceEndpoints) UnmarshalJSON(data []byte) error {
+ if *s == nil {
+ *s = make(serviceEndpoints)
+ }
+
+ var regionToEndpoint map[string]endpointWithVariants
+
+ if err := json.Unmarshal(data, ®ionToEndpoint); err != nil {
+ return err
+ }
+
+ for region, e := range regionToEndpoint {
+ (*s)[endpointKey{Region: region}] = e.endpoint
+
+ e.Hostname = ""
+ e.DNSSuffix = ""
+
+ for _, variant := range e.Variants {
+ endpointVariant, unknown := parseVariantTags(variant.Tags)
+ if unknown {
+ continue
+ }
+
+ var ve endpoint
+ ve.mergeIn(e.endpoint)
+ ve.mergeIn(variant.endpoint)
+
+ (*s)[endpointKey{Region: region, Variant: endpointVariant}] = ve
+ }
+ }
+
+ return nil
+}
+
+type endpoint struct {
+ Hostname string `json:"hostname"`
+ Protocols []string `json:"protocols"`
+ CredentialScope credentialScope `json:"credentialScope"`
+
+ DNSSuffix string `json:"dnsSuffix"`
+
+ // Signature Version not used
+ SignatureVersions []string `json:"signatureVersions"`
+
+ // SSLCommonName not used.
+ SSLCommonName string `json:"sslCommonName"`
+
+ Deprecated boxedBool `json:"deprecated"`
+}
+
+// isZero returns whether the endpoint structure is an empty (zero) value.
+func (e endpoint) isZero() bool {
+ switch {
+ case len(e.Hostname) != 0:
+ return false
+ case len(e.Protocols) != 0:
+ return false
+ case e.CredentialScope != (credentialScope{}):
+ return false
+ case len(e.SignatureVersions) != 0:
+ return false
+ case len(e.SSLCommonName) != 0:
+ return false
+ }
+ return true
+}
+
+const (
+ defaultProtocol = "https"
+ defaultSigner = "v4"
+)
+
+var (
+ protocolPriority = []string{"https", "http"}
+ signerPriority = []string{"v4", "v2"}
+)
+
+func getByPriority(s []string, p []string, def string) string {
+ if len(s) == 0 {
+ return def
+ }
+
+ for i := 0; i < len(p); i++ {
+ for j := 0; j < len(s); j++ {
+ if s[j] == p[i] {
+ return s[j]
+ }
+ }
+ }
+
+ return s[0]
+}
+
+func (e endpoint) resolve(service, partitionID, region, dnsSuffixTemplateVariable, dnsSuffix string, defs []endpoint, opts Options) (ResolvedEndpoint, error) {
+ var merged endpoint
+ for _, def := range defs {
+ merged.mergeIn(def)
+ }
+ merged.mergeIn(e)
+ e = merged
+
+ signingRegion := e.CredentialScope.Region
+ if len(signingRegion) == 0 {
+ signingRegion = region
+ }
+
+ signingName := e.CredentialScope.Service
+ var signingNameDerived bool
+ if len(signingName) == 0 {
+ signingName = service
+ signingNameDerived = true
+ }
+
+ hostname := e.Hostname
+
+ if !validateInputRegion(region) {
+ return ResolvedEndpoint{}, fmt.Errorf("invalid region identifier format provided")
+ }
+
+ if len(merged.DNSSuffix) > 0 {
+ dnsSuffix = merged.DNSSuffix
+ }
+
+ u := strings.Replace(hostname, "{service}", service, 1)
+ u = strings.Replace(u, "{region}", region, 1)
+ u = strings.Replace(u, dnsSuffixTemplateVariable, dnsSuffix, 1)
+
+ scheme := getEndpointScheme(e.Protocols, opts.DisableSSL)
+ u = fmt.Sprintf("%s://%s", scheme, u)
+
+ if e.Deprecated == boxedTrue && opts.LogDeprecated && opts.Logger != nil {
+ opts.Logger.Log(fmt.Sprintf("endpoint identifier %q, url %q marked as deprecated", region, u))
+ }
+
+ return ResolvedEndpoint{
+ URL: u,
+ PartitionID: partitionID,
+ SigningRegion: signingRegion,
+ SigningName: signingName,
+ SigningNameDerived: signingNameDerived,
+ SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner),
+ }, nil
+}
+
+func getEndpointScheme(protocols []string, disableSSL bool) string {
+ if disableSSL {
+ return "http"
+ }
+
+ return getByPriority(protocols, protocolPriority, defaultProtocol)
+}
+
+func (e *endpoint) mergeIn(other endpoint) {
+ if len(other.Hostname) > 0 {
+ e.Hostname = other.Hostname
+ }
+ if len(other.Protocols) > 0 {
+ e.Protocols = other.Protocols
+ }
+ if len(other.SignatureVersions) > 0 {
+ e.SignatureVersions = other.SignatureVersions
+ }
+ if len(other.CredentialScope.Region) > 0 {
+ e.CredentialScope.Region = other.CredentialScope.Region
+ }
+ if len(other.CredentialScope.Service) > 0 {
+ e.CredentialScope.Service = other.CredentialScope.Service
+ }
+ if len(other.SSLCommonName) > 0 {
+ e.SSLCommonName = other.SSLCommonName
+ }
+ if len(other.DNSSuffix) > 0 {
+ e.DNSSuffix = other.DNSSuffix
+ }
+ if other.Deprecated != boxedBoolUnset {
+ e.Deprecated = other.Deprecated
+ }
+}
+
+type credentialScope struct {
+ Region string `json:"region"`
+ Service string `json:"service"`
+}
+
+type boxedBool int
+
+func (b *boxedBool) UnmarshalJSON(buf []byte) error {
+ v, err := strconv.ParseBool(string(buf))
+ if err != nil {
+ return err
+ }
+
+ if v {
+ *b = boxedTrue
+ } else {
+ *b = boxedFalse
+ }
+
+ return nil
+}
+
+const (
+ boxedBoolUnset boxedBool = iota
+ boxedFalse
+ boxedTrue
+)
+
+func validateInputRegion(region string) bool {
+ return regionValidationRegex.MatchString(region)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
new file mode 100644
index 000000000..84922bca8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
@@ -0,0 +1,412 @@
+//go:build codegen
+// +build codegen
+
+package endpoints
+
+import (
+ "fmt"
+ "io"
+ "reflect"
+ "strings"
+ "text/template"
+ "unicode"
+)
+
+// A CodeGenOptions are the options for code generating the endpoints into
+// Go code from the endpoints model definition.
+type CodeGenOptions struct {
+ // Options for how the model will be decoded.
+ DecodeModelOptions DecodeModelOptions
+
+ // Disables code generation of the service endpoint prefix IDs defined in
+ // the model.
+ DisableGenerateServiceIDs bool
+}
+
+// Set combines all of the option functions together
+func (d *CodeGenOptions) Set(optFns ...func(*CodeGenOptions)) {
+ for _, fn := range optFns {
+ fn(d)
+ }
+}
+
+// CodeGenModel given a endpoints model file will decode it and attempt to
+// generate Go code from the model definition. Error will be returned if
+// the code is unable to be generated, or decoded.
+func CodeGenModel(modelFile io.Reader, outFile io.Writer, optFns ...func(*CodeGenOptions)) error {
+ var opts CodeGenOptions
+ opts.Set(optFns...)
+
+ resolver, err := DecodeModel(modelFile, func(d *DecodeModelOptions) {
+ *d = opts.DecodeModelOptions
+ })
+ if err != nil {
+ return err
+ }
+
+ v := struct {
+ Resolver
+ CodeGenOptions
+ }{
+ Resolver: resolver,
+ CodeGenOptions: opts,
+ }
+
+ tmpl := template.Must(template.New("tmpl").Funcs(funcMap).Parse(v3Tmpl))
+ if err := tmpl.ExecuteTemplate(outFile, "defaults", v); err != nil {
+ return fmt.Errorf("failed to execute template, %v", err)
+ }
+
+ return nil
+}
+
+func toSymbol(v string) string {
+ out := []rune{}
+ for _, c := range strings.Title(v) {
+ if !(unicode.IsNumber(c) || unicode.IsLetter(c)) {
+ continue
+ }
+
+ out = append(out, c)
+ }
+
+ return string(out)
+}
+
+func quoteString(v string) string {
+ return fmt.Sprintf("%q", v)
+}
+
+func regionConstName(p, r string) string {
+ return toSymbol(p) + toSymbol(r)
+}
+
+func partitionGetter(id string) string {
+ return fmt.Sprintf("%sPartition", toSymbol(id))
+}
+
+func partitionVarName(id string) string {
+ return fmt.Sprintf("%sPartition", strings.ToLower(toSymbol(id)))
+}
+
+func listPartitionNames(ps partitions) string {
+ names := []string{}
+ switch len(ps) {
+ case 1:
+ return ps[0].Name
+ case 2:
+ return fmt.Sprintf("%s and %s", ps[0].Name, ps[1].Name)
+ default:
+ for i, p := range ps {
+ if i == len(ps)-1 {
+ names = append(names, "and "+p.Name)
+ } else {
+ names = append(names, p.Name)
+ }
+ }
+ return strings.Join(names, ", ")
+ }
+}
+
+func boxedBoolIfSet(msg string, v boxedBool) string {
+ switch v {
+ case boxedTrue:
+ return fmt.Sprintf(msg, "boxedTrue")
+ case boxedFalse:
+ return fmt.Sprintf(msg, "boxedFalse")
+ default:
+ return ""
+ }
+}
+
+func stringIfSet(msg, v string) string {
+ if len(v) == 0 {
+ return ""
+ }
+
+ return fmt.Sprintf(msg, v)
+}
+
+func stringSliceIfSet(msg string, vs []string) string {
+ if len(vs) == 0 {
+ return ""
+ }
+
+ names := []string{}
+ for _, v := range vs {
+ names = append(names, `"`+v+`"`)
+ }
+
+ return fmt.Sprintf(msg, strings.Join(names, ","))
+}
+
+func endpointIsSet(v endpoint) bool {
+ return !reflect.DeepEqual(v, endpoint{})
+}
+
+func serviceSet(ps partitions) map[string]struct{} {
+ set := map[string]struct{}{}
+ for _, p := range ps {
+ for id := range p.Services {
+ set[id] = struct{}{}
+ }
+ }
+
+ return set
+}
+
+func endpointVariantSetter(variant endpointVariant) (string, error) {
+ if variant == 0 {
+ return "0", nil
+ }
+
+ if variant > (fipsVariant | dualStackVariant) {
+ return "", fmt.Errorf("unknown endpoint variant")
+ }
+
+ var symbols []string
+ if variant&fipsVariant != 0 {
+ symbols = append(symbols, "fipsVariant")
+ }
+ if variant&dualStackVariant != 0 {
+ symbols = append(symbols, "dualStackVariant")
+ }
+ v := strings.Join(symbols, "|")
+
+ return v, nil
+}
+
+func endpointKeySetter(e endpointKey) (string, error) {
+ var sb strings.Builder
+ sb.WriteString("endpointKey{\n")
+ sb.WriteString(fmt.Sprintf("Region: %q,\n", e.Region))
+ if e.Variant != 0 {
+ variantSetter, err := endpointVariantSetter(e.Variant)
+ if err != nil {
+ return "", err
+ }
+ sb.WriteString(fmt.Sprintf("Variant: %s,\n", variantSetter))
+ }
+ sb.WriteString("}")
+ return sb.String(), nil
+}
+
+func defaultKeySetter(e defaultKey) (string, error) {
+ var sb strings.Builder
+ sb.WriteString("defaultKey{\n")
+ if e.Variant != 0 {
+ variantSetter, err := endpointVariantSetter(e.Variant)
+ if err != nil {
+ return "", err
+ }
+ sb.WriteString(fmt.Sprintf("Variant: %s,\n", variantSetter))
+ }
+ sb.WriteString("}")
+ return sb.String(), nil
+}
+
+var funcMap = template.FuncMap{
+ "ToSymbol": toSymbol,
+ "QuoteString": quoteString,
+ "RegionConst": regionConstName,
+ "PartitionGetter": partitionGetter,
+ "PartitionVarName": partitionVarName,
+ "ListPartitionNames": listPartitionNames,
+ "BoxedBoolIfSet": boxedBoolIfSet,
+ "StringIfSet": stringIfSet,
+ "StringSliceIfSet": stringSliceIfSet,
+ "EndpointIsSet": endpointIsSet,
+ "ServicesSet": serviceSet,
+ "EndpointVariantSetter": endpointVariantSetter,
+ "EndpointKeySetter": endpointKeySetter,
+ "DefaultKeySetter": defaultKeySetter,
+}
+
+const v3Tmpl = `
+{{ define "defaults" -}}
+// Code generated by aws/endpoints/v3model_codegen.go. DO NOT EDIT.
+
+package endpoints
+
+import (
+ "regexp"
+)
+
+ {{ template "partition consts" $.Resolver }}
+
+ {{ range $_, $partition := $.Resolver }}
+ {{ template "partition region consts" $partition }}
+ {{ end }}
+
+ {{ if not $.DisableGenerateServiceIDs -}}
+ {{ template "service consts" $.Resolver }}
+ {{- end }}
+
+ {{ template "endpoint resolvers" $.Resolver }}
+{{- end }}
+
+{{ define "partition consts" }}
+ // Partition identifiers
+ const (
+ {{ range $_, $p := . -}}
+ {{ ToSymbol $p.ID }}PartitionID = {{ QuoteString $p.ID }} // {{ $p.Name }} partition.
+ {{ end -}}
+ )
+{{- end }}
+
+{{ define "partition region consts" }}
+ // {{ .Name }} partition's regions.
+ const (
+ {{ range $id, $region := .Regions -}}
+ {{ ToSymbol $id }}RegionID = {{ QuoteString $id }} // {{ $region.Description }}.
+ {{ end -}}
+ )
+{{- end }}
+
+{{ define "service consts" }}
+ // Service identifiers
+ const (
+ {{ $serviceSet := ServicesSet . -}}
+ {{ range $id, $_ := $serviceSet -}}
+ {{ ToSymbol $id }}ServiceID = {{ QuoteString $id }} // {{ ToSymbol $id }}.
+ {{ end -}}
+ )
+{{- end }}
+
+{{ define "endpoint resolvers" }}
+ // DefaultResolver returns an Endpoint resolver that will be able
+ // to resolve endpoints for: {{ ListPartitionNames . }}.
+ //
+ // Use DefaultPartitions() to get the list of the default partitions.
+ func DefaultResolver() Resolver {
+ return defaultPartitions
+ }
+
+ // DefaultPartitions returns a list of the partitions the SDK is bundled
+ // with. The available partitions are: {{ ListPartitionNames . }}.
+ //
+ // partitions := endpoints.DefaultPartitions
+ // for _, p := range partitions {
+ // // ... inspect partitions
+ // }
+ func DefaultPartitions() []Partition {
+ return defaultPartitions.Partitions()
+ }
+
+ var defaultPartitions = partitions{
+ {{ range $_, $partition := . -}}
+ {{ PartitionVarName $partition.ID }},
+ {{ end }}
+ }
+
+ {{ range $_, $partition := . -}}
+ {{ $name := PartitionGetter $partition.ID -}}
+ // {{ $name }} returns the Resolver for {{ $partition.Name }}.
+ func {{ $name }}() Partition {
+ return {{ PartitionVarName $partition.ID }}.Partition()
+ }
+ var {{ PartitionVarName $partition.ID }} = {{ template "gocode Partition" $partition }}
+ {{ end }}
+{{ end }}
+
+{{ define "default partitions" }}
+ func DefaultPartitions() []Partition {
+ return []partition{
+ {{ range $_, $partition := . -}}
+ // {{ ToSymbol $partition.ID}}Partition(),
+ {{ end }}
+ }
+ }
+{{ end }}
+
+{{ define "gocode Partition" -}}
+partition{
+ {{ StringIfSet "ID: %q,\n" .ID -}}
+ {{ StringIfSet "Name: %q,\n" .Name -}}
+ {{ StringIfSet "DNSSuffix: %q,\n" .DNSSuffix -}}
+ RegionRegex: {{ template "gocode RegionRegex" .RegionRegex }},
+ {{ if (gt (len .Defaults) 0) -}}
+ Defaults: {{ template "gocode Defaults" .Defaults -}},
+ {{ end -}}
+ Regions: {{ template "gocode Regions" .Regions }},
+ Services: {{ template "gocode Services" .Services }},
+}
+{{- end }}
+
+{{ define "gocode RegionRegex" -}}
+regionRegex{
+ Regexp: func() *regexp.Regexp{
+ reg, _ := regexp.Compile({{ QuoteString .Regexp.String }})
+ return reg
+ }(),
+}
+{{- end }}
+
+{{ define "gocode Regions" -}}
+regions{
+ {{ range $id, $region := . -}}
+ "{{ $id }}": {{ template "gocode Region" $region }},
+ {{ end -}}
+}
+{{- end }}
+
+{{ define "gocode Region" -}}
+region{
+ {{ StringIfSet "Description: %q,\n" .Description -}}
+}
+{{- end }}
+
+{{ define "gocode Services" -}}
+services{
+ {{ range $id, $service := . -}}
+ "{{ $id }}": {{ template "gocode Service" $service }},
+ {{ end }}
+}
+{{- end }}
+
+{{ define "gocode Service" -}}
+service{
+ {{ StringIfSet "PartitionEndpoint: %q,\n" .PartitionEndpoint -}}
+ {{ BoxedBoolIfSet "IsRegionalized: %s,\n" .IsRegionalized -}}
+ {{ if (gt (len .Defaults) 0) -}}
+ Defaults: {{ template "gocode Defaults" .Defaults -}},
+ {{ end -}}
+ {{ if .Endpoints -}}
+ Endpoints: {{ template "gocode Endpoints" .Endpoints }},
+ {{- end }}
+}
+{{- end }}
+
+{{ define "gocode Defaults" -}}
+endpointDefaults{
+ {{ range $id, $endpoint := . -}}
+ {{ DefaultKeySetter $id }}: {{ template "gocode Endpoint" $endpoint }},
+ {{ end }}
+}
+{{- end }}
+
+{{ define "gocode Endpoints" -}}
+serviceEndpoints{
+ {{ range $id, $endpoint := . -}}
+ {{ EndpointKeySetter $id }}: {{ template "gocode Endpoint" $endpoint }},
+ {{ end }}
+}
+{{- end }}
+
+{{ define "gocode Endpoint" -}}
+endpoint{
+ {{ StringIfSet "Hostname: %q,\n" .Hostname -}}
+ {{ StringIfSet "DNSSuffix: %q,\n" .DNSSuffix -}}
+ {{ StringIfSet "SSLCommonName: %q,\n" .SSLCommonName -}}
+ {{ StringSliceIfSet "Protocols: []string{%s},\n" .Protocols -}}
+ {{ StringSliceIfSet "SignatureVersions: []string{%s},\n" .SignatureVersions -}}
+ {{ if or .CredentialScope.Region .CredentialScope.Service -}}
+ CredentialScope: credentialScope{
+ {{ StringIfSet "Region: %q,\n" .CredentialScope.Region -}}
+ {{ StringIfSet "Service: %q,\n" .CredentialScope.Service -}}
+ },
+ {{- end }}
+ {{ BoxedBoolIfSet "Deprecated: %s,\n" .Deprecated -}}
+}
+{{- end }}
+`
diff --git a/vendor/github.com/blang/semver/v4/LICENSE b/vendor/github.com/blang/semver/v4/LICENSE
new file mode 100644
index 000000000..5ba5c86fc
--- /dev/null
+++ b/vendor/github.com/blang/semver/v4/LICENSE
@@ -0,0 +1,22 @@
+The MIT License
+
+Copyright (c) 2014 Benedikt Lang
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/vendor/github.com/blang/semver/v4/json.go b/vendor/github.com/blang/semver/v4/json.go
new file mode 100644
index 000000000..a74bf7c44
--- /dev/null
+++ b/vendor/github.com/blang/semver/v4/json.go
@@ -0,0 +1,23 @@
+package semver
+
+import (
+ "encoding/json"
+)
+
+// MarshalJSON implements the encoding/json.Marshaler interface.
+func (v Version) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.String())
+}
+
+// UnmarshalJSON implements the encoding/json.Unmarshaler interface.
+func (v *Version) UnmarshalJSON(data []byte) (err error) {
+ var versionString string
+
+ if err = json.Unmarshal(data, &versionString); err != nil {
+ return
+ }
+
+ *v, err = Parse(versionString)
+
+ return
+}
diff --git a/vendor/github.com/blang/semver/v4/range.go b/vendor/github.com/blang/semver/v4/range.go
new file mode 100644
index 000000000..95f7139b9
--- /dev/null
+++ b/vendor/github.com/blang/semver/v4/range.go
@@ -0,0 +1,416 @@
+package semver
+
+import (
+ "fmt"
+ "strconv"
+ "strings"
+ "unicode"
+)
+
+type wildcardType int
+
+const (
+ noneWildcard wildcardType = iota
+ majorWildcard wildcardType = 1
+ minorWildcard wildcardType = 2
+ patchWildcard wildcardType = 3
+)
+
+func wildcardTypefromInt(i int) wildcardType {
+ switch i {
+ case 1:
+ return majorWildcard
+ case 2:
+ return minorWildcard
+ case 3:
+ return patchWildcard
+ default:
+ return noneWildcard
+ }
+}
+
+type comparator func(Version, Version) bool
+
+var (
+ compEQ comparator = func(v1 Version, v2 Version) bool {
+ return v1.Compare(v2) == 0
+ }
+ compNE = func(v1 Version, v2 Version) bool {
+ return v1.Compare(v2) != 0
+ }
+ compGT = func(v1 Version, v2 Version) bool {
+ return v1.Compare(v2) == 1
+ }
+ compGE = func(v1 Version, v2 Version) bool {
+ return v1.Compare(v2) >= 0
+ }
+ compLT = func(v1 Version, v2 Version) bool {
+ return v1.Compare(v2) == -1
+ }
+ compLE = func(v1 Version, v2 Version) bool {
+ return v1.Compare(v2) <= 0
+ }
+)
+
+type versionRange struct {
+ v Version
+ c comparator
+}
+
+// rangeFunc creates a Range from the given versionRange.
+func (vr *versionRange) rangeFunc() Range {
+ return Range(func(v Version) bool {
+ return vr.c(v, vr.v)
+ })
+}
+
+// Range represents a range of versions.
+// A Range can be used to check if a Version satisfies it:
+//
+// range, err := semver.ParseRange(">1.0.0 <2.0.0")
+// range(semver.MustParse("1.1.1") // returns true
+type Range func(Version) bool
+
+// OR combines the existing Range with another Range using logical OR.
+func (rf Range) OR(f Range) Range {
+ return Range(func(v Version) bool {
+ return rf(v) || f(v)
+ })
+}
+
+// AND combines the existing Range with another Range using logical AND.
+func (rf Range) AND(f Range) Range {
+ return Range(func(v Version) bool {
+ return rf(v) && f(v)
+ })
+}
+
+// ParseRange parses a range and returns a Range.
+// If the range could not be parsed an error is returned.
+//
+// Valid ranges are:
+// - "<1.0.0"
+// - "<=1.0.0"
+// - ">1.0.0"
+// - ">=1.0.0"
+// - "1.0.0", "=1.0.0", "==1.0.0"
+// - "!1.0.0", "!=1.0.0"
+//
+// A Range can consist of multiple ranges separated by space:
+// Ranges can be linked by logical AND:
+// - ">1.0.0 <2.0.0" would match between both ranges, so "1.1.1" and "1.8.7" but not "1.0.0" or "2.0.0"
+// - ">1.0.0 <3.0.0 !2.0.3-beta.2" would match every version between 1.0.0 and 3.0.0 except 2.0.3-beta.2
+//
+// Ranges can also be linked by logical OR:
+// - "<2.0.0 || >=3.0.0" would match "1.x.x" and "3.x.x" but not "2.x.x"
+//
+// AND has a higher precedence than OR. It's not possible to use brackets.
+//
+// Ranges can be combined by both AND and OR
+//
+// - `>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`, but not `4.2.1`, `2.1.1`
+func ParseRange(s string) (Range, error) {
+ parts := splitAndTrim(s)
+ orParts, err := splitORParts(parts)
+ if err != nil {
+ return nil, err
+ }
+ expandedParts, err := expandWildcardVersion(orParts)
+ if err != nil {
+ return nil, err
+ }
+ var orFn Range
+ for _, p := range expandedParts {
+ var andFn Range
+ for _, ap := range p {
+ opStr, vStr, err := splitComparatorVersion(ap)
+ if err != nil {
+ return nil, err
+ }
+ vr, err := buildVersionRange(opStr, vStr)
+ if err != nil {
+ return nil, fmt.Errorf("Could not parse Range %q: %s", ap, err)
+ }
+ rf := vr.rangeFunc()
+
+ // Set function
+ if andFn == nil {
+ andFn = rf
+ } else { // Combine with existing function
+ andFn = andFn.AND(rf)
+ }
+ }
+ if orFn == nil {
+ orFn = andFn
+ } else {
+ orFn = orFn.OR(andFn)
+ }
+
+ }
+ return orFn, nil
+}
+
+// splitORParts splits the already cleaned parts by '||'.
+// Checks for invalid positions of the operator and returns an
+// error if found.
+func splitORParts(parts []string) ([][]string, error) {
+ var ORparts [][]string
+ last := 0
+ for i, p := range parts {
+ if p == "||" {
+ if i == 0 {
+ return nil, fmt.Errorf("First element in range is '||'")
+ }
+ ORparts = append(ORparts, parts[last:i])
+ last = i + 1
+ }
+ }
+ if last == len(parts) {
+ return nil, fmt.Errorf("Last element in range is '||'")
+ }
+ ORparts = append(ORparts, parts[last:])
+ return ORparts, nil
+}
+
+// buildVersionRange takes a slice of 2: operator and version
+// and builds a versionRange, otherwise an error.
+func buildVersionRange(opStr, vStr string) (*versionRange, error) {
+ c := parseComparator(opStr)
+ if c == nil {
+ return nil, fmt.Errorf("Could not parse comparator %q in %q", opStr, strings.Join([]string{opStr, vStr}, ""))
+ }
+ v, err := Parse(vStr)
+ if err != nil {
+ return nil, fmt.Errorf("Could not parse version %q in %q: %s", vStr, strings.Join([]string{opStr, vStr}, ""), err)
+ }
+
+ return &versionRange{
+ v: v,
+ c: c,
+ }, nil
+
+}
+
+// inArray checks if a byte is contained in an array of bytes
+func inArray(s byte, list []byte) bool {
+ for _, el := range list {
+ if el == s {
+ return true
+ }
+ }
+ return false
+}
+
+// splitAndTrim splits a range string by spaces and cleans whitespaces
+func splitAndTrim(s string) (result []string) {
+ last := 0
+ var lastChar byte
+ excludeFromSplit := []byte{'>', '<', '='}
+ for i := 0; i < len(s); i++ {
+ if s[i] == ' ' && !inArray(lastChar, excludeFromSplit) {
+ if last < i-1 {
+ result = append(result, s[last:i])
+ }
+ last = i + 1
+ } else if s[i] != ' ' {
+ lastChar = s[i]
+ }
+ }
+ if last < len(s)-1 {
+ result = append(result, s[last:])
+ }
+
+ for i, v := range result {
+ result[i] = strings.Replace(v, " ", "", -1)
+ }
+
+ // parts := strings.Split(s, " ")
+ // for _, x := range parts {
+ // if s := strings.TrimSpace(x); len(s) != 0 {
+ // result = append(result, s)
+ // }
+ // }
+ return
+}
+
+// splitComparatorVersion splits the comparator from the version.
+// Input must be free of leading or trailing spaces.
+func splitComparatorVersion(s string) (string, string, error) {
+ i := strings.IndexFunc(s, unicode.IsDigit)
+ if i == -1 {
+ return "", "", fmt.Errorf("Could not get version from string: %q", s)
+ }
+ return strings.TrimSpace(s[0:i]), s[i:], nil
+}
+
+// getWildcardType will return the type of wildcard that the
+// passed version contains
+func getWildcardType(vStr string) wildcardType {
+ parts := strings.Split(vStr, ".")
+ nparts := len(parts)
+ wildcard := parts[nparts-1]
+
+ possibleWildcardType := wildcardTypefromInt(nparts)
+ if wildcard == "x" {
+ return possibleWildcardType
+ }
+
+ return noneWildcard
+}
+
+// createVersionFromWildcard will convert a wildcard version
+// into a regular version, replacing 'x's with '0's, handling
+// special cases like '1.x.x' and '1.x'
+func createVersionFromWildcard(vStr string) string {
+ // handle 1.x.x
+ vStr2 := strings.Replace(vStr, ".x.x", ".x", 1)
+ vStr2 = strings.Replace(vStr2, ".x", ".0", 1)
+ parts := strings.Split(vStr2, ".")
+
+ // handle 1.x
+ if len(parts) == 2 {
+ return vStr2 + ".0"
+ }
+
+ return vStr2
+}
+
+// incrementMajorVersion will increment the major version
+// of the passed version
+func incrementMajorVersion(vStr string) (string, error) {
+ parts := strings.Split(vStr, ".")
+ i, err := strconv.Atoi(parts[0])
+ if err != nil {
+ return "", err
+ }
+ parts[0] = strconv.Itoa(i + 1)
+
+ return strings.Join(parts, "."), nil
+}
+
+// incrementMajorVersion will increment the minor version
+// of the passed version
+func incrementMinorVersion(vStr string) (string, error) {
+ parts := strings.Split(vStr, ".")
+ i, err := strconv.Atoi(parts[1])
+ if err != nil {
+ return "", err
+ }
+ parts[1] = strconv.Itoa(i + 1)
+
+ return strings.Join(parts, "."), nil
+}
+
+// expandWildcardVersion will expand wildcards inside versions
+// following these rules:
+//
+// * when dealing with patch wildcards:
+// >= 1.2.x will become >= 1.2.0
+// <= 1.2.x will become < 1.3.0
+// > 1.2.x will become >= 1.3.0
+// < 1.2.x will become < 1.2.0
+// != 1.2.x will become < 1.2.0 >= 1.3.0
+//
+// * when dealing with minor wildcards:
+// >= 1.x will become >= 1.0.0
+// <= 1.x will become < 2.0.0
+// > 1.x will become >= 2.0.0
+// < 1.0 will become < 1.0.0
+// != 1.x will become < 1.0.0 >= 2.0.0
+//
+// * when dealing with wildcards without
+// version operator:
+// 1.2.x will become >= 1.2.0 < 1.3.0
+// 1.x will become >= 1.0.0 < 2.0.0
+func expandWildcardVersion(parts [][]string) ([][]string, error) {
+ var expandedParts [][]string
+ for _, p := range parts {
+ var newParts []string
+ for _, ap := range p {
+ if strings.Contains(ap, "x") {
+ opStr, vStr, err := splitComparatorVersion(ap)
+ if err != nil {
+ return nil, err
+ }
+
+ versionWildcardType := getWildcardType(vStr)
+ flatVersion := createVersionFromWildcard(vStr)
+
+ var resultOperator string
+ var shouldIncrementVersion bool
+ switch opStr {
+ case ">":
+ resultOperator = ">="
+ shouldIncrementVersion = true
+ case ">=":
+ resultOperator = ">="
+ case "<":
+ resultOperator = "<"
+ case "<=":
+ resultOperator = "<"
+ shouldIncrementVersion = true
+ case "", "=", "==":
+ newParts = append(newParts, ">="+flatVersion)
+ resultOperator = "<"
+ shouldIncrementVersion = true
+ case "!=", "!":
+ newParts = append(newParts, "<"+flatVersion)
+ resultOperator = ">="
+ shouldIncrementVersion = true
+ }
+
+ var resultVersion string
+ if shouldIncrementVersion {
+ switch versionWildcardType {
+ case patchWildcard:
+ resultVersion, _ = incrementMinorVersion(flatVersion)
+ case minorWildcard:
+ resultVersion, _ = incrementMajorVersion(flatVersion)
+ }
+ } else {
+ resultVersion = flatVersion
+ }
+
+ ap = resultOperator + resultVersion
+ }
+ newParts = append(newParts, ap)
+ }
+ expandedParts = append(expandedParts, newParts)
+ }
+
+ return expandedParts, nil
+}
+
+func parseComparator(s string) comparator {
+ switch s {
+ case "==":
+ fallthrough
+ case "":
+ fallthrough
+ case "=":
+ return compEQ
+ case ">":
+ return compGT
+ case ">=":
+ return compGE
+ case "<":
+ return compLT
+ case "<=":
+ return compLE
+ case "!":
+ fallthrough
+ case "!=":
+ return compNE
+ }
+
+ return nil
+}
+
+// MustParseRange is like ParseRange but panics if the range cannot be parsed.
+func MustParseRange(s string) Range {
+ r, err := ParseRange(s)
+ if err != nil {
+ panic(`semver: ParseRange(` + s + `): ` + err.Error())
+ }
+ return r
+}
diff --git a/vendor/github.com/blang/semver/v4/semver.go b/vendor/github.com/blang/semver/v4/semver.go
new file mode 100644
index 000000000..307de610f
--- /dev/null
+++ b/vendor/github.com/blang/semver/v4/semver.go
@@ -0,0 +1,476 @@
+package semver
+
+import (
+ "errors"
+ "fmt"
+ "strconv"
+ "strings"
+)
+
+const (
+ numbers string = "0123456789"
+ alphas = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-"
+ alphanum = alphas + numbers
+)
+
+// SpecVersion is the latest fully supported spec version of semver
+var SpecVersion = Version{
+ Major: 2,
+ Minor: 0,
+ Patch: 0,
+}
+
+// Version represents a semver compatible version
+type Version struct {
+ Major uint64
+ Minor uint64
+ Patch uint64
+ Pre []PRVersion
+ Build []string //No Precedence
+}
+
+// Version to string
+func (v Version) String() string {
+ b := make([]byte, 0, 5)
+ b = strconv.AppendUint(b, v.Major, 10)
+ b = append(b, '.')
+ b = strconv.AppendUint(b, v.Minor, 10)
+ b = append(b, '.')
+ b = strconv.AppendUint(b, v.Patch, 10)
+
+ if len(v.Pre) > 0 {
+ b = append(b, '-')
+ b = append(b, v.Pre[0].String()...)
+
+ for _, pre := range v.Pre[1:] {
+ b = append(b, '.')
+ b = append(b, pre.String()...)
+ }
+ }
+
+ if len(v.Build) > 0 {
+ b = append(b, '+')
+ b = append(b, v.Build[0]...)
+
+ for _, build := range v.Build[1:] {
+ b = append(b, '.')
+ b = append(b, build...)
+ }
+ }
+
+ return string(b)
+}
+
+// FinalizeVersion discards prerelease and build number and only returns
+// major, minor and patch number.
+func (v Version) FinalizeVersion() string {
+ b := make([]byte, 0, 5)
+ b = strconv.AppendUint(b, v.Major, 10)
+ b = append(b, '.')
+ b = strconv.AppendUint(b, v.Minor, 10)
+ b = append(b, '.')
+ b = strconv.AppendUint(b, v.Patch, 10)
+ return string(b)
+}
+
+// Equals checks if v is equal to o.
+func (v Version) Equals(o Version) bool {
+ return (v.Compare(o) == 0)
+}
+
+// EQ checks if v is equal to o.
+func (v Version) EQ(o Version) bool {
+ return (v.Compare(o) == 0)
+}
+
+// NE checks if v is not equal to o.
+func (v Version) NE(o Version) bool {
+ return (v.Compare(o) != 0)
+}
+
+// GT checks if v is greater than o.
+func (v Version) GT(o Version) bool {
+ return (v.Compare(o) == 1)
+}
+
+// GTE checks if v is greater than or equal to o.
+func (v Version) GTE(o Version) bool {
+ return (v.Compare(o) >= 0)
+}
+
+// GE checks if v is greater than or equal to o.
+func (v Version) GE(o Version) bool {
+ return (v.Compare(o) >= 0)
+}
+
+// LT checks if v is less than o.
+func (v Version) LT(o Version) bool {
+ return (v.Compare(o) == -1)
+}
+
+// LTE checks if v is less than or equal to o.
+func (v Version) LTE(o Version) bool {
+ return (v.Compare(o) <= 0)
+}
+
+// LE checks if v is less than or equal to o.
+func (v Version) LE(o Version) bool {
+ return (v.Compare(o) <= 0)
+}
+
+// Compare compares Versions v to o:
+// -1 == v is less than o
+// 0 == v is equal to o
+// 1 == v is greater than o
+func (v Version) Compare(o Version) int {
+ if v.Major != o.Major {
+ if v.Major > o.Major {
+ return 1
+ }
+ return -1
+ }
+ if v.Minor != o.Minor {
+ if v.Minor > o.Minor {
+ return 1
+ }
+ return -1
+ }
+ if v.Patch != o.Patch {
+ if v.Patch > o.Patch {
+ return 1
+ }
+ return -1
+ }
+
+ // Quick comparison if a version has no prerelease versions
+ if len(v.Pre) == 0 && len(o.Pre) == 0 {
+ return 0
+ } else if len(v.Pre) == 0 && len(o.Pre) > 0 {
+ return 1
+ } else if len(v.Pre) > 0 && len(o.Pre) == 0 {
+ return -1
+ }
+
+ i := 0
+ for ; i < len(v.Pre) && i < len(o.Pre); i++ {
+ if comp := v.Pre[i].Compare(o.Pre[i]); comp == 0 {
+ continue
+ } else if comp == 1 {
+ return 1
+ } else {
+ return -1
+ }
+ }
+
+ // If all pr versions are the equal but one has further prversion, this one greater
+ if i == len(v.Pre) && i == len(o.Pre) {
+ return 0
+ } else if i == len(v.Pre) && i < len(o.Pre) {
+ return -1
+ } else {
+ return 1
+ }
+
+}
+
+// IncrementPatch increments the patch version
+func (v *Version) IncrementPatch() error {
+ v.Patch++
+ return nil
+}
+
+// IncrementMinor increments the minor version
+func (v *Version) IncrementMinor() error {
+ v.Minor++
+ v.Patch = 0
+ return nil
+}
+
+// IncrementMajor increments the major version
+func (v *Version) IncrementMajor() error {
+ v.Major++
+ v.Minor = 0
+ v.Patch = 0
+ return nil
+}
+
+// Validate validates v and returns error in case
+func (v Version) Validate() error {
+ // Major, Minor, Patch already validated using uint64
+
+ for _, pre := range v.Pre {
+ if !pre.IsNum { //Numeric prerelease versions already uint64
+ if len(pre.VersionStr) == 0 {
+ return fmt.Errorf("Prerelease can not be empty %q", pre.VersionStr)
+ }
+ if !containsOnly(pre.VersionStr, alphanum) {
+ return fmt.Errorf("Invalid character(s) found in prerelease %q", pre.VersionStr)
+ }
+ }
+ }
+
+ for _, build := range v.Build {
+ if len(build) == 0 {
+ return fmt.Errorf("Build meta data can not be empty %q", build)
+ }
+ if !containsOnly(build, alphanum) {
+ return fmt.Errorf("Invalid character(s) found in build meta data %q", build)
+ }
+ }
+
+ return nil
+}
+
+// New is an alias for Parse and returns a pointer, parses version string and returns a validated Version or error
+func New(s string) (*Version, error) {
+ v, err := Parse(s)
+ vp := &v
+ return vp, err
+}
+
+// Make is an alias for Parse, parses version string and returns a validated Version or error
+func Make(s string) (Version, error) {
+ return Parse(s)
+}
+
+// ParseTolerant allows for certain version specifications that do not strictly adhere to semver
+// specs to be parsed by this library. It does so by normalizing versions before passing them to
+// Parse(). It currently trims spaces, removes a "v" prefix, adds a 0 patch number to versions
+// with only major and minor components specified, and removes leading 0s.
+func ParseTolerant(s string) (Version, error) {
+ s = strings.TrimSpace(s)
+ s = strings.TrimPrefix(s, "v")
+
+ // Split into major.minor.(patch+pr+meta)
+ parts := strings.SplitN(s, ".", 3)
+ // Remove leading zeros.
+ for i, p := range parts {
+ if len(p) > 1 {
+ p = strings.TrimLeft(p, "0")
+ if len(p) == 0 || !strings.ContainsAny(p[0:1], "0123456789") {
+ p = "0" + p
+ }
+ parts[i] = p
+ }
+ }
+ // Fill up shortened versions.
+ if len(parts) < 3 {
+ if strings.ContainsAny(parts[len(parts)-1], "+-") {
+ return Version{}, errors.New("Short version cannot contain PreRelease/Build meta data")
+ }
+ for len(parts) < 3 {
+ parts = append(parts, "0")
+ }
+ }
+ s = strings.Join(parts, ".")
+
+ return Parse(s)
+}
+
+// Parse parses version string and returns a validated Version or error
+func Parse(s string) (Version, error) {
+ if len(s) == 0 {
+ return Version{}, errors.New("Version string empty")
+ }
+
+ // Split into major.minor.(patch+pr+meta)
+ parts := strings.SplitN(s, ".", 3)
+ if len(parts) != 3 {
+ return Version{}, errors.New("No Major.Minor.Patch elements found")
+ }
+
+ // Major
+ if !containsOnly(parts[0], numbers) {
+ return Version{}, fmt.Errorf("Invalid character(s) found in major number %q", parts[0])
+ }
+ if hasLeadingZeroes(parts[0]) {
+ return Version{}, fmt.Errorf("Major number must not contain leading zeroes %q", parts[0])
+ }
+ major, err := strconv.ParseUint(parts[0], 10, 64)
+ if err != nil {
+ return Version{}, err
+ }
+
+ // Minor
+ if !containsOnly(parts[1], numbers) {
+ return Version{}, fmt.Errorf("Invalid character(s) found in minor number %q", parts[1])
+ }
+ if hasLeadingZeroes(parts[1]) {
+ return Version{}, fmt.Errorf("Minor number must not contain leading zeroes %q", parts[1])
+ }
+ minor, err := strconv.ParseUint(parts[1], 10, 64)
+ if err != nil {
+ return Version{}, err
+ }
+
+ v := Version{}
+ v.Major = major
+ v.Minor = minor
+
+ var build, prerelease []string
+ patchStr := parts[2]
+
+ if buildIndex := strings.IndexRune(patchStr, '+'); buildIndex != -1 {
+ build = strings.Split(patchStr[buildIndex+1:], ".")
+ patchStr = patchStr[:buildIndex]
+ }
+
+ if preIndex := strings.IndexRune(patchStr, '-'); preIndex != -1 {
+ prerelease = strings.Split(patchStr[preIndex+1:], ".")
+ patchStr = patchStr[:preIndex]
+ }
+
+ if !containsOnly(patchStr, numbers) {
+ return Version{}, fmt.Errorf("Invalid character(s) found in patch number %q", patchStr)
+ }
+ if hasLeadingZeroes(patchStr) {
+ return Version{}, fmt.Errorf("Patch number must not contain leading zeroes %q", patchStr)
+ }
+ patch, err := strconv.ParseUint(patchStr, 10, 64)
+ if err != nil {
+ return Version{}, err
+ }
+
+ v.Patch = patch
+
+ // Prerelease
+ for _, prstr := range prerelease {
+ parsedPR, err := NewPRVersion(prstr)
+ if err != nil {
+ return Version{}, err
+ }
+ v.Pre = append(v.Pre, parsedPR)
+ }
+
+ // Build meta data
+ for _, str := range build {
+ if len(str) == 0 {
+ return Version{}, errors.New("Build meta data is empty")
+ }
+ if !containsOnly(str, alphanum) {
+ return Version{}, fmt.Errorf("Invalid character(s) found in build meta data %q", str)
+ }
+ v.Build = append(v.Build, str)
+ }
+
+ return v, nil
+}
+
+// MustParse is like Parse but panics if the version cannot be parsed.
+func MustParse(s string) Version {
+ v, err := Parse(s)
+ if err != nil {
+ panic(`semver: Parse(` + s + `): ` + err.Error())
+ }
+ return v
+}
+
+// PRVersion represents a PreRelease Version
+type PRVersion struct {
+ VersionStr string
+ VersionNum uint64
+ IsNum bool
+}
+
+// NewPRVersion creates a new valid prerelease version
+func NewPRVersion(s string) (PRVersion, error) {
+ if len(s) == 0 {
+ return PRVersion{}, errors.New("Prerelease is empty")
+ }
+ v := PRVersion{}
+ if containsOnly(s, numbers) {
+ if hasLeadingZeroes(s) {
+ return PRVersion{}, fmt.Errorf("Numeric PreRelease version must not contain leading zeroes %q", s)
+ }
+ num, err := strconv.ParseUint(s, 10, 64)
+
+ // Might never be hit, but just in case
+ if err != nil {
+ return PRVersion{}, err
+ }
+ v.VersionNum = num
+ v.IsNum = true
+ } else if containsOnly(s, alphanum) {
+ v.VersionStr = s
+ v.IsNum = false
+ } else {
+ return PRVersion{}, fmt.Errorf("Invalid character(s) found in prerelease %q", s)
+ }
+ return v, nil
+}
+
+// IsNumeric checks if prerelease-version is numeric
+func (v PRVersion) IsNumeric() bool {
+ return v.IsNum
+}
+
+// Compare compares two PreRelease Versions v and o:
+// -1 == v is less than o
+// 0 == v is equal to o
+// 1 == v is greater than o
+func (v PRVersion) Compare(o PRVersion) int {
+ if v.IsNum && !o.IsNum {
+ return -1
+ } else if !v.IsNum && o.IsNum {
+ return 1
+ } else if v.IsNum && o.IsNum {
+ if v.VersionNum == o.VersionNum {
+ return 0
+ } else if v.VersionNum > o.VersionNum {
+ return 1
+ } else {
+ return -1
+ }
+ } else { // both are Alphas
+ if v.VersionStr == o.VersionStr {
+ return 0
+ } else if v.VersionStr > o.VersionStr {
+ return 1
+ } else {
+ return -1
+ }
+ }
+}
+
+// PreRelease version to string
+func (v PRVersion) String() string {
+ if v.IsNum {
+ return strconv.FormatUint(v.VersionNum, 10)
+ }
+ return v.VersionStr
+}
+
+func containsOnly(s string, set string) bool {
+ return strings.IndexFunc(s, func(r rune) bool {
+ return !strings.ContainsRune(set, r)
+ }) == -1
+}
+
+func hasLeadingZeroes(s string) bool {
+ return len(s) > 1 && s[0] == '0'
+}
+
+// NewBuildVersion creates a new valid build version
+func NewBuildVersion(s string) (string, error) {
+ if len(s) == 0 {
+ return "", errors.New("Buildversion is empty")
+ }
+ if !containsOnly(s, alphanum) {
+ return "", fmt.Errorf("Invalid character(s) found in build meta data %q", s)
+ }
+ return s, nil
+}
+
+// FinalizeVersion returns the major, minor and patch number only and discards
+// prerelease and build number.
+func FinalizeVersion(s string) (string, error) {
+ v, err := Parse(s)
+ if err != nil {
+ return "", err
+ }
+ v.Pre = nil
+ v.Build = nil
+
+ finalVer := v.String()
+ return finalVer, nil
+}
diff --git a/vendor/github.com/blang/semver/v4/sort.go b/vendor/github.com/blang/semver/v4/sort.go
new file mode 100644
index 000000000..e18f88082
--- /dev/null
+++ b/vendor/github.com/blang/semver/v4/sort.go
@@ -0,0 +1,28 @@
+package semver
+
+import (
+ "sort"
+)
+
+// Versions represents multiple versions.
+type Versions []Version
+
+// Len returns length of version collection
+func (s Versions) Len() int {
+ return len(s)
+}
+
+// Swap swaps two versions inside the collection by its indices
+func (s Versions) Swap(i, j int) {
+ s[i], s[j] = s[j], s[i]
+}
+
+// Less checks if version at index i is less than version at index j
+func (s Versions) Less(i, j int) bool {
+ return s[i].LT(s[j])
+}
+
+// Sort sorts a slice of versions
+func Sort(versions []Version) {
+ sort.Sort(Versions(versions))
+}
diff --git a/vendor/github.com/blang/semver/v4/sql.go b/vendor/github.com/blang/semver/v4/sql.go
new file mode 100644
index 000000000..db958134f
--- /dev/null
+++ b/vendor/github.com/blang/semver/v4/sql.go
@@ -0,0 +1,30 @@
+package semver
+
+import (
+ "database/sql/driver"
+ "fmt"
+)
+
+// Scan implements the database/sql.Scanner interface.
+func (v *Version) Scan(src interface{}) (err error) {
+ var str string
+ switch src := src.(type) {
+ case string:
+ str = src
+ case []byte:
+ str = string(src)
+ default:
+ return fmt.Errorf("version.Scan: cannot convert %T to string", src)
+ }
+
+ if t, err := Parse(str); err == nil {
+ *v = t
+ }
+
+ return
+}
+
+// Value implements the database/sql/driver.Valuer interface.
+func (v Version) Value() (driver.Value, error) {
+ return v.String(), nil
+}
diff --git a/vendor/github.com/charmbracelet/bubbles/help/help.go b/vendor/github.com/charmbracelet/bubbles/help/help.go
new file mode 100644
index 000000000..8e5f77f1f
--- /dev/null
+++ b/vendor/github.com/charmbracelet/bubbles/help/help.go
@@ -0,0 +1,233 @@
+package help
+
+import (
+ "strings"
+
+ "github.com/charmbracelet/bubbles/key"
+ tea "github.com/charmbracelet/bubbletea"
+ "github.com/charmbracelet/lipgloss"
+)
+
+// KeyMap is a map of keybindings used to generate help. Since it's an
+// interface it can be any type, though struct or a map[string][]key.Binding
+// are likely candidates.
+//
+// Note that if a key is disabled (via key.Binding.SetEnabled) it will not be
+// rendered in the help view, so in theory generated help should self-manage.
+type KeyMap interface {
+
+ // ShortHelp returns a slice of bindings to be displayed in the short
+ // version of the help. The help bubble will render help in the order in
+ // which the help items are returned here.
+ ShortHelp() []key.Binding
+
+ // FullHelp returns an extended group of help items, grouped by columns.
+ // The help bubble will render the help in the order in which the help
+ // items are returned here.
+ FullHelp() [][]key.Binding
+}
+
+// Styles is a set of available style definitions for the Help bubble.
+type Styles struct {
+ Ellipsis lipgloss.Style
+
+ // Styling for the short help
+ ShortKey lipgloss.Style
+ ShortDesc lipgloss.Style
+ ShortSeparator lipgloss.Style
+
+ // Styling for the full help
+ FullKey lipgloss.Style
+ FullDesc lipgloss.Style
+ FullSeparator lipgloss.Style
+}
+
+// Model contains the state of the help view.
+type Model struct {
+ Width int
+ ShowAll bool // if true, render the "full" help menu
+
+ ShortSeparator string
+ FullSeparator string
+
+ // The symbol we use in the short help when help items have been truncated
+ // due to width. Periods of ellipsis by default.
+ Ellipsis string
+
+ Styles Styles
+}
+
+// New creates a new help view with some useful defaults.
+func New() Model {
+ keyStyle := lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{
+ Light: "#909090",
+ Dark: "#626262",
+ })
+
+ descStyle := lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{
+ Light: "#B2B2B2",
+ Dark: "#4A4A4A",
+ })
+
+ sepStyle := lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{
+ Light: "#DDDADA",
+ Dark: "#3C3C3C",
+ })
+
+ return Model{
+ ShortSeparator: " • ",
+ FullSeparator: " ",
+ Ellipsis: "…",
+ Styles: Styles{
+ ShortKey: keyStyle,
+ ShortDesc: descStyle,
+ ShortSeparator: sepStyle,
+ Ellipsis: sepStyle.Copy(),
+ FullKey: keyStyle.Copy(),
+ FullDesc: descStyle.Copy(),
+ FullSeparator: sepStyle.Copy(),
+ },
+ }
+}
+
+// NewModel creates a new help view with some useful defaults.
+//
+// Deprecated: use [New] instead.
+var NewModel = New
+
+// Update helps satisfy the Bubble Tea Model interface. It's a no-op.
+func (m Model) Update(_ tea.Msg) (Model, tea.Cmd) {
+ return m, nil
+}
+
+// View renders the help view's current state.
+func (m Model) View(k KeyMap) string {
+ if m.ShowAll {
+ return m.FullHelpView(k.FullHelp())
+ }
+ return m.ShortHelpView(k.ShortHelp())
+}
+
+// ShortHelpView renders a single line help view from a slice of keybindings.
+// If the line is longer than the maximum width it will be gracefully
+// truncated, showing only as many help items as possible.
+func (m Model) ShortHelpView(bindings []key.Binding) string {
+ if len(bindings) == 0 {
+ return ""
+ }
+
+ var b strings.Builder
+ var totalWidth int
+ var separator = m.Styles.ShortSeparator.Inline(true).Render(m.ShortSeparator)
+
+ for i, kb := range bindings {
+ if !kb.Enabled() {
+ continue
+ }
+
+ var sep string
+ if totalWidth > 0 && i < len(bindings) {
+ sep = separator
+ }
+
+ str := sep +
+ m.Styles.ShortKey.Inline(true).Render(kb.Help().Key) + " " +
+ m.Styles.ShortDesc.Inline(true).Render(kb.Help().Desc)
+
+ w := lipgloss.Width(str)
+
+ // If adding this help item would go over the available width, stop
+ // drawing.
+ if m.Width > 0 && totalWidth+w > m.Width {
+ // Although if there's room for an ellipsis, print that.
+ tail := " " + m.Styles.Ellipsis.Inline(true).Render(m.Ellipsis)
+ tailWidth := lipgloss.Width(tail)
+
+ if totalWidth+tailWidth < m.Width {
+ b.WriteString(tail)
+ }
+
+ break
+ }
+
+ totalWidth += w
+ b.WriteString(str)
+ }
+
+ return b.String()
+}
+
+// FullHelpView renders help columns from a slice of key binding slices. Each
+// top level slice entry renders into a column.
+func (m Model) FullHelpView(groups [][]key.Binding) string {
+ if len(groups) == 0 {
+ return ""
+ }
+
+ // Linter note: at this time we don't think it's worth the additional
+ // code complexity involved in preallocating this slice.
+ //nolint:prealloc
+ var (
+ out []string
+
+ totalWidth int
+ sep = m.Styles.FullSeparator.Render(m.FullSeparator)
+ sepWidth = lipgloss.Width(sep)
+ )
+
+ // Iterate over groups to build columns
+ for i, group := range groups {
+ if group == nil || !shouldRenderColumn(group) {
+ continue
+ }
+
+ var (
+ keys []string
+ descriptions []string
+ )
+
+ // Separate keys and descriptions into different slices
+ for _, kb := range group {
+ if !kb.Enabled() {
+ continue
+ }
+ keys = append(keys, kb.Help().Key)
+ descriptions = append(descriptions, kb.Help().Desc)
+ }
+
+ col := lipgloss.JoinHorizontal(lipgloss.Top,
+ m.Styles.FullKey.Render(strings.Join(keys, "\n")),
+ m.Styles.FullKey.Render(" "),
+ m.Styles.FullDesc.Render(strings.Join(descriptions, "\n")),
+ )
+
+ // Column
+ totalWidth += lipgloss.Width(col)
+ if m.Width > 0 && totalWidth > m.Width {
+ break
+ }
+
+ out = append(out, col)
+
+ // Separator
+ if i < len(group)-1 {
+ totalWidth += sepWidth
+ if m.Width > 0 && totalWidth > m.Width {
+ break
+ }
+ }
+
+ out = append(out, sep)
+ }
+
+ return lipgloss.JoinHorizontal(lipgloss.Top, out...)
+}
+
+func shouldRenderColumn(b []key.Binding) (ok bool) {
+ for _, v := range b {
+ if v.Enabled() {
+ return true
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/charmbracelet/bubbles/list/README.md b/vendor/github.com/charmbracelet/bubbles/list/README.md
new file mode 100644
index 000000000..303394de0
--- /dev/null
+++ b/vendor/github.com/charmbracelet/bubbles/list/README.md
@@ -0,0 +1,72 @@
+# Frequently Asked Questions
+
+These are some of the most commonly asked questions regarding the `list` bubble.
+
+## Adding Custom Items
+
+There are a few things you need to do to create custom items. First off, they
+need to implement the `list.Item` and `list.DefaultItem` interfaces.
+
+```go
+// Item is an item that appears in the list.
+type Item interface {
+ // FilterValue is the value we use when filtering against this item when
+ // we're filtering the list.
+ FilterValue() string
+}
+```
+
+```go
+// DefaultItem describes an items designed to work with DefaultDelegate.
+type DefaultItem interface {
+ Item
+ Title() string
+ Description() string
+}
+```
+
+You can see a working example in our [Kancli][kancli] project built
+explicitly for a tutorial on lists and composite views in Bubble Tea.
+
+[VIDEO](https://youtu.be/ZA93qgdLUzM)
+
+## Customizing Styles
+
+Rendering (and behavior) for list items is done via the
+[`ItemDelegate`][itemDelegate]
+interface. It can be a little confusing at first, but it allows the list to be
+very flexible and powerful.
+
+If you just want to alter the default style you could do something like:
+
+```go
+import "github.com/charmbracelet/bubbles/list"
+
+// Create a new default delegate
+d := list.NewDefaultDelegate()
+
+// Change colors
+c := lipgloss.Color("#6f03fc")
+d.Styles.SelectedTitle = d.Styles.SelectedTitle.Foreground(c).BorderLeftForeground(c)
+d.Styles.SelectedDesc = d.Styles.SelectedTitle.Copy() // reuse the title style here
+
+// Initailize the list model with our delegate
+width, height := 80, 40
+l := list.New(listItems, d, width, height)
+
+// You can also change the delegate on the fly
+l.SetDelegate(d)
+```
+
+This code would replace [this line][replacedLine] in the [`list-default`
+example][listDefault].
+
+For full control over the way list items are rendered you can also define your
+own `ItemDelegate` too ([example][customDelegate]).
+
+
+[kancli]: https://github.com/charmbracelet/kancli/blob/main/main.go#L45
+[itemDelegate]: https://pkg.go.dev/github.com/charmbracelet/bubbles@v0.10.2/list#ItemDelegate
+[replacedLine]: https://github.com/charmbracelet/bubbletea/blob/master/examples/list-default/main.go#L77
+[listDefault]: https://github.com/charmbracelet/bubbletea/tree/master/examples/list-default
+[customDelegate]: https://github.com/charmbracelet/bubbletea/blob/a6f46172ec4436991b90c2270253b2d212de7ef3/examples/list-simple/main.go#L28-L49
diff --git a/vendor/github.com/charmbracelet/bubbles/list/defaultitem.go b/vendor/github.com/charmbracelet/bubbles/list/defaultitem.go
new file mode 100644
index 000000000..5474c0047
--- /dev/null
+++ b/vendor/github.com/charmbracelet/bubbles/list/defaultitem.go
@@ -0,0 +1,227 @@
+package list
+
+import (
+ "fmt"
+ "io"
+ "strings"
+
+ "github.com/charmbracelet/bubbles/key"
+ tea "github.com/charmbracelet/bubbletea"
+ "github.com/charmbracelet/lipgloss"
+ "github.com/muesli/reflow/truncate"
+)
+
+// DefaultItemStyles defines styling for a default list item.
+// See DefaultItemView for when these come into play.
+type DefaultItemStyles struct {
+ // The Normal state.
+ NormalTitle lipgloss.Style
+ NormalDesc lipgloss.Style
+
+ // The selected item state.
+ SelectedTitle lipgloss.Style
+ SelectedDesc lipgloss.Style
+
+ // The dimmed state, for when the filter input is initially activated.
+ DimmedTitle lipgloss.Style
+ DimmedDesc lipgloss.Style
+
+ // Characters matching the current filter, if any.
+ FilterMatch lipgloss.Style
+}
+
+// NewDefaultItemStyles returns style definitions for a default item. See
+// DefaultItemView for when these come into play.
+func NewDefaultItemStyles() (s DefaultItemStyles) {
+ s.NormalTitle = lipgloss.NewStyle().
+ Foreground(lipgloss.AdaptiveColor{Light: "#1a1a1a", Dark: "#dddddd"}).
+ Padding(0, 0, 0, 2)
+
+ s.NormalDesc = s.NormalTitle.Copy().
+ Foreground(lipgloss.AdaptiveColor{Light: "#A49FA5", Dark: "#777777"})
+
+ s.SelectedTitle = lipgloss.NewStyle().
+ Border(lipgloss.NormalBorder(), false, false, false, true).
+ BorderForeground(lipgloss.AdaptiveColor{Light: "#F793FF", Dark: "#AD58B4"}).
+ Foreground(lipgloss.AdaptiveColor{Light: "#EE6FF8", Dark: "#EE6FF8"}).
+ Padding(0, 0, 0, 1)
+
+ s.SelectedDesc = s.SelectedTitle.Copy().
+ Foreground(lipgloss.AdaptiveColor{Light: "#F793FF", Dark: "#AD58B4"})
+
+ s.DimmedTitle = lipgloss.NewStyle().
+ Foreground(lipgloss.AdaptiveColor{Light: "#A49FA5", Dark: "#777777"}).
+ Padding(0, 0, 0, 2)
+
+ s.DimmedDesc = s.DimmedTitle.Copy().
+ Foreground(lipgloss.AdaptiveColor{Light: "#C2B8C2", Dark: "#4D4D4D"})
+
+ s.FilterMatch = lipgloss.NewStyle().Underline(true)
+
+ return s
+}
+
+// DefaultItem describes an items designed to work with DefaultDelegate.
+type DefaultItem interface {
+ Item
+ Title() string
+ Description() string
+}
+
+// DefaultDelegate is a standard delegate designed to work in lists. It's
+// styled by DefaultItemStyles, which can be customized as you like.
+//
+// The description line can be hidden by setting Description to false, which
+// renders the list as single-line-items. The spacing between items can be set
+// with the SetSpacing method.
+//
+// Setting UpdateFunc is optional. If it's set it will be called when the
+// ItemDelegate called, which is called when the list's Update function is
+// invoked.
+//
+// Settings ShortHelpFunc and FullHelpFunc is optional. They can be set to
+// include items in the list's default short and full help menus.
+type DefaultDelegate struct {
+ ShowDescription bool
+ Styles DefaultItemStyles
+ UpdateFunc func(tea.Msg, *Model) tea.Cmd
+ ShortHelpFunc func() []key.Binding
+ FullHelpFunc func() [][]key.Binding
+ height int
+ spacing int
+}
+
+// NewDefaultDelegate creates a new delegate with default styles.
+func NewDefaultDelegate() DefaultDelegate {
+ return DefaultDelegate{
+ ShowDescription: true,
+ Styles: NewDefaultItemStyles(),
+ height: 2,
+ spacing: 1,
+ }
+}
+
+// SetHeight sets delegate's preferred height.
+func (d *DefaultDelegate) SetHeight(i int) {
+ d.height = i
+}
+
+// Height returns the delegate's preferred height.
+// This has effect only if ShowDescription is true,
+// otherwise height is always 1.
+func (d DefaultDelegate) Height() int {
+ if d.ShowDescription {
+ return d.height
+ }
+ return 1
+}
+
+// SetSpacing sets the delegate's spacing.
+func (d *DefaultDelegate) SetSpacing(i int) {
+ d.spacing = i
+}
+
+// Spacing returns the delegate's spacing.
+func (d DefaultDelegate) Spacing() int {
+ return d.spacing
+}
+
+// Update checks whether the delegate's UpdateFunc is set and calls it.
+func (d DefaultDelegate) Update(msg tea.Msg, m *Model) tea.Cmd {
+ if d.UpdateFunc == nil {
+ return nil
+ }
+ return d.UpdateFunc(msg, m)
+}
+
+// Render prints an item.
+func (d DefaultDelegate) Render(w io.Writer, m Model, index int, item Item) {
+ var (
+ title, desc string
+ matchedRunes []int
+ s = &d.Styles
+ )
+
+ if i, ok := item.(DefaultItem); ok {
+ title = i.Title()
+ desc = i.Description()
+ } else {
+ return
+ }
+
+ if m.width <= 0 {
+ // short-circuit
+ return
+ }
+
+ // Prevent text from exceeding list width
+ textwidth := uint(m.width - s.NormalTitle.GetPaddingLeft() - s.NormalTitle.GetPaddingRight())
+ title = truncate.StringWithTail(title, textwidth, ellipsis)
+ if d.ShowDescription {
+ var lines []string
+ for i, line := range strings.Split(desc, "\n") {
+ if i >= d.height-1 {
+ break
+ }
+ lines = append(lines, truncate.StringWithTail(line, textwidth, ellipsis))
+ }
+ desc = strings.Join(lines, "\n")
+ }
+
+ // Conditions
+ var (
+ isSelected = index == m.Index()
+ emptyFilter = m.FilterState() == Filtering && m.FilterValue() == ""
+ isFiltered = m.FilterState() == Filtering || m.FilterState() == FilterApplied
+ )
+
+ if isFiltered && index < len(m.filteredItems) {
+ // Get indices of matched characters
+ matchedRunes = m.MatchesForItem(index)
+ }
+
+ if emptyFilter {
+ title = s.DimmedTitle.Render(title)
+ desc = s.DimmedDesc.Render(desc)
+ } else if isSelected && m.FilterState() != Filtering {
+ if isFiltered {
+ // Highlight matches
+ unmatched := s.SelectedTitle.Inline(true)
+ matched := unmatched.Copy().Inherit(s.FilterMatch)
+ title = lipgloss.StyleRunes(title, matchedRunes, matched, unmatched)
+ }
+ title = s.SelectedTitle.Render(title)
+ desc = s.SelectedDesc.Render(desc)
+ } else {
+ if isFiltered {
+ // Highlight matches
+ unmatched := s.NormalTitle.Inline(true)
+ matched := unmatched.Copy().Inherit(s.FilterMatch)
+ title = lipgloss.StyleRunes(title, matchedRunes, matched, unmatched)
+ }
+ title = s.NormalTitle.Render(title)
+ desc = s.NormalDesc.Render(desc)
+ }
+
+ if d.ShowDescription {
+ fmt.Fprintf(w, "%s\n%s", title, desc)
+ return
+ }
+ fmt.Fprintf(w, "%s", title)
+}
+
+// ShortHelp returns the delegate's short help.
+func (d DefaultDelegate) ShortHelp() []key.Binding {
+ if d.ShortHelpFunc != nil {
+ return d.ShortHelpFunc()
+ }
+ return nil
+}
+
+// FullHelp returns the delegate's full help.
+func (d DefaultDelegate) FullHelp() [][]key.Binding {
+ if d.FullHelpFunc != nil {
+ return d.FullHelpFunc()
+ }
+ return nil
+}
diff --git a/vendor/github.com/charmbracelet/bubbles/list/keys.go b/vendor/github.com/charmbracelet/bubbles/list/keys.go
new file mode 100644
index 000000000..33220313d
--- /dev/null
+++ b/vendor/github.com/charmbracelet/bubbles/list/keys.go
@@ -0,0 +1,97 @@
+package list
+
+import "github.com/charmbracelet/bubbles/key"
+
+// KeyMap defines keybindings. It satisfies to the help.KeyMap interface, which
+// is used to render the menu.
+type KeyMap struct {
+ // Keybindings used when browsing the list.
+ CursorUp key.Binding
+ CursorDown key.Binding
+ NextPage key.Binding
+ PrevPage key.Binding
+ GoToStart key.Binding
+ GoToEnd key.Binding
+ Filter key.Binding
+ ClearFilter key.Binding
+
+ // Keybindings used when setting a filter.
+ CancelWhileFiltering key.Binding
+ AcceptWhileFiltering key.Binding
+
+ // Help toggle keybindings.
+ ShowFullHelp key.Binding
+ CloseFullHelp key.Binding
+
+ // The quit keybinding. This won't be caught when filtering.
+ Quit key.Binding
+
+ // The quit-no-matter-what keybinding. This will be caught when filtering.
+ ForceQuit key.Binding
+}
+
+// DefaultKeyMap returns a default set of keybindings.
+func DefaultKeyMap() KeyMap {
+ return KeyMap{
+ // Browsing.
+ CursorUp: key.NewBinding(
+ key.WithKeys("up", "k"),
+ key.WithHelp("↑/k", "up"),
+ ),
+ CursorDown: key.NewBinding(
+ key.WithKeys("down", "j"),
+ key.WithHelp("↓/j", "down"),
+ ),
+ PrevPage: key.NewBinding(
+ key.WithKeys("left", "h", "pgup", "b", "u"),
+ key.WithHelp("←/h/pgup", "prev page"),
+ ),
+ NextPage: key.NewBinding(
+ key.WithKeys("right", "l", "pgdown", "f", "d"),
+ key.WithHelp("→/l/pgdn", "next page"),
+ ),
+ GoToStart: key.NewBinding(
+ key.WithKeys("home", "g"),
+ key.WithHelp("g/home", "go to start"),
+ ),
+ GoToEnd: key.NewBinding(
+ key.WithKeys("end", "G"),
+ key.WithHelp("G/end", "go to end"),
+ ),
+ Filter: key.NewBinding(
+ key.WithKeys("/"),
+ key.WithHelp("/", "filter"),
+ ),
+ ClearFilter: key.NewBinding(
+ key.WithKeys("esc"),
+ key.WithHelp("esc", "clear filter"),
+ ),
+
+ // Filtering.
+ CancelWhileFiltering: key.NewBinding(
+ key.WithKeys("esc"),
+ key.WithHelp("esc", "cancel"),
+ ),
+ AcceptWhileFiltering: key.NewBinding(
+ key.WithKeys("enter", "tab", "shift+tab", "ctrl+k", "up", "ctrl+j", "down"),
+ key.WithHelp("enter", "apply filter"),
+ ),
+
+ // Toggle help.
+ ShowFullHelp: key.NewBinding(
+ key.WithKeys("?"),
+ key.WithHelp("?", "more"),
+ ),
+ CloseFullHelp: key.NewBinding(
+ key.WithKeys("?"),
+ key.WithHelp("?", "close help"),
+ ),
+
+ // Quitting.
+ Quit: key.NewBinding(
+ key.WithKeys("q", "esc"),
+ key.WithHelp("q", "quit"),
+ ),
+ ForceQuit: key.NewBinding(key.WithKeys("ctrl+c")),
+ }
+}
diff --git a/vendor/github.com/charmbracelet/bubbles/list/list.go b/vendor/github.com/charmbracelet/bubbles/list/list.go
new file mode 100644
index 000000000..f286274c6
--- /dev/null
+++ b/vendor/github.com/charmbracelet/bubbles/list/list.go
@@ -0,0 +1,1277 @@
+// Package list provides a feature-rich Bubble Tea component for browsing
+// a general purpose list of items. It features optional filtering, pagination,
+// help, status messages, and a spinner to indicate activity.
+package list
+
+import (
+ "fmt"
+ "io"
+ "sort"
+ "strings"
+ "time"
+
+ "github.com/charmbracelet/bubbles/help"
+ "github.com/charmbracelet/bubbles/key"
+ "github.com/charmbracelet/bubbles/paginator"
+ "github.com/charmbracelet/bubbles/spinner"
+ "github.com/charmbracelet/bubbles/textinput"
+ tea "github.com/charmbracelet/bubbletea"
+ "github.com/charmbracelet/lipgloss"
+ "github.com/muesli/reflow/ansi"
+ "github.com/muesli/reflow/truncate"
+ "github.com/sahilm/fuzzy"
+)
+
+// Item is an item that appears in the list.
+type Item interface {
+ // FilterValue is the value we use when filtering against this item when
+ // we're filtering the list.
+ FilterValue() string
+}
+
+// ItemDelegate encapsulates the general functionality for all list items. The
+// benefit to separating this logic from the item itself is that you can change
+// the functionality of items without changing the actual items themselves.
+//
+// Note that if the delegate also implements help.KeyMap delegate-related
+// help items will be added to the help view.
+type ItemDelegate interface {
+ // Render renders the item's view.
+ Render(w io.Writer, m Model, index int, item Item)
+
+ // Height is the height of the list item.
+ Height() int
+
+ // Spacing is the size of the horizontal gap between list items in cells.
+ Spacing() int
+
+ // Update is the update loop for items. All messages in the list's update
+ // loop will pass through here except when the user is setting a filter.
+ // Use this method to perform item-level updates appropriate to this
+ // delegate.
+ Update(msg tea.Msg, m *Model) tea.Cmd
+}
+
+type filteredItem struct {
+ item Item // item matched
+ matches []int // rune indices of matched items
+}
+
+type filteredItems []filteredItem
+
+func (f filteredItems) items() []Item {
+ agg := make([]Item, len(f))
+ for i, v := range f {
+ agg[i] = v.item
+ }
+ return agg
+}
+
+// FilterMatchesMsg contains data about items matched during filtering. The
+// message should be routed to Update for processing.
+type FilterMatchesMsg []filteredItem
+
+// FilterFunc takes a term and a list of strings to search through
+// (defined by Item#FilterValue).
+// It should return a sorted list of ranks.
+type FilterFunc func(string, []string) []Rank
+
+// Rank defines a rank for a given item.
+type Rank struct {
+ // The index of the item in the original input.
+ Index int
+ // Indices of the actual word that were matched against the filter term.
+ MatchedIndexes []int
+}
+
+// DefaultFilter uses the sahilm/fuzzy to filter through the list.
+// This is set by default.
+func DefaultFilter(term string, targets []string) []Rank {
+ var ranks = fuzzy.Find(term, targets)
+ sort.Stable(ranks)
+ result := make([]Rank, len(ranks))
+ for i, r := range ranks {
+ result[i] = Rank{
+ Index: r.Index,
+ MatchedIndexes: r.MatchedIndexes,
+ }
+ }
+ return result
+}
+
+type statusMessageTimeoutMsg struct{}
+
+// FilterState describes the current filtering state on the model.
+type FilterState int
+
+// Possible filter states.
+const (
+ Unfiltered FilterState = iota // no filter set
+ Filtering // user is actively setting a filter
+ FilterApplied // a filter is applied and user is not editing filter
+)
+
+// String returns a human-readable string of the current filter state.
+func (f FilterState) String() string {
+ return [...]string{
+ "unfiltered",
+ "filtering",
+ "filter applied",
+ }[f]
+}
+
+// Model contains the state of this component.
+type Model struct {
+ showTitle bool
+ showFilter bool
+ showStatusBar bool
+ showPagination bool
+ showHelp bool
+ filteringEnabled bool
+
+ itemNameSingular string
+ itemNamePlural string
+
+ Title string
+ Styles Styles
+ InfiniteScrolling bool
+
+ // Key mappings for navigating the list.
+ KeyMap KeyMap
+
+ // Filter is used to filter the list.
+ Filter FilterFunc
+
+ disableQuitKeybindings bool
+
+ // Additional key mappings for the short and full help views. This allows
+ // you to add additional key mappings to the help menu without
+ // re-implementing the help component. Of course, you can also disable the
+ // list's help component and implement a new one if you need more
+ // flexibility.
+ AdditionalShortHelpKeys func() []key.Binding
+ AdditionalFullHelpKeys func() []key.Binding
+
+ spinner spinner.Model
+ showSpinner bool
+ width int
+ height int
+ Paginator paginator.Model
+ cursor int
+ Help help.Model
+ FilterInput textinput.Model
+ filterState FilterState
+
+ // How long status messages should stay visible. By default this is
+ // 1 second.
+ StatusMessageLifetime time.Duration
+
+ statusMessage string
+ statusMessageTimer *time.Timer
+
+ // The master set of items we're working with.
+ items []Item
+
+ // Filtered items we're currently displaying. Filtering, toggles and so on
+ // will alter this slice so we can show what is relevant. For that reason,
+ // this field should be considered ephemeral.
+ filteredItems filteredItems
+
+ delegate ItemDelegate
+}
+
+// New returns a new model with sensible defaults.
+func New(items []Item, delegate ItemDelegate, width, height int) Model {
+ styles := DefaultStyles()
+
+ sp := spinner.New()
+ sp.Spinner = spinner.Line
+ sp.Style = styles.Spinner
+
+ filterInput := textinput.New()
+ filterInput.Prompt = "Filter: "
+ filterInput.PromptStyle = styles.FilterPrompt
+ filterInput.Cursor.Style = styles.FilterCursor
+ filterInput.CharLimit = 64
+ filterInput.Focus()
+
+ p := paginator.New()
+ p.Type = paginator.Dots
+ p.ActiveDot = styles.ActivePaginationDot.String()
+ p.InactiveDot = styles.InactivePaginationDot.String()
+
+ m := Model{
+ showTitle: true,
+ showFilter: true,
+ showStatusBar: true,
+ showPagination: true,
+ showHelp: true,
+ itemNameSingular: "item",
+ itemNamePlural: "items",
+ filteringEnabled: true,
+ KeyMap: DefaultKeyMap(),
+ Filter: DefaultFilter,
+ Styles: styles,
+ Title: "List",
+ FilterInput: filterInput,
+ StatusMessageLifetime: time.Second,
+
+ width: width,
+ height: height,
+ delegate: delegate,
+ items: items,
+ Paginator: p,
+ spinner: sp,
+ Help: help.New(),
+ }
+
+ m.updatePagination()
+ m.updateKeybindings()
+ return m
+}
+
+// NewModel returns a new model with sensible defaults.
+//
+// Deprecated: use [New] instead.
+var NewModel = New
+
+// SetFilteringEnabled enables or disables filtering. Note that this is different
+// from ShowFilter, which merely hides or shows the input view.
+func (m *Model) SetFilteringEnabled(v bool) {
+ m.filteringEnabled = v
+ if !v {
+ m.resetFiltering()
+ }
+ m.updateKeybindings()
+}
+
+// FilteringEnabled returns whether or not filtering is enabled.
+func (m Model) FilteringEnabled() bool {
+ return m.filteringEnabled
+}
+
+// SetShowTitle shows or hides the title bar.
+func (m *Model) SetShowTitle(v bool) {
+ m.showTitle = v
+ m.updatePagination()
+}
+
+// ShowTitle returns whether or not the title bar is set to be rendered.
+func (m Model) ShowTitle() bool {
+ return m.showTitle
+}
+
+// SetShowFilter shows or hides the filer bar. Note that this does not disable
+// filtering, it simply hides the built-in filter view. This allows you to
+// use the FilterInput to render the filtering UI differently without having to
+// re-implement filtering from scratch.
+//
+// To disable filtering entirely use EnableFiltering.
+func (m *Model) SetShowFilter(v bool) {
+ m.showFilter = v
+ m.updatePagination()
+}
+
+// ShowFilter returns whether or not the filter is set to be rendered. Note
+// that this is separate from FilteringEnabled, so filtering can be hidden yet
+// still invoked. This allows you to render filtering differently without
+// having to re-implement it from scratch.
+func (m Model) ShowFilter() bool {
+ return m.showFilter
+}
+
+// SetShowStatusBar shows or hides the view that displays metadata about the
+// list, such as item counts.
+func (m *Model) SetShowStatusBar(v bool) {
+ m.showStatusBar = v
+ m.updatePagination()
+}
+
+// ShowStatusBar returns whether or not the status bar is set to be rendered.
+func (m Model) ShowStatusBar() bool {
+ return m.showStatusBar
+}
+
+// SetStatusBarItemName defines a replacement for the item's identifier.
+// Defaults to item/items.
+func (m *Model) SetStatusBarItemName(singular, plural string) {
+ m.itemNameSingular = singular
+ m.itemNamePlural = plural
+}
+
+// StatusBarItemName returns singular and plural status bar item names.
+func (m Model) StatusBarItemName() (string, string) {
+ return m.itemNameSingular, m.itemNamePlural
+}
+
+// SetShowPagination hides or shows the paginator. Note that pagination will
+// still be active, it simply won't be displayed.
+func (m *Model) SetShowPagination(v bool) {
+ m.showPagination = v
+ m.updatePagination()
+}
+
+// ShowPagination returns whether the pagination is visible.
+func (m *Model) ShowPagination() bool {
+ return m.showPagination
+}
+
+// SetShowHelp shows or hides the help view.
+func (m *Model) SetShowHelp(v bool) {
+ m.showHelp = v
+ m.updatePagination()
+}
+
+// ShowHelp returns whether or not the help is set to be rendered.
+func (m Model) ShowHelp() bool {
+ return m.showHelp
+}
+
+// Items returns the items in the list.
+func (m Model) Items() []Item {
+ return m.items
+}
+
+// SetItems sets the items available in the list. This returns a command.
+func (m *Model) SetItems(i []Item) tea.Cmd {
+ var cmd tea.Cmd
+ m.items = i
+
+ if m.filterState != Unfiltered {
+ m.filteredItems = nil
+ cmd = filterItems(*m)
+ }
+
+ m.updatePagination()
+ m.updateKeybindings()
+ return cmd
+}
+
+// Select selects the given index of the list and goes to its respective page.
+func (m *Model) Select(index int) {
+ m.Paginator.Page = index / m.Paginator.PerPage
+ m.cursor = index % m.Paginator.PerPage
+}
+
+// ResetSelected resets the selected item to the first item in the first page of the list.
+func (m *Model) ResetSelected() {
+ m.Select(0)
+}
+
+// ResetFilter resets the current filtering state.
+func (m *Model) ResetFilter() {
+ m.resetFiltering()
+}
+
+// SetItem replaces an item at the given index. This returns a command.
+func (m *Model) SetItem(index int, item Item) tea.Cmd {
+ var cmd tea.Cmd
+ m.items[index] = item
+
+ if m.filterState != Unfiltered {
+ cmd = filterItems(*m)
+ }
+
+ m.updatePagination()
+ return cmd
+}
+
+// InsertItem inserts an item at the given index. If the index is out of the upper bound,
+// the item will be appended. This returns a command.
+func (m *Model) InsertItem(index int, item Item) tea.Cmd {
+ var cmd tea.Cmd
+ m.items = insertItemIntoSlice(m.items, item, index)
+
+ if m.filterState != Unfiltered {
+ cmd = filterItems(*m)
+ }
+
+ m.updatePagination()
+ m.updateKeybindings()
+ return cmd
+}
+
+// RemoveItem removes an item at the given index. If the index is out of bounds
+// this will be a no-op. O(n) complexity, which probably won't matter in the
+// case of a TUI.
+func (m *Model) RemoveItem(index int) {
+ m.items = removeItemFromSlice(m.items, index)
+ if m.filterState != Unfiltered {
+ m.filteredItems = removeFilterMatchFromSlice(m.filteredItems, index)
+ if len(m.filteredItems) == 0 {
+ m.resetFiltering()
+ }
+ }
+ m.updatePagination()
+}
+
+// SetDelegate sets the item delegate.
+func (m *Model) SetDelegate(d ItemDelegate) {
+ m.delegate = d
+ m.updatePagination()
+}
+
+// VisibleItems returns the total items available to be shown.
+func (m Model) VisibleItems() []Item {
+ if m.filterState != Unfiltered {
+ return m.filteredItems.items()
+ }
+ return m.items
+}
+
+// SelectedItem returns the current selected item in the list.
+func (m Model) SelectedItem() Item {
+ i := m.Index()
+
+ items := m.VisibleItems()
+ if i < 0 || len(items) == 0 || len(items) <= i {
+ return nil
+ }
+
+ return items[i]
+}
+
+// MatchesForItem returns rune positions matched by the current filter, if any.
+// Use this to style runes matched by the active filter.
+//
+// See DefaultItemView for a usage example.
+func (m Model) MatchesForItem(index int) []int {
+ if m.filteredItems == nil || index >= len(m.filteredItems) {
+ return nil
+ }
+ return m.filteredItems[index].matches
+}
+
+// Index returns the index of the currently selected item as it appears in the
+// entire slice of items.
+func (m Model) Index() int {
+ return m.Paginator.Page*m.Paginator.PerPage + m.cursor
+}
+
+// Cursor returns the index of the cursor on the current page.
+func (m Model) Cursor() int {
+ return m.cursor
+}
+
+// CursorUp moves the cursor up. This can also move the state to the previous
+// page.
+func (m *Model) CursorUp() {
+ m.cursor--
+
+ // If we're at the start, stop
+ if m.cursor < 0 && m.Paginator.Page == 0 {
+ // if infinite scrolling is enabled, go to the last item
+ if m.InfiniteScrolling {
+ m.Paginator.Page = m.Paginator.TotalPages - 1
+ m.cursor = m.Paginator.ItemsOnPage(len(m.VisibleItems())) - 1
+ return
+ }
+
+ m.cursor = 0
+ return
+ }
+
+ // Move the cursor as normal
+ if m.cursor >= 0 {
+ return
+ }
+
+ // Go to the previous page
+ m.Paginator.PrevPage()
+ m.cursor = m.Paginator.ItemsOnPage(len(m.VisibleItems())) - 1
+}
+
+// CursorDown moves the cursor down. This can also advance the state to the
+// next page.
+func (m *Model) CursorDown() {
+ itemsOnPage := m.Paginator.ItemsOnPage(len(m.VisibleItems()))
+
+ m.cursor++
+
+ // If we're at the end, stop
+ if m.cursor < itemsOnPage {
+ return
+ }
+
+ // Go to the next page
+ if !m.Paginator.OnLastPage() {
+ m.Paginator.NextPage()
+ m.cursor = 0
+ return
+ }
+
+ // During filtering the cursor position can exceed the number of
+ // itemsOnPage. It's more intuitive to start the cursor at the
+ // topmost position when moving it down in this scenario.
+ if m.cursor > itemsOnPage {
+ m.cursor = 0
+ return
+ }
+
+ m.cursor = itemsOnPage - 1
+
+ // if infinite scrolling is enabled, go to the first item
+ if m.InfiniteScrolling {
+ m.Paginator.Page = 0
+ m.cursor = 0
+ }
+}
+
+// PrevPage moves to the previous page, if available.
+func (m Model) PrevPage() {
+ m.Paginator.PrevPage()
+}
+
+// NextPage moves to the next page, if available.
+func (m Model) NextPage() {
+ m.Paginator.NextPage()
+}
+
+// FilterState returns the current filter state.
+func (m Model) FilterState() FilterState {
+ return m.filterState
+}
+
+// FilterValue returns the current value of the filter.
+func (m Model) FilterValue() string {
+ return m.FilterInput.Value()
+}
+
+// SettingFilter returns whether or not the user is currently editing the
+// filter value. It's purely a convenience method for the following:
+//
+// m.FilterState() == Filtering
+//
+// It's included here because it's a common thing to check for when
+// implementing this component.
+func (m Model) SettingFilter() bool {
+ return m.filterState == Filtering
+}
+
+// IsFiltered returns whether or not the list is currently filtered.
+// It's purely a convenience method for the following:
+//
+// m.FilterState() == FilterApplied
+func (m Model) IsFiltered() bool {
+ return m.filterState == FilterApplied
+}
+
+// Width returns the current width setting.
+func (m Model) Width() int {
+ return m.width
+}
+
+// Height returns the current height setting.
+func (m Model) Height() int {
+ return m.height
+}
+
+// SetSpinner allows to set the spinner style.
+func (m *Model) SetSpinner(spinner spinner.Spinner) {
+ m.spinner.Spinner = spinner
+}
+
+// ToggleSpinner toggles the spinner. Note that this also returns a command.
+func (m *Model) ToggleSpinner() tea.Cmd {
+ if !m.showSpinner {
+ return m.StartSpinner()
+ }
+ m.StopSpinner()
+ return nil
+}
+
+// StartSpinner starts the spinner. Note that this returns a command.
+func (m *Model) StartSpinner() tea.Cmd {
+ m.showSpinner = true
+ return m.spinner.Tick
+}
+
+// StopSpinner stops the spinner.
+func (m *Model) StopSpinner() {
+ m.showSpinner = false
+}
+
+// DisableQuitKeybindings is a helper for disabling the keybindings used for quitting,
+// in case you want to handle this elsewhere in your application.
+func (m *Model) DisableQuitKeybindings() {
+ m.disableQuitKeybindings = true
+ m.KeyMap.Quit.SetEnabled(false)
+ m.KeyMap.ForceQuit.SetEnabled(false)
+}
+
+// NewStatusMessage sets a new status message, which will show for a limited
+// amount of time. Note that this also returns a command.
+func (m *Model) NewStatusMessage(s string) tea.Cmd {
+ m.statusMessage = s
+ if m.statusMessageTimer != nil {
+ m.statusMessageTimer.Stop()
+ }
+
+ m.statusMessageTimer = time.NewTimer(m.StatusMessageLifetime)
+
+ // Wait for timeout
+ return func() tea.Msg {
+ <-m.statusMessageTimer.C
+ return statusMessageTimeoutMsg{}
+ }
+}
+
+// SetSize sets the width and height of this component.
+func (m *Model) SetSize(width, height int) {
+ m.setSize(width, height)
+}
+
+// SetWidth sets the width of this component.
+func (m *Model) SetWidth(v int) {
+ m.setSize(v, m.height)
+}
+
+// SetHeight sets the height of this component.
+func (m *Model) SetHeight(v int) {
+ m.setSize(m.width, v)
+}
+
+func (m *Model) setSize(width, height int) {
+ promptWidth := lipgloss.Width(m.Styles.Title.Render(m.FilterInput.Prompt))
+
+ m.width = width
+ m.height = height
+ m.Help.Width = width
+ m.FilterInput.Width = width - promptWidth - lipgloss.Width(m.spinnerView())
+ m.updatePagination()
+}
+
+func (m *Model) resetFiltering() {
+ if m.filterState == Unfiltered {
+ return
+ }
+
+ m.filterState = Unfiltered
+ m.FilterInput.Reset()
+ m.filteredItems = nil
+ m.updatePagination()
+ m.updateKeybindings()
+}
+
+func (m Model) itemsAsFilterItems() filteredItems {
+ fi := make([]filteredItem, len(m.items))
+ for i, item := range m.items {
+ fi[i] = filteredItem{
+ item: item,
+ }
+ }
+ return fi
+}
+
+// Set keybindings according to the filter state.
+func (m *Model) updateKeybindings() {
+ switch m.filterState {
+ case Filtering:
+ m.KeyMap.CursorUp.SetEnabled(false)
+ m.KeyMap.CursorDown.SetEnabled(false)
+ m.KeyMap.NextPage.SetEnabled(false)
+ m.KeyMap.PrevPage.SetEnabled(false)
+ m.KeyMap.GoToStart.SetEnabled(false)
+ m.KeyMap.GoToEnd.SetEnabled(false)
+ m.KeyMap.Filter.SetEnabled(false)
+ m.KeyMap.ClearFilter.SetEnabled(false)
+ m.KeyMap.CancelWhileFiltering.SetEnabled(true)
+ m.KeyMap.AcceptWhileFiltering.SetEnabled(m.FilterInput.Value() != "")
+ m.KeyMap.Quit.SetEnabled(false)
+ m.KeyMap.ShowFullHelp.SetEnabled(false)
+ m.KeyMap.CloseFullHelp.SetEnabled(false)
+
+ default:
+ hasItems := len(m.items) != 0
+ m.KeyMap.CursorUp.SetEnabled(hasItems)
+ m.KeyMap.CursorDown.SetEnabled(hasItems)
+
+ hasPages := m.Paginator.TotalPages > 1
+ m.KeyMap.NextPage.SetEnabled(hasPages)
+ m.KeyMap.PrevPage.SetEnabled(hasPages)
+
+ m.KeyMap.GoToStart.SetEnabled(hasItems)
+ m.KeyMap.GoToEnd.SetEnabled(hasItems)
+
+ m.KeyMap.Filter.SetEnabled(m.filteringEnabled && hasItems)
+ m.KeyMap.ClearFilter.SetEnabled(m.filterState == FilterApplied)
+ m.KeyMap.CancelWhileFiltering.SetEnabled(false)
+ m.KeyMap.AcceptWhileFiltering.SetEnabled(false)
+ m.KeyMap.Quit.SetEnabled(!m.disableQuitKeybindings)
+
+ if m.Help.ShowAll {
+ m.KeyMap.ShowFullHelp.SetEnabled(true)
+ m.KeyMap.CloseFullHelp.SetEnabled(true)
+ } else {
+ minHelp := countEnabledBindings(m.FullHelp()) > 1
+ m.KeyMap.ShowFullHelp.SetEnabled(minHelp)
+ m.KeyMap.CloseFullHelp.SetEnabled(minHelp)
+ }
+ }
+}
+
+// Update pagination according to the amount of items for the current state.
+func (m *Model) updatePagination() {
+ index := m.Index()
+ availHeight := m.height
+
+ if m.showTitle || (m.showFilter && m.filteringEnabled) {
+ availHeight -= lipgloss.Height(m.titleView())
+ }
+ if m.showStatusBar {
+ availHeight -= lipgloss.Height(m.statusView())
+ }
+ if m.showPagination {
+ availHeight -= lipgloss.Height(m.paginationView())
+ }
+ if m.showHelp {
+ availHeight -= lipgloss.Height(m.helpView())
+ }
+
+ m.Paginator.PerPage = max(1, availHeight/(m.delegate.Height()+m.delegate.Spacing()))
+
+ if pages := len(m.VisibleItems()); pages < 1 {
+ m.Paginator.SetTotalPages(1)
+ } else {
+ m.Paginator.SetTotalPages(pages)
+ }
+
+ // Restore index
+ m.Paginator.Page = index / m.Paginator.PerPage
+ m.cursor = index % m.Paginator.PerPage
+
+ // Make sure the page stays in bounds
+ if m.Paginator.Page >= m.Paginator.TotalPages-1 {
+ m.Paginator.Page = max(0, m.Paginator.TotalPages-1)
+ }
+}
+
+func (m *Model) hideStatusMessage() {
+ m.statusMessage = ""
+ if m.statusMessageTimer != nil {
+ m.statusMessageTimer.Stop()
+ }
+}
+
+// Update is the Bubble Tea update loop.
+func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
+ var cmds []tea.Cmd
+
+ switch msg := msg.(type) {
+ case tea.KeyMsg:
+ if key.Matches(msg, m.KeyMap.ForceQuit) {
+ return m, tea.Quit
+ }
+
+ case FilterMatchesMsg:
+ m.filteredItems = filteredItems(msg)
+ return m, nil
+
+ case spinner.TickMsg:
+ newSpinnerModel, cmd := m.spinner.Update(msg)
+ m.spinner = newSpinnerModel
+ if m.showSpinner {
+ cmds = append(cmds, cmd)
+ }
+
+ case statusMessageTimeoutMsg:
+ m.hideStatusMessage()
+ }
+
+ if m.filterState == Filtering {
+ cmds = append(cmds, m.handleFiltering(msg))
+ } else {
+ cmds = append(cmds, m.handleBrowsing(msg))
+ }
+
+ return m, tea.Batch(cmds...)
+}
+
+// Updates for when a user is browsing the list.
+func (m *Model) handleBrowsing(msg tea.Msg) tea.Cmd {
+ var cmds []tea.Cmd
+ numItems := len(m.VisibleItems())
+
+ switch msg := msg.(type) {
+ case tea.KeyMsg:
+ switch {
+ // Note: we match clear filter before quit because, by default, they're
+ // both mapped to escape.
+ case key.Matches(msg, m.KeyMap.ClearFilter):
+ m.resetFiltering()
+
+ case key.Matches(msg, m.KeyMap.Quit):
+ return tea.Quit
+
+ case key.Matches(msg, m.KeyMap.CursorUp):
+ m.CursorUp()
+
+ case key.Matches(msg, m.KeyMap.CursorDown):
+ m.CursorDown()
+
+ case key.Matches(msg, m.KeyMap.PrevPage):
+ m.Paginator.PrevPage()
+
+ case key.Matches(msg, m.KeyMap.NextPage):
+ m.Paginator.NextPage()
+
+ case key.Matches(msg, m.KeyMap.GoToStart):
+ m.Paginator.Page = 0
+ m.cursor = 0
+
+ case key.Matches(msg, m.KeyMap.GoToEnd):
+ m.Paginator.Page = m.Paginator.TotalPages - 1
+ m.cursor = m.Paginator.ItemsOnPage(numItems) - 1
+
+ case key.Matches(msg, m.KeyMap.Filter):
+ m.hideStatusMessage()
+ if m.FilterInput.Value() == "" {
+ // Populate filter with all items only if the filter is empty.
+ m.filteredItems = m.itemsAsFilterItems()
+ }
+ m.Paginator.Page = 0
+ m.cursor = 0
+ m.filterState = Filtering
+ m.FilterInput.CursorEnd()
+ m.FilterInput.Focus()
+ m.updateKeybindings()
+ return textinput.Blink
+
+ case key.Matches(msg, m.KeyMap.ShowFullHelp):
+ fallthrough
+ case key.Matches(msg, m.KeyMap.CloseFullHelp):
+ m.Help.ShowAll = !m.Help.ShowAll
+ m.updatePagination()
+ }
+ }
+
+ cmd := m.delegate.Update(msg, m)
+ cmds = append(cmds, cmd)
+
+ // Keep the index in bounds when paginating
+ itemsOnPage := m.Paginator.ItemsOnPage(len(m.VisibleItems()))
+ if m.cursor > itemsOnPage-1 {
+ m.cursor = max(0, itemsOnPage-1)
+ }
+
+ return tea.Batch(cmds...)
+}
+
+// Updates for when a user is in the filter editing interface.
+func (m *Model) handleFiltering(msg tea.Msg) tea.Cmd {
+ var cmds []tea.Cmd
+
+ // Handle keys
+ if msg, ok := msg.(tea.KeyMsg); ok {
+ switch {
+ case key.Matches(msg, m.KeyMap.CancelWhileFiltering):
+ m.resetFiltering()
+ m.KeyMap.Filter.SetEnabled(true)
+ m.KeyMap.ClearFilter.SetEnabled(false)
+
+ case key.Matches(msg, m.KeyMap.AcceptWhileFiltering):
+ m.hideStatusMessage()
+
+ if len(m.items) == 0 {
+ break
+ }
+
+ h := m.VisibleItems()
+
+ // If we've filtered down to nothing, clear the filter
+ if len(h) == 0 {
+ m.resetFiltering()
+ break
+ }
+
+ m.FilterInput.Blur()
+ m.filterState = FilterApplied
+ m.updateKeybindings()
+
+ if m.FilterInput.Value() == "" {
+ m.resetFiltering()
+ }
+ }
+ }
+
+ // Update the filter text input component
+ newFilterInputModel, inputCmd := m.FilterInput.Update(msg)
+ filterChanged := m.FilterInput.Value() != newFilterInputModel.Value()
+ m.FilterInput = newFilterInputModel
+ cmds = append(cmds, inputCmd)
+
+ // If the filtering input has changed, request updated filtering
+ if filterChanged {
+ cmds = append(cmds, filterItems(*m))
+ m.KeyMap.AcceptWhileFiltering.SetEnabled(m.FilterInput.Value() != "")
+ }
+
+ // Update pagination
+ m.updatePagination()
+
+ return tea.Batch(cmds...)
+}
+
+// ShortHelp returns bindings to show in the abbreviated help view. It's part
+// of the help.KeyMap interface.
+func (m Model) ShortHelp() []key.Binding {
+ kb := []key.Binding{
+ m.KeyMap.CursorUp,
+ m.KeyMap.CursorDown,
+ }
+
+ filtering := m.filterState == Filtering
+
+ // If the delegate implements the help.KeyMap interface add the short help
+ // items to the short help after the cursor movement keys.
+ if !filtering {
+ if b, ok := m.delegate.(help.KeyMap); ok {
+ kb = append(kb, b.ShortHelp()...)
+ }
+ }
+
+ kb = append(kb,
+ m.KeyMap.Filter,
+ m.KeyMap.ClearFilter,
+ m.KeyMap.AcceptWhileFiltering,
+ m.KeyMap.CancelWhileFiltering,
+ )
+
+ if !filtering && m.AdditionalShortHelpKeys != nil {
+ kb = append(kb, m.AdditionalShortHelpKeys()...)
+ }
+
+ return append(kb,
+ m.KeyMap.Quit,
+ m.KeyMap.ShowFullHelp,
+ )
+}
+
+// FullHelp returns bindings to show the full help view. It's part of the
+// help.KeyMap interface.
+func (m Model) FullHelp() [][]key.Binding {
+ kb := [][]key.Binding{{
+ m.KeyMap.CursorUp,
+ m.KeyMap.CursorDown,
+ m.KeyMap.NextPage,
+ m.KeyMap.PrevPage,
+ m.KeyMap.GoToStart,
+ m.KeyMap.GoToEnd,
+ }}
+
+ filtering := m.filterState == Filtering
+
+ // If the delegate implements the help.KeyMap interface add full help
+ // keybindings to a special section of the full help.
+ if !filtering {
+ if b, ok := m.delegate.(help.KeyMap); ok {
+ kb = append(kb, b.FullHelp()...)
+ }
+ }
+
+ listLevelBindings := []key.Binding{
+ m.KeyMap.Filter,
+ m.KeyMap.ClearFilter,
+ m.KeyMap.AcceptWhileFiltering,
+ m.KeyMap.CancelWhileFiltering,
+ }
+
+ if !filtering && m.AdditionalFullHelpKeys != nil {
+ listLevelBindings = append(listLevelBindings, m.AdditionalFullHelpKeys()...)
+ }
+
+ return append(kb,
+ listLevelBindings,
+ []key.Binding{
+ m.KeyMap.Quit,
+ m.KeyMap.CloseFullHelp,
+ })
+}
+
+// View renders the component.
+func (m Model) View() string {
+ var (
+ sections []string
+ availHeight = m.height
+ )
+
+ if m.showTitle || (m.showFilter && m.filteringEnabled) {
+ v := m.titleView()
+ sections = append(sections, v)
+ availHeight -= lipgloss.Height(v)
+ }
+
+ if m.showStatusBar {
+ v := m.statusView()
+ sections = append(sections, v)
+ availHeight -= lipgloss.Height(v)
+ }
+
+ var pagination string
+ if m.showPagination {
+ pagination = m.paginationView()
+ availHeight -= lipgloss.Height(pagination)
+ }
+
+ var help string
+ if m.showHelp {
+ help = m.helpView()
+ availHeight -= lipgloss.Height(help)
+ }
+
+ content := lipgloss.NewStyle().Height(availHeight).Render(m.populatedView())
+ sections = append(sections, content)
+
+ if m.showPagination {
+ sections = append(sections, pagination)
+ }
+
+ if m.showHelp {
+ sections = append(sections, help)
+ }
+
+ return lipgloss.JoinVertical(lipgloss.Left, sections...)
+}
+
+func (m Model) titleView() string {
+ var (
+ view string
+ titleBarStyle = m.Styles.TitleBar.Copy()
+
+ // We need to account for the size of the spinner, even if we don't
+ // render it, to reserve some space for it should we turn it on later.
+ spinnerView = m.spinnerView()
+ spinnerWidth = lipgloss.Width(spinnerView)
+ spinnerLeftGap = " "
+ spinnerOnLeft = titleBarStyle.GetPaddingLeft() >= spinnerWidth+lipgloss.Width(spinnerLeftGap) && m.showSpinner
+ )
+
+ // If the filter's showing, draw that. Otherwise draw the title.
+ if m.showFilter && m.filterState == Filtering {
+ view += m.FilterInput.View()
+ } else if m.showTitle {
+ if m.showSpinner && spinnerOnLeft {
+ view += spinnerView + spinnerLeftGap
+ titleBarGap := titleBarStyle.GetPaddingLeft()
+ titleBarStyle = titleBarStyle.PaddingLeft(titleBarGap - spinnerWidth - lipgloss.Width(spinnerLeftGap))
+ }
+
+ view += m.Styles.Title.Render(m.Title)
+
+ // Status message
+ if m.filterState != Filtering {
+ view += " " + m.statusMessage
+ view = truncate.StringWithTail(view, uint(m.width-spinnerWidth), ellipsis)
+ }
+ }
+
+ // Spinner
+ if m.showSpinner && !spinnerOnLeft {
+ // Place spinner on the right
+ availSpace := m.width - lipgloss.Width(m.Styles.TitleBar.Render(view))
+ if availSpace > spinnerWidth {
+ view += strings.Repeat(" ", availSpace-spinnerWidth)
+ view += spinnerView
+ }
+ }
+
+ if len(view) > 0 {
+ return titleBarStyle.Render(view)
+ }
+ return view
+}
+
+func (m Model) statusView() string {
+ var status string
+
+ totalItems := len(m.items)
+ visibleItems := len(m.VisibleItems())
+
+ var itemName string
+ if visibleItems != 1 {
+ itemName = m.itemNamePlural
+ } else {
+ itemName = m.itemNameSingular
+ }
+
+ itemsDisplay := fmt.Sprintf("%d %s", visibleItems, itemName)
+
+ if m.filterState == Filtering {
+ // Filter results
+ if visibleItems == 0 {
+ status = m.Styles.StatusEmpty.Render("Nothing matched")
+ } else {
+ status = itemsDisplay
+ }
+ } else if len(m.items) == 0 {
+ // Not filtering: no items.
+ status = m.Styles.StatusEmpty.Render("No " + m.itemNamePlural)
+ } else {
+ // Normal
+ filtered := m.FilterState() == FilterApplied
+
+ if filtered {
+ f := strings.TrimSpace(m.FilterInput.Value())
+ f = truncate.StringWithTail(f, 10, "…")
+ status += fmt.Sprintf("“%s” ", f)
+ }
+
+ status += itemsDisplay
+ }
+
+ numFiltered := totalItems - visibleItems
+ if numFiltered > 0 {
+ status += m.Styles.DividerDot.String()
+ status += m.Styles.StatusBarFilterCount.Render(fmt.Sprintf("%d filtered", numFiltered))
+ }
+
+ return m.Styles.StatusBar.Render(status)
+}
+
+func (m Model) paginationView() string {
+ if m.Paginator.TotalPages < 2 { //nolint:gomnd
+ return ""
+ }
+
+ s := m.Paginator.View()
+
+ // If the dot pagination is wider than the width of the window
+ // use the arabic paginator.
+ if ansi.PrintableRuneWidth(s) > m.width {
+ m.Paginator.Type = paginator.Arabic
+ s = m.Styles.ArabicPagination.Render(m.Paginator.View())
+ }
+
+ style := m.Styles.PaginationStyle
+ if m.delegate.Spacing() == 0 && style.GetMarginTop() == 0 {
+ style = style.Copy().MarginTop(1)
+ }
+
+ return style.Render(s)
+}
+
+func (m Model) populatedView() string {
+ items := m.VisibleItems()
+
+ var b strings.Builder
+
+ // Empty states
+ if len(items) == 0 {
+ if m.filterState == Filtering {
+ return ""
+ }
+ return m.Styles.NoItems.Render("No " + m.itemNamePlural + " found.")
+ }
+
+ if len(items) > 0 {
+ start, end := m.Paginator.GetSliceBounds(len(items))
+ docs := items[start:end]
+
+ for i, item := range docs {
+ m.delegate.Render(&b, m, i+start, item)
+ if i != len(docs)-1 {
+ fmt.Fprint(&b, strings.Repeat("\n", m.delegate.Spacing()+1))
+ }
+ }
+ }
+
+ // If there aren't enough items to fill up this page (always the last page)
+ // then we need to add some newlines to fill up the space where items would
+ // have been.
+ itemsOnPage := m.Paginator.ItemsOnPage(len(items))
+ if itemsOnPage < m.Paginator.PerPage {
+ n := (m.Paginator.PerPage - itemsOnPage) * (m.delegate.Height() + m.delegate.Spacing())
+ if len(items) == 0 {
+ n -= m.delegate.Height() - 1
+ }
+ fmt.Fprint(&b, strings.Repeat("\n", n))
+ }
+
+ return b.String()
+}
+
+func (m Model) helpView() string {
+ return m.Styles.HelpStyle.Render(m.Help.View(m))
+}
+
+func (m Model) spinnerView() string {
+ return m.spinner.View()
+}
+
+func filterItems(m Model) tea.Cmd {
+ return func() tea.Msg {
+ if m.FilterInput.Value() == "" || m.filterState == Unfiltered {
+ return FilterMatchesMsg(m.itemsAsFilterItems()) // return nothing
+ }
+
+ targets := []string{}
+ items := m.items
+
+ for _, t := range items {
+ targets = append(targets, t.FilterValue())
+ }
+
+ filterMatches := []filteredItem{}
+ for _, r := range m.Filter(m.FilterInput.Value(), targets) {
+ filterMatches = append(filterMatches, filteredItem{
+ item: items[r.Index],
+ matches: r.MatchedIndexes,
+ })
+ }
+
+ return FilterMatchesMsg(filterMatches)
+ }
+}
+
+func insertItemIntoSlice(items []Item, item Item, index int) []Item {
+ if items == nil {
+ return []Item{item}
+ }
+ if index >= len(items) {
+ return append(items, item)
+ }
+
+ index = max(0, index)
+
+ items = append(items, nil)
+ copy(items[index+1:], items[index:])
+ items[index] = item
+ return items
+}
+
+// Remove an item from a slice of items at the given index. This runs in O(n).
+func removeItemFromSlice(i []Item, index int) []Item {
+ if index >= len(i) {
+ return i // noop
+ }
+ copy(i[index:], i[index+1:])
+ i[len(i)-1] = nil
+ return i[:len(i)-1]
+}
+
+func removeFilterMatchFromSlice(i []filteredItem, index int) []filteredItem {
+ if index >= len(i) {
+ return i // noop
+ }
+ copy(i[index:], i[index+1:])
+ i[len(i)-1] = filteredItem{}
+ return i[:len(i)-1]
+}
+
+func countEnabledBindings(groups [][]key.Binding) (agg int) {
+ for _, group := range groups {
+ for _, kb := range group {
+ if kb.Enabled() {
+ agg++
+ }
+ }
+ }
+ return agg
+}
+
+func max(a, b int) int {
+ if a > b {
+ return a
+ }
+ return b
+}
diff --git a/vendor/github.com/charmbracelet/bubbles/list/style.go b/vendor/github.com/charmbracelet/bubbles/list/style.go
new file mode 100644
index 000000000..e4451f87b
--- /dev/null
+++ b/vendor/github.com/charmbracelet/bubbles/list/style.go
@@ -0,0 +1,99 @@
+package list
+
+import (
+ "github.com/charmbracelet/lipgloss"
+)
+
+const (
+ bullet = "•"
+ ellipsis = "…"
+)
+
+// Styles contains style definitions for this list component. By default, these
+// values are generated by DefaultStyles.
+type Styles struct {
+ TitleBar lipgloss.Style
+ Title lipgloss.Style
+ Spinner lipgloss.Style
+ FilterPrompt lipgloss.Style
+ FilterCursor lipgloss.Style
+
+ // Default styling for matched characters in a filter. This can be
+ // overridden by delegates.
+ DefaultFilterCharacterMatch lipgloss.Style
+
+ StatusBar lipgloss.Style
+ StatusEmpty lipgloss.Style
+ StatusBarActiveFilter lipgloss.Style
+ StatusBarFilterCount lipgloss.Style
+
+ NoItems lipgloss.Style
+
+ PaginationStyle lipgloss.Style
+ HelpStyle lipgloss.Style
+
+ // Styled characters.
+ ActivePaginationDot lipgloss.Style
+ InactivePaginationDot lipgloss.Style
+ ArabicPagination lipgloss.Style
+ DividerDot lipgloss.Style
+}
+
+// DefaultStyles returns a set of default style definitions for this list
+// component.
+func DefaultStyles() (s Styles) {
+ verySubduedColor := lipgloss.AdaptiveColor{Light: "#DDDADA", Dark: "#3C3C3C"}
+ subduedColor := lipgloss.AdaptiveColor{Light: "#9B9B9B", Dark: "#5C5C5C"}
+
+ s.TitleBar = lipgloss.NewStyle().Padding(0, 0, 1, 2)
+
+ s.Title = lipgloss.NewStyle().
+ Background(lipgloss.Color("62")).
+ Foreground(lipgloss.Color("230")).
+ Padding(0, 1)
+
+ s.Spinner = lipgloss.NewStyle().
+ Foreground(lipgloss.AdaptiveColor{Light: "#8E8E8E", Dark: "#747373"})
+
+ s.FilterPrompt = lipgloss.NewStyle().
+ Foreground(lipgloss.AdaptiveColor{Light: "#04B575", Dark: "#ECFD65"})
+
+ s.FilterCursor = lipgloss.NewStyle().
+ Foreground(lipgloss.AdaptiveColor{Light: "#EE6FF8", Dark: "#EE6FF8"})
+
+ s.DefaultFilterCharacterMatch = lipgloss.NewStyle().Underline(true)
+
+ s.StatusBar = lipgloss.NewStyle().
+ Foreground(lipgloss.AdaptiveColor{Light: "#A49FA5", Dark: "#777777"}).
+ Padding(0, 0, 1, 2)
+
+ s.StatusEmpty = lipgloss.NewStyle().Foreground(subduedColor)
+
+ s.StatusBarActiveFilter = lipgloss.NewStyle().
+ Foreground(lipgloss.AdaptiveColor{Light: "#1a1a1a", Dark: "#dddddd"})
+
+ s.StatusBarFilterCount = lipgloss.NewStyle().Foreground(verySubduedColor)
+
+ s.NoItems = lipgloss.NewStyle().
+ Foreground(lipgloss.AdaptiveColor{Light: "#909090", Dark: "#626262"})
+
+ s.ArabicPagination = lipgloss.NewStyle().Foreground(subduedColor)
+
+ s.PaginationStyle = lipgloss.NewStyle().PaddingLeft(2) //nolint:gomnd
+
+ s.HelpStyle = lipgloss.NewStyle().Padding(1, 0, 0, 2)
+
+ s.ActivePaginationDot = lipgloss.NewStyle().
+ Foreground(lipgloss.AdaptiveColor{Light: "#847A85", Dark: "#979797"}).
+ SetString(bullet)
+
+ s.InactivePaginationDot = lipgloss.NewStyle().
+ Foreground(verySubduedColor).
+ SetString(bullet)
+
+ s.DividerDot = lipgloss.NewStyle().
+ Foreground(verySubduedColor).
+ SetString(" " + bullet + " ")
+
+ return s
+}
diff --git a/vendor/github.com/charmbracelet/bubbles/paginator/paginator.go b/vendor/github.com/charmbracelet/bubbles/paginator/paginator.go
new file mode 100644
index 000000000..bb8aad508
--- /dev/null
+++ b/vendor/github.com/charmbracelet/bubbles/paginator/paginator.go
@@ -0,0 +1,193 @@
+// Package paginator provides a Bubble Tea package for calculating pagination
+// and rendering pagination info. Note that this package does not render actual
+// pages: it's purely for handling keystrokes related to pagination, and
+// rendering pagination status.
+package paginator
+
+import (
+ "fmt"
+
+ "github.com/charmbracelet/bubbles/key"
+ tea "github.com/charmbracelet/bubbletea"
+)
+
+// Type specifies the way we render pagination.
+type Type int
+
+// Pagination rendering options.
+const (
+ Arabic Type = iota
+ Dots
+)
+
+// KeyMap is the key bindings for different actions within the paginator.
+type KeyMap struct {
+ PrevPage key.Binding
+ NextPage key.Binding
+}
+
+// DefaultKeyMap is the default set of key bindings for navigating and acting
+// upon the paginator.
+var DefaultKeyMap = KeyMap{
+ PrevPage: key.NewBinding(key.WithKeys("pgup", "left", "h")),
+ NextPage: key.NewBinding(key.WithKeys("pgdown", "right", "l")),
+}
+
+// Model is the Bubble Tea model for this user interface.
+type Model struct {
+ // Type configures how the pagination is rendered (Arabic, Dots).
+ Type Type
+ // Page is the current page number.
+ Page int
+ // PerPage is the number of items per page.
+ PerPage int
+ // TotalPages is the total number of pages.
+ TotalPages int
+ // ActiveDot is used to mark the current page under the Dots display type.
+ ActiveDot string
+ // InactiveDot is used to mark inactive pages under the Dots display type.
+ InactiveDot string
+ // ArabicFormat is the printf-style format to use for the Arabic display type.
+ ArabicFormat string
+
+ // KeyMap encodes the keybindings recognized by the widget.
+ KeyMap KeyMap
+
+ // Deprecated: customize [KeyMap] instead.
+ UsePgUpPgDownKeys bool
+ // Deprecated: customize [KeyMap] instead.
+ UseLeftRightKeys bool
+ // Deprecated: customize [KeyMap] instead.
+ UseUpDownKeys bool
+ // Deprecated: customize [KeyMap] instead.
+ UseHLKeys bool
+ // Deprecated: customize [KeyMap] instead.
+ UseJKKeys bool
+}
+
+// SetTotalPages is a helper function for calculating the total number of pages
+// from a given number of items. Its use is optional since this pager can be
+// used for other things beyond navigating sets. Note that it both returns the
+// number of total pages and alters the model.
+func (m *Model) SetTotalPages(items int) int {
+ if items < 1 {
+ return m.TotalPages
+ }
+ n := items / m.PerPage
+ if items%m.PerPage > 0 {
+ n++
+ }
+ m.TotalPages = n
+ return n
+}
+
+// ItemsOnPage is a helper function for returning the number of items on the
+// current page given the total number of items passed as an argument.
+func (m Model) ItemsOnPage(totalItems int) int {
+ if totalItems < 1 {
+ return 0
+ }
+ start, end := m.GetSliceBounds(totalItems)
+ return end - start
+}
+
+// GetSliceBounds is a helper function for paginating slices. Pass the length
+// of the slice you're rendering and you'll receive the start and end bounds
+// corresponding to the pagination. For example:
+//
+// bunchOfStuff := []stuff{...}
+// start, end := model.GetSliceBounds(len(bunchOfStuff))
+// sliceToRender := bunchOfStuff[start:end]
+func (m *Model) GetSliceBounds(length int) (start int, end int) {
+ start = m.Page * m.PerPage
+ end = min(m.Page*m.PerPage+m.PerPage, length)
+ return start, end
+}
+
+// PrevPage is a helper function for navigating one page backward. It will not
+// page beyond the first page (i.e. page 0).
+func (m *Model) PrevPage() {
+ if m.Page > 0 {
+ m.Page--
+ }
+}
+
+// NextPage is a helper function for navigating one page forward. It will not
+// page beyond the last page (i.e. totalPages - 1).
+func (m *Model) NextPage() {
+ if !m.OnLastPage() {
+ m.Page++
+ }
+}
+
+// OnLastPage returns whether or not we're on the last page.
+func (m Model) OnLastPage() bool {
+ return m.Page == m.TotalPages-1
+}
+
+// New creates a new model with defaults.
+func New() Model {
+ return Model{
+ Type: Arabic,
+ Page: 0,
+ PerPage: 1,
+ TotalPages: 1,
+ KeyMap: DefaultKeyMap,
+ ActiveDot: "•",
+ InactiveDot: "○",
+ ArabicFormat: "%d/%d",
+ }
+}
+
+// NewModel creates a new model with defaults.
+//
+// Deprecated: use [New] instead.
+var NewModel = New
+
+// Update is the Tea update function which binds keystrokes to pagination.
+func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
+ switch msg := msg.(type) {
+ case tea.KeyMsg:
+ switch {
+ case key.Matches(msg, m.KeyMap.NextPage):
+ m.NextPage()
+ case key.Matches(msg, m.KeyMap.PrevPage):
+ m.PrevPage()
+ }
+ }
+
+ return m, nil
+}
+
+// View renders the pagination to a string.
+func (m Model) View() string {
+ switch m.Type {
+ case Dots:
+ return m.dotsView()
+ default:
+ return m.arabicView()
+ }
+}
+
+func (m Model) dotsView() string {
+ var s string
+ for i := 0; i < m.TotalPages; i++ {
+ if i == m.Page {
+ s += m.ActiveDot
+ continue
+ }
+ s += m.InactiveDot
+ }
+ return s
+}
+
+func (m Model) arabicView() string {
+ return fmt.Sprintf(m.ArabicFormat, m.Page+1, m.TotalPages)
+}
+
+func min(a, b int) int {
+ if a < b {
+ return a
+ }
+ return b
+}
diff --git a/vendor/github.com/charmbracelet/bubbles/spinner/spinner.go b/vendor/github.com/charmbracelet/bubbles/spinner/spinner.go
new file mode 100644
index 000000000..bb53597fe
--- /dev/null
+++ b/vendor/github.com/charmbracelet/bubbles/spinner/spinner.go
@@ -0,0 +1,230 @@
+package spinner
+
+import (
+ "sync"
+ "time"
+
+ tea "github.com/charmbracelet/bubbletea"
+ "github.com/charmbracelet/lipgloss"
+)
+
+// Internal ID management. Used during animating to ensure that frame messages
+// are received only by spinner components that sent them.
+var (
+ lastID int
+ idMtx sync.Mutex
+)
+
+// Return the next ID we should use on the Model.
+func nextID() int {
+ idMtx.Lock()
+ defer idMtx.Unlock()
+ lastID++
+ return lastID
+}
+
+// Spinner is a set of frames used in animating the spinner.
+type Spinner struct {
+ Frames []string
+ FPS time.Duration
+}
+
+// Some spinners to choose from. You could also make your own.
+var (
+ Line = Spinner{
+ Frames: []string{"|", "/", "-", "\\"},
+ FPS: time.Second / 10, //nolint:gomnd
+ }
+ Dot = Spinner{
+ Frames: []string{"⣾ ", "⣽ ", "⣻ ", "⢿ ", "⡿ ", "⣟ ", "⣯ ", "⣷ "},
+ FPS: time.Second / 10, //nolint:gomnd
+ }
+ MiniDot = Spinner{
+ Frames: []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"},
+ FPS: time.Second / 12, //nolint:gomnd
+ }
+ Jump = Spinner{
+ Frames: []string{"⢄", "⢂", "⢁", "⡁", "⡈", "⡐", "⡠"},
+ FPS: time.Second / 10, //nolint:gomnd
+ }
+ Pulse = Spinner{
+ Frames: []string{"█", "▓", "▒", "░"},
+ FPS: time.Second / 8, //nolint:gomnd
+ }
+ Points = Spinner{
+ Frames: []string{"∙∙∙", "●∙∙", "∙●∙", "∙∙●"},
+ FPS: time.Second / 7, //nolint:gomnd
+ }
+ Globe = Spinner{
+ Frames: []string{"🌍", "🌎", "🌏"},
+ FPS: time.Second / 4, //nolint:gomnd
+ }
+ Moon = Spinner{
+ Frames: []string{"🌑", "🌒", "🌓", "🌔", "🌕", "🌖", "🌗", "🌘"},
+ FPS: time.Second / 8, //nolint:gomnd
+ }
+ Monkey = Spinner{
+ Frames: []string{"🙈", "🙉", "🙊"},
+ FPS: time.Second / 3, //nolint:gomnd
+ }
+ Meter = Spinner{
+ Frames: []string{
+ "▱▱▱",
+ "▰▱▱",
+ "▰▰▱",
+ "▰▰▰",
+ "▰▰▱",
+ "▰▱▱",
+ "▱▱▱",
+ },
+ FPS: time.Second / 7, //nolint:gomnd
+ }
+ Hamburger = Spinner{
+ Frames: []string{"☱", "☲", "☴", "☲"},
+ FPS: time.Second / 3, //nolint:gomnd
+ }
+ Ellipsis = Spinner{
+ Frames: []string{"", ".", "..", "..."},
+ FPS: time.Second / 3, //nolint:gomnd
+ }
+)
+
+// Model contains the state for the spinner. Use New to create new models
+// rather than using Model as a struct literal.
+type Model struct {
+ // Spinner settings to use. See type Spinner.
+ Spinner Spinner
+
+ // Style sets the styling for the spinner. Most of the time you'll just
+ // want foreground and background coloring, and potentially some padding.
+ //
+ // For an introduction to styling with Lip Gloss see:
+ // https://github.com/charmbracelet/lipgloss
+ Style lipgloss.Style
+
+ frame int
+ id int
+ tag int
+}
+
+// ID returns the spinner's unique ID.
+func (m Model) ID() int {
+ return m.id
+}
+
+// New returns a model with default values.
+func New(opts ...Option) Model {
+ m := Model{
+ Spinner: Line,
+ id: nextID(),
+ }
+
+ for _, opt := range opts {
+ opt(&m)
+ }
+
+ return m
+}
+
+// NewModel returns a model with default values.
+//
+// Deprecated: use [New] instead.
+var NewModel = New
+
+// TickMsg indicates that the timer has ticked and we should render a frame.
+type TickMsg struct {
+ Time time.Time
+ tag int
+ ID int
+}
+
+// Update is the Tea update function.
+func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
+ switch msg := msg.(type) {
+ case TickMsg:
+ // If an ID is set, and the ID doesn't belong to this spinner, reject
+ // the message.
+ if msg.ID > 0 && msg.ID != m.id {
+ return m, nil
+ }
+
+ // If a tag is set, and it's not the one we expect, reject the message.
+ // This prevents the spinner from receiving too many messages and
+ // thus spinning too fast.
+ if msg.tag > 0 && msg.tag != m.tag {
+ return m, nil
+ }
+
+ m.frame++
+ if m.frame >= len(m.Spinner.Frames) {
+ m.frame = 0
+ }
+
+ m.tag++
+ return m, m.tick(m.id, m.tag)
+ default:
+ return m, nil
+ }
+}
+
+// View renders the model's view.
+func (m Model) View() string {
+ if m.frame >= len(m.Spinner.Frames) {
+ return "(error)"
+ }
+
+ return m.Style.Render(m.Spinner.Frames[m.frame])
+}
+
+// Tick is the command used to advance the spinner one frame. Use this command
+// to effectively start the spinner.
+func (m Model) Tick() tea.Msg {
+ return TickMsg{
+ // The time at which the tick occurred.
+ Time: time.Now(),
+
+ // The ID of the spinner that this message belongs to. This can be
+ // helpful when routing messages, however bear in mind that spinners
+ // will ignore messages that don't contain ID by default.
+ ID: m.id,
+
+ tag: m.tag,
+ }
+}
+
+func (m Model) tick(id, tag int) tea.Cmd {
+ return tea.Tick(m.Spinner.FPS, func(t time.Time) tea.Msg {
+ return TickMsg{
+ Time: t,
+ ID: id,
+ tag: tag,
+ }
+ })
+}
+
+// Tick is the command used to advance the spinner one frame. Use this command
+// to effectively start the spinner.
+//
+// Deprecated: Use [Model.Tick] instead.
+func Tick() tea.Msg {
+ return TickMsg{Time: time.Now()}
+}
+
+// Option is used to set options in New. For example:
+//
+// spinner := New(WithSpinner(Dot))
+type Option func(*Model)
+
+// WithSpinner is an option to set the spinner.
+func WithSpinner(spinner Spinner) Option {
+ return func(m *Model) {
+ m.Spinner = spinner
+ }
+}
+
+// WithStyle is an option to set the spinner style.
+func WithStyle(style lipgloss.Style) Option {
+ return func(m *Model) {
+ m.Style = style
+ }
+}
diff --git a/vendor/github.com/charmbracelet/bubbles/viewport/keymap.go b/vendor/github.com/charmbracelet/bubbles/viewport/keymap.go
new file mode 100644
index 000000000..9289706a8
--- /dev/null
+++ b/vendor/github.com/charmbracelet/bubbles/viewport/keymap.go
@@ -0,0 +1,48 @@
+package viewport
+
+import "github.com/charmbracelet/bubbles/key"
+
+const spacebar = " "
+
+// KeyMap defines the keybindings for the viewport. Note that you don't
+// necessary need to use keybindings at all; the viewport can be controlled
+// programmatically with methods like Model.LineDown(1). See the GoDocs for
+// details.
+type KeyMap struct {
+ PageDown key.Binding
+ PageUp key.Binding
+ HalfPageUp key.Binding
+ HalfPageDown key.Binding
+ Down key.Binding
+ Up key.Binding
+}
+
+// DefaultKeyMap returns a set of pager-like default keybindings.
+func DefaultKeyMap() KeyMap {
+ return KeyMap{
+ PageDown: key.NewBinding(
+ key.WithKeys("pgdown", spacebar, "f"),
+ key.WithHelp("f/pgdn", "page down"),
+ ),
+ PageUp: key.NewBinding(
+ key.WithKeys("pgup", "b"),
+ key.WithHelp("b/pgup", "page up"),
+ ),
+ HalfPageUp: key.NewBinding(
+ key.WithKeys("u", "ctrl+u"),
+ key.WithHelp("u", "½ page up"),
+ ),
+ HalfPageDown: key.NewBinding(
+ key.WithKeys("d", "ctrl+d"),
+ key.WithHelp("d", "½ page down"),
+ ),
+ Up: key.NewBinding(
+ key.WithKeys("up", "k"),
+ key.WithHelp("↑/k", "up"),
+ ),
+ Down: key.NewBinding(
+ key.WithKeys("down", "j"),
+ key.WithHelp("↓/j", "down"),
+ ),
+ }
+}
diff --git a/vendor/github.com/charmbracelet/bubbles/viewport/viewport.go b/vendor/github.com/charmbracelet/bubbles/viewport/viewport.go
new file mode 100644
index 000000000..b13e33c0f
--- /dev/null
+++ b/vendor/github.com/charmbracelet/bubbles/viewport/viewport.go
@@ -0,0 +1,404 @@
+package viewport
+
+import (
+ "math"
+ "strings"
+
+ "github.com/charmbracelet/bubbles/key"
+ tea "github.com/charmbracelet/bubbletea"
+ "github.com/charmbracelet/lipgloss"
+)
+
+// New returns a new model with the given width and height as well as default
+// key mappings.
+func New(width, height int) (m Model) {
+ m.Width = width
+ m.Height = height
+ m.setInitialValues()
+ return m
+}
+
+// Model is the Bubble Tea model for this viewport element.
+type Model struct {
+ Width int
+ Height int
+ KeyMap KeyMap
+
+ // Whether or not to respond to the mouse. The mouse must be enabled in
+ // Bubble Tea for this to work. For details, see the Bubble Tea docs.
+ MouseWheelEnabled bool
+
+ // The number of lines the mouse wheel will scroll. By default, this is 3.
+ MouseWheelDelta int
+
+ // YOffset is the vertical scroll position.
+ YOffset int
+
+ // YPosition is the position of the viewport in relation to the terminal
+ // window. It's used in high performance rendering only.
+ YPosition int
+
+ // Style applies a lipgloss style to the viewport. Realistically, it's most
+ // useful for setting borders, margins and padding.
+ Style lipgloss.Style
+
+ // HighPerformanceRendering bypasses the normal Bubble Tea renderer to
+ // provide higher performance rendering. Most of the time the normal Bubble
+ // Tea rendering methods will suffice, but if you're passing content with
+ // a lot of ANSI escape codes you may see improved rendering in certain
+ // terminals with this enabled.
+ //
+ // This should only be used in program occupying the entire terminal,
+ // which is usually via the alternate screen buffer.
+ HighPerformanceRendering bool
+
+ initialized bool
+ lines []string
+}
+
+func (m *Model) setInitialValues() {
+ m.KeyMap = DefaultKeyMap()
+ m.MouseWheelEnabled = true
+ m.MouseWheelDelta = 3
+ m.initialized = true
+}
+
+// Init exists to satisfy the tea.Model interface for composability purposes.
+func (m Model) Init() tea.Cmd {
+ return nil
+}
+
+// AtTop returns whether or not the viewport is at the very top position.
+func (m Model) AtTop() bool {
+ return m.YOffset <= 0
+}
+
+// AtBottom returns whether or not the viewport is at or past the very bottom
+// position.
+func (m Model) AtBottom() bool {
+ return m.YOffset >= m.maxYOffset()
+}
+
+// PastBottom returns whether or not the viewport is scrolled beyond the last
+// line. This can happen when adjusting the viewport height.
+func (m Model) PastBottom() bool {
+ return m.YOffset > m.maxYOffset()
+}
+
+// ScrollPercent returns the amount scrolled as a float between 0 and 1.
+func (m Model) ScrollPercent() float64 {
+ if m.Height >= len(m.lines) {
+ return 1.0
+ }
+ y := float64(m.YOffset)
+ h := float64(m.Height)
+ t := float64(len(m.lines) - 1)
+ v := y / (t - h)
+ return math.Max(0.0, math.Min(1.0, v))
+}
+
+// SetContent set the pager's text content. For high performance rendering the
+// Sync command should also be called.
+func (m *Model) SetContent(s string) {
+ s = strings.ReplaceAll(s, "\r\n", "\n") // normalize line endings
+ m.lines = strings.Split(s, "\n")
+
+ if m.YOffset > len(m.lines)-1 {
+ m.GotoBottom()
+ }
+}
+
+// maxYOffset returns the maximum possible value of the y-offset based on the
+// viewport's content and set height.
+func (m Model) maxYOffset() int {
+ return max(0, len(m.lines)-m.Height)
+}
+
+// visibleLines returns the lines that should currently be visible in the
+// viewport.
+func (m Model) visibleLines() (lines []string) {
+ if len(m.lines) > 0 {
+ top := max(0, m.YOffset)
+ bottom := clamp(m.YOffset+m.Height, top, len(m.lines))
+ lines = m.lines[top:bottom]
+ }
+ return lines
+}
+
+// scrollArea returns the scrollable boundaries for high performance rendering.
+func (m Model) scrollArea() (top, bottom int) {
+ top = max(0, m.YPosition)
+ bottom = max(top, top+m.Height)
+ if top > 0 && bottom > top {
+ bottom--
+ }
+ return top, bottom
+}
+
+// SetYOffset sets the Y offset.
+func (m *Model) SetYOffset(n int) {
+ m.YOffset = clamp(n, 0, m.maxYOffset())
+}
+
+// ViewDown moves the view down by the number of lines in the viewport.
+// Basically, "page down".
+func (m *Model) ViewDown() []string {
+ if m.AtBottom() {
+ return nil
+ }
+
+ return m.LineDown(m.Height)
+}
+
+// ViewUp moves the view up by one height of the viewport. Basically, "page up".
+func (m *Model) ViewUp() []string {
+ if m.AtTop() {
+ return nil
+ }
+
+ return m.LineUp(m.Height)
+}
+
+// HalfViewDown moves the view down by half the height of the viewport.
+func (m *Model) HalfViewDown() (lines []string) {
+ if m.AtBottom() {
+ return nil
+ }
+
+ return m.LineDown(m.Height / 2)
+}
+
+// HalfViewUp moves the view up by half the height of the viewport.
+func (m *Model) HalfViewUp() (lines []string) {
+ if m.AtTop() {
+ return nil
+ }
+
+ return m.LineUp(m.Height / 2)
+}
+
+// LineDown moves the view down by the given number of lines.
+func (m *Model) LineDown(n int) (lines []string) {
+ if m.AtBottom() || n == 0 || len(m.lines) == 0 {
+ return nil
+ }
+
+ // Make sure the number of lines by which we're going to scroll isn't
+ // greater than the number of lines we actually have left before we reach
+ // the bottom.
+ m.SetYOffset(m.YOffset + n)
+
+ // Gather lines to send off for performance scrolling.
+ bottom := clamp(m.YOffset+m.Height, 0, len(m.lines))
+ top := clamp(m.YOffset+m.Height-n, 0, bottom)
+ return m.lines[top:bottom]
+}
+
+// LineUp moves the view down by the given number of lines. Returns the new
+// lines to show.
+func (m *Model) LineUp(n int) (lines []string) {
+ if m.AtTop() || n == 0 || len(m.lines) == 0 {
+ return nil
+ }
+
+ // Make sure the number of lines by which we're going to scroll isn't
+ // greater than the number of lines we are from the top.
+ m.SetYOffset(m.YOffset - n)
+
+ // Gather lines to send off for performance scrolling.
+ top := max(0, m.YOffset)
+ bottom := clamp(m.YOffset+n, 0, m.maxYOffset())
+ return m.lines[top:bottom]
+}
+
+// TotalLineCount returns the total number of lines (both hidden and visible) within the viewport.
+func (m Model) TotalLineCount() int {
+ return len(m.lines)
+}
+
+// VisibleLineCount returns the number of the visible lines within the viewport.
+func (m Model) VisibleLineCount() int {
+ return len(m.visibleLines())
+}
+
+// GotoTop sets the viewport to the top position.
+func (m *Model) GotoTop() (lines []string) {
+ if m.AtTop() {
+ return nil
+ }
+
+ m.SetYOffset(0)
+ return m.visibleLines()
+}
+
+// GotoBottom sets the viewport to the bottom position.
+func (m *Model) GotoBottom() (lines []string) {
+ m.SetYOffset(m.maxYOffset())
+ return m.visibleLines()
+}
+
+// Sync tells the renderer where the viewport will be located and requests
+// a render of the current state of the viewport. It should be called for the
+// first render and after a window resize.
+//
+// For high performance rendering only.
+func Sync(m Model) tea.Cmd {
+ if len(m.lines) == 0 {
+ return nil
+ }
+ top, bottom := m.scrollArea()
+ return tea.SyncScrollArea(m.visibleLines(), top, bottom)
+}
+
+// ViewDown is a high performance command that moves the viewport up by a given
+// number of lines. Use Model.ViewDown to get the lines that should be rendered.
+// For example:
+//
+// lines := model.ViewDown(1)
+// cmd := ViewDown(m, lines)
+func ViewDown(m Model, lines []string) tea.Cmd {
+ if len(lines) == 0 {
+ return nil
+ }
+ top, bottom := m.scrollArea()
+ return tea.ScrollDown(lines, top, bottom)
+}
+
+// ViewUp is a high performance command the moves the viewport down by a given
+// number of lines height. Use Model.ViewUp to get the lines that should be
+// rendered.
+func ViewUp(m Model, lines []string) tea.Cmd {
+ if len(lines) == 0 {
+ return nil
+ }
+ top, bottom := m.scrollArea()
+ return tea.ScrollUp(lines, top, bottom)
+}
+
+// Update handles standard message-based viewport updates.
+func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
+ var cmd tea.Cmd
+ m, cmd = m.updateAsModel(msg)
+ return m, cmd
+}
+
+// Author's note: this method has been broken out to make it easier to
+// potentially transition Update to satisfy tea.Model.
+func (m Model) updateAsModel(msg tea.Msg) (Model, tea.Cmd) {
+ if !m.initialized {
+ m.setInitialValues()
+ }
+
+ var cmd tea.Cmd
+
+ switch msg := msg.(type) {
+ case tea.KeyMsg:
+ switch {
+ case key.Matches(msg, m.KeyMap.PageDown):
+ lines := m.ViewDown()
+ if m.HighPerformanceRendering {
+ cmd = ViewDown(m, lines)
+ }
+
+ case key.Matches(msg, m.KeyMap.PageUp):
+ lines := m.ViewUp()
+ if m.HighPerformanceRendering {
+ cmd = ViewUp(m, lines)
+ }
+
+ case key.Matches(msg, m.KeyMap.HalfPageDown):
+ lines := m.HalfViewDown()
+ if m.HighPerformanceRendering {
+ cmd = ViewDown(m, lines)
+ }
+
+ case key.Matches(msg, m.KeyMap.HalfPageUp):
+ lines := m.HalfViewUp()
+ if m.HighPerformanceRendering {
+ cmd = ViewUp(m, lines)
+ }
+
+ case key.Matches(msg, m.KeyMap.Down):
+ lines := m.LineDown(1)
+ if m.HighPerformanceRendering {
+ cmd = ViewDown(m, lines)
+ }
+
+ case key.Matches(msg, m.KeyMap.Up):
+ lines := m.LineUp(1)
+ if m.HighPerformanceRendering {
+ cmd = ViewUp(m, lines)
+ }
+ }
+
+ case tea.MouseMsg:
+ if !m.MouseWheelEnabled {
+ break
+ }
+ switch msg.Type {
+ case tea.MouseWheelUp:
+ lines := m.LineUp(m.MouseWheelDelta)
+ if m.HighPerformanceRendering {
+ cmd = ViewUp(m, lines)
+ }
+
+ case tea.MouseWheelDown:
+ lines := m.LineDown(m.MouseWheelDelta)
+ if m.HighPerformanceRendering {
+ cmd = ViewDown(m, lines)
+ }
+ }
+ }
+
+ return m, cmd
+}
+
+// View renders the viewport into a string.
+func (m Model) View() string {
+ if m.HighPerformanceRendering {
+ // Just send newlines since we're going to be rendering the actual
+ // content separately. We still need to send something that equals the
+ // height of this view so that the Bubble Tea standard renderer can
+ // position anything below this view properly.
+ return strings.Repeat("\n", max(0, m.Height-1))
+ }
+
+ w, h := m.Width, m.Height
+ if sw := m.Style.GetWidth(); sw != 0 {
+ w = min(w, sw)
+ }
+ if sh := m.Style.GetHeight(); sh != 0 {
+ h = min(h, sh)
+ }
+ contentWidth := w - m.Style.GetHorizontalFrameSize()
+ contentHeight := h - m.Style.GetVerticalFrameSize()
+ contents := lipgloss.NewStyle().
+ Height(contentHeight). // pad to height.
+ MaxHeight(contentHeight). // truncate height if taller.
+ MaxWidth(contentWidth). // truncate width.
+ Render(strings.Join(m.visibleLines(), "\n"))
+ return m.Style.Copy().
+ UnsetWidth().UnsetHeight(). // Style size already applied in contents.
+ Render(contents)
+}
+
+func clamp(v, low, high int) int {
+ if high < low {
+ low, high = high, low
+ }
+ return min(high, max(low, v))
+}
+
+func min(a, b int) int {
+ if a < b {
+ return a
+ }
+ return b
+}
+
+func max(a, b int) int {
+ if a > b {
+ return a
+ }
+ return b
+}
diff --git a/vendor/github.com/evertras/bubble-table/LICENSE b/vendor/github.com/evertras/bubble-table/LICENSE
new file mode 100644
index 000000000..0a30e64a3
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Brandon Fulljames
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/evertras/bubble-table/table/border.go b/vendor/github.com/evertras/bubble-table/table/border.go
new file mode 100644
index 000000000..9176e7308
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/border.go
@@ -0,0 +1,439 @@
+package table
+
+import "github.com/charmbracelet/lipgloss"
+
+// Border defines the borders in and around the table.
+type Border struct {
+ Top string
+ Left string
+ Right string
+ Bottom string
+ TopRight string
+ TopLeft string
+ BottomRight string
+ BottomLeft string
+
+ TopJunction string
+ LeftJunction string
+ RightJunction string
+ BottomJunction string
+
+ InnerJunction string
+
+ InnerDivider string
+
+ // Styles for 2x2 tables and larger
+ styleMultiTopLeft lipgloss.Style
+ styleMultiTop lipgloss.Style
+ styleMultiTopRight lipgloss.Style
+ styleMultiRight lipgloss.Style
+ styleMultiBottomRight lipgloss.Style
+ styleMultiBottom lipgloss.Style
+ styleMultiBottomLeft lipgloss.Style
+ styleMultiLeft lipgloss.Style
+ styleMultiInner lipgloss.Style
+
+ // Styles for a single column table
+ styleSingleColumnTop lipgloss.Style
+ styleSingleColumnInner lipgloss.Style
+ styleSingleColumnBottom lipgloss.Style
+
+ // Styles for a single row table
+ styleSingleRowLeft lipgloss.Style
+ styleSingleRowInner lipgloss.Style
+ styleSingleRowRight lipgloss.Style
+
+ // Style for a table with only one cell
+ styleSingleCell lipgloss.Style
+
+ // Style for the footer
+ styleFooter lipgloss.Style
+}
+
+var (
+ // https://www.w3.org/TR/xml-entity-names/025.html
+
+ borderDefault = Border{
+ Top: "━",
+ Left: "┃",
+ Right: "┃",
+ Bottom: "━",
+
+ TopRight: "┓",
+ TopLeft: "┏",
+ BottomRight: "┛",
+ BottomLeft: "┗",
+
+ TopJunction: "┳",
+ LeftJunction: "┣",
+ RightJunction: "┫",
+ BottomJunction: "┻",
+ InnerJunction: "╋",
+
+ InnerDivider: "┃",
+ }
+
+ borderRounded = Border{
+ Top: "─",
+ Left: "│",
+ Right: "│",
+ Bottom: "─",
+
+ TopRight: "╮",
+ TopLeft: "╭",
+ BottomRight: "╯",
+ BottomLeft: "╰",
+
+ TopJunction: "┬",
+ LeftJunction: "├",
+ RightJunction: "┤",
+ BottomJunction: "┴",
+ InnerJunction: "┼",
+
+ InnerDivider: "│",
+ }
+)
+
+func init() {
+ borderDefault.generateStyles()
+ borderRounded.generateStyles()
+}
+
+func (b *Border) generateStyles() {
+ b.generateMultiStyles()
+ b.generateSingleColumnStyles()
+ b.generateSingleRowStyles()
+ b.generateSingleCellStyle()
+
+ // The footer is a single cell with the top taken off... usually. We can
+ // re-enable the top if needed this way for certain format configurations.
+ b.styleFooter = b.styleSingleCell.Copy().
+ Align(lipgloss.Right).
+ BorderBottom(true).
+ BorderRight(true).
+ BorderLeft(true)
+}
+
+func (b *Border) styleLeftWithFooter(original lipgloss.Style) lipgloss.Style {
+ border := original.GetBorderStyle()
+
+ border.BottomLeft = b.LeftJunction
+
+ return original.Copy().BorderStyle(border)
+}
+
+func (b *Border) styleRightWithFooter(original lipgloss.Style) lipgloss.Style {
+ border := original.GetBorderStyle()
+
+ border.BottomRight = b.RightJunction
+
+ return original.Copy().BorderStyle(border)
+}
+
+func (b *Border) styleBothWithFooter(original lipgloss.Style) lipgloss.Style {
+ border := original.GetBorderStyle()
+
+ border.BottomLeft = b.LeftJunction
+ border.BottomRight = b.RightJunction
+
+ return original.Copy().BorderStyle(border)
+}
+
+// This function is long, but it's just repetitive...
+//
+//nolint:funlen
+func (b *Border) generateMultiStyles() {
+ b.styleMultiTopLeft = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ TopLeft: b.TopLeft,
+ Top: b.Top,
+ TopRight: b.TopJunction,
+ Right: b.InnerDivider,
+ BottomRight: b.InnerJunction,
+ Bottom: b.Bottom,
+ BottomLeft: b.LeftJunction,
+ Left: b.Left,
+ },
+ )
+
+ b.styleMultiTop = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Top: b.Top,
+ Right: b.InnerDivider,
+ Bottom: b.Bottom,
+
+ TopRight: b.TopJunction,
+ BottomRight: b.InnerJunction,
+ },
+ ).BorderTop(true).BorderBottom(true).BorderRight(true)
+
+ b.styleMultiTopRight = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Top: b.Top,
+ Right: b.Right,
+ Bottom: b.Bottom,
+
+ TopRight: b.TopRight,
+ BottomRight: b.RightJunction,
+ },
+ ).BorderTop(true).BorderBottom(true).BorderRight(true)
+
+ b.styleMultiLeft = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Left: b.Left,
+ Right: b.InnerDivider,
+ },
+ ).BorderRight(true).BorderLeft(true)
+
+ b.styleMultiRight = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Right: b.Right,
+ },
+ ).BorderRight(true)
+
+ b.styleMultiInner = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Right: b.InnerDivider,
+ },
+ ).BorderRight(true)
+
+ b.styleMultiBottomLeft = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Left: b.Left,
+ Right: b.InnerDivider,
+ Bottom: b.Bottom,
+
+ BottomLeft: b.BottomLeft,
+ BottomRight: b.BottomJunction,
+ },
+ ).BorderLeft(true).BorderBottom(true).BorderRight(true)
+
+ b.styleMultiBottom = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Right: b.InnerDivider,
+ Bottom: b.Bottom,
+
+ BottomRight: b.BottomJunction,
+ },
+ ).BorderBottom(true).BorderRight(true)
+
+ b.styleMultiBottomRight = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Right: b.Right,
+ Bottom: b.Bottom,
+
+ BottomRight: b.BottomRight,
+ },
+ ).BorderBottom(true).BorderRight(true)
+}
+
+func (b *Border) generateSingleColumnStyles() {
+ b.styleSingleColumnTop = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Top: b.Top,
+ Left: b.Left,
+ Right: b.Right,
+ Bottom: b.Bottom,
+
+ TopLeft: b.TopLeft,
+ TopRight: b.TopRight,
+ BottomLeft: b.LeftJunction,
+ BottomRight: b.RightJunction,
+ },
+ )
+
+ b.styleSingleColumnInner = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Left: b.Left,
+ Right: b.Right,
+ },
+ ).BorderRight(true).BorderLeft(true)
+
+ b.styleSingleColumnBottom = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Left: b.Left,
+ Right: b.Right,
+ Bottom: b.Bottom,
+
+ BottomLeft: b.BottomLeft,
+ BottomRight: b.BottomRight,
+ },
+ ).BorderRight(true).BorderLeft(true).BorderBottom(true)
+}
+
+func (b *Border) generateSingleRowStyles() {
+ b.styleSingleRowLeft = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Top: b.Top,
+ Left: b.Left,
+ Right: b.InnerDivider,
+ Bottom: b.Bottom,
+
+ BottomLeft: b.BottomLeft,
+ BottomRight: b.BottomJunction,
+ TopRight: b.TopJunction,
+ TopLeft: b.TopLeft,
+ },
+ )
+
+ b.styleSingleRowInner = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Top: b.Top,
+ Right: b.InnerDivider,
+ Bottom: b.Bottom,
+
+ BottomRight: b.BottomJunction,
+ TopRight: b.TopJunction,
+ },
+ ).BorderTop(true).BorderBottom(true).BorderRight(true)
+
+ b.styleSingleRowRight = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Top: b.Top,
+ Right: b.Right,
+ Bottom: b.Bottom,
+
+ BottomRight: b.BottomRight,
+ TopRight: b.TopRight,
+ },
+ ).BorderTop(true).BorderBottom(true).BorderRight(true)
+}
+
+func (b *Border) generateSingleCellStyle() {
+ b.styleSingleCell = lipgloss.NewStyle().BorderStyle(
+ lipgloss.Border{
+ Top: b.Top,
+ Left: b.Left,
+ Right: b.Right,
+ Bottom: b.Bottom,
+
+ BottomLeft: b.BottomLeft,
+ BottomRight: b.BottomRight,
+ TopRight: b.TopRight,
+ TopLeft: b.TopLeft,
+ },
+ )
+}
+
+// BorderDefault uses the basic square border, useful to reset the border if
+// it was changed somehow.
+func (m Model) BorderDefault() Model {
+ // Already generated styles
+ m.border = borderDefault
+
+ return m
+}
+
+// BorderRounded uses a thin, rounded border.
+func (m Model) BorderRounded() Model {
+ // Already generated styles
+ m.border = borderRounded
+
+ return m
+}
+
+// Border uses the given border components to render the table.
+func (m Model) Border(border Border) Model {
+ border.generateStyles()
+
+ m.border = border
+
+ return m
+}
+
+type borderStyleRow struct {
+ left lipgloss.Style
+ inner lipgloss.Style
+ right lipgloss.Style
+}
+
+func (b *borderStyleRow) inherit(s lipgloss.Style) {
+ b.left = b.left.Copy().Inherit(s)
+ b.inner = b.inner.Copy().Inherit(s)
+ b.right = b.right.Copy().Inherit(s)
+}
+
+// There's a lot of branches here, but splitting it up further would make it
+// harder to follow. So just be careful with comments and make sure it's tested!
+//
+//nolint:nestif
+func (m Model) styleHeaders() borderStyleRow {
+ hasRows := len(m.GetVisibleRows()) > 0
+ singleColumn := len(m.columns) == 1
+ styles := borderStyleRow{}
+
+ // Possible configurations:
+ // - Single cell
+ // - Single row
+ // - Single column
+ // - Multi
+
+ if singleColumn {
+ if hasRows {
+ // Single column
+ styles.left = m.border.styleSingleColumnTop
+ styles.inner = styles.left
+ styles.right = styles.left
+ } else {
+ // Single cell
+ styles.left = m.border.styleSingleCell
+ styles.inner = styles.left
+ styles.right = styles.left
+
+ if m.hasFooter() {
+ styles.left = m.border.styleBothWithFooter(styles.left)
+ }
+ }
+ } else if !hasRows {
+ // Single row
+ styles.left = m.border.styleSingleRowLeft
+ styles.inner = m.border.styleSingleRowInner
+ styles.right = m.border.styleSingleRowRight
+
+ if m.hasFooter() {
+ styles.left = m.border.styleLeftWithFooter(styles.left)
+ styles.right = m.border.styleRightWithFooter(styles.right)
+ }
+ } else {
+ // Multi
+ styles.left = m.border.styleMultiTopLeft
+ styles.inner = m.border.styleMultiTop
+ styles.right = m.border.styleMultiTopRight
+ }
+
+ styles.inherit(m.headerStyle)
+
+ return styles
+}
+
+func (m Model) styleRows() (inner borderStyleRow, last borderStyleRow) {
+ if len(m.columns) == 1 {
+ inner.left = m.border.styleSingleColumnInner
+ inner.inner = inner.left
+ inner.right = inner.left
+
+ last.left = m.border.styleSingleColumnBottom
+
+ if m.hasFooter() {
+ last.left = m.border.styleBothWithFooter(last.left)
+ }
+
+ last.inner = last.left
+ last.right = last.left
+ } else {
+ inner.left = m.border.styleMultiLeft
+ inner.inner = m.border.styleMultiInner
+ inner.right = m.border.styleMultiRight
+
+ last.left = m.border.styleMultiBottomLeft
+ last.inner = m.border.styleMultiBottom
+ last.right = m.border.styleMultiBottomRight
+
+ if m.hasFooter() {
+ last.left = m.border.styleLeftWithFooter(last.left)
+ last.right = m.border.styleRightWithFooter(last.right)
+ }
+ }
+
+ return inner, last
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/calc.go b/vendor/github.com/evertras/bubble-table/table/calc.go
new file mode 100644
index 000000000..3f0db046b
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/calc.go
@@ -0,0 +1,30 @@
+package table
+
+func min(x, y int) int {
+ if x < y {
+ return x
+ }
+
+ return y
+}
+
+func max(x, y int) int {
+ if x > y {
+ return x
+ }
+
+ return y
+}
+
+// These var names are fine for this little function
+//
+//nolint:varnamelen
+func gcd(x, y int) int {
+ if x == 0 {
+ return y
+ } else if y == 0 {
+ return x
+ }
+
+ return gcd(y%x, x)
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/cell.go b/vendor/github.com/evertras/bubble-table/table/cell.go
new file mode 100644
index 000000000..55156e76f
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/cell.go
@@ -0,0 +1,19 @@
+package table
+
+import "github.com/charmbracelet/lipgloss"
+
+// StyledCell represents a cell in the table that has a particular style applied.
+// The cell style takes highest precedence and will overwrite more general styles
+// from the row, column, or table as a whole. This style should be generally
+// limited to colors, font style, and alignments - spacing style such as margin
+// will break the table format.
+type StyledCell struct {
+ Data interface{}
+ Style lipgloss.Style
+}
+
+// NewStyledCell creates an entry that can be set in the row data and show as
+// styled with the given style.
+func NewStyledCell(data interface{}, style lipgloss.Style) StyledCell {
+ return StyledCell{data, style}
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/column.go b/vendor/github.com/evertras/bubble-table/table/column.go
new file mode 100644
index 000000000..800fde7c0
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/column.go
@@ -0,0 +1,78 @@
+package table
+
+import (
+ "github.com/charmbracelet/lipgloss"
+)
+
+// Column is a column in the table.
+type Column struct {
+ title string
+ key string
+ width int
+
+ flexFactor int
+
+ filterable bool
+ style lipgloss.Style
+
+ fmtString string
+}
+
+// NewColumn creates a new fixed-width column with the given information.
+func NewColumn(key, title string, width int) Column {
+ return Column{
+ key: key,
+ title: title,
+ width: width,
+
+ filterable: false,
+ }
+}
+
+// NewFlexColumn creates a new flexible width column that tries to fill in the
+// total table width. If multiple flex columns exist, each will measure against
+// each other depending on their flexFactor. For example, if both have a flexFactor
+// of 1, they will have equal width. If one has a flexFactor of 1 and the other
+// has a flexFactor of 3, the second will be 3 times larger than the first. You
+// must use WithTargetWidth if you have any flex columns, so that the table knows
+// how much width it should fill.
+func NewFlexColumn(key, title string, flexFactor int) Column {
+ return Column{
+ key: key,
+ title: title,
+
+ flexFactor: max(flexFactor, 1),
+ }
+}
+
+// WithStyle applies a style to the column as a whole.
+func (c Column) WithStyle(style lipgloss.Style) Column {
+ c.style = style.Copy().Width(c.width)
+
+ return c
+}
+
+// WithFiltered sets whether the column should be considered for filtering (true)
+// or not (false).
+func (c Column) WithFiltered(filterable bool) Column {
+ c.filterable = filterable
+
+ return c
+}
+
+// WithFormatString sets the format string used by fmt.Sprintf to display the data.
+// If not set, the default is "%v" for all data types. Intended mainly for
+// numeric formatting.
+//
+// Since data is of the interface{} type, make sure that all data in the column
+// is of the expected type or the format may fail. For example, hardcoding '3'
+// instead of '3.0' and using '%.2f' will fail because '3' is an integer.
+func (c Column) WithFormatString(fmtString string) Column {
+ c.fmtString = fmtString
+
+ return c
+}
+
+func (c *Column) isFlex() bool {
+ return c.flexFactor != 0
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/data.go b/vendor/github.com/evertras/bubble-table/table/data.go
new file mode 100644
index 000000000..73d558a04
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/data.go
@@ -0,0 +1,65 @@
+package table
+
+import "time"
+
+// This is just a bunch of data type checks, so... no linting here
+//
+//nolint:cyclop
+func asInt(data interface{}) (int64, bool) {
+ switch val := data.(type) {
+ case int:
+ return int64(val), true
+
+ case int8:
+ return int64(val), true
+
+ case int16:
+ return int64(val), true
+
+ case int32:
+ return int64(val), true
+
+ case int64:
+ return val, true
+
+ case uint:
+ return int64(val), true
+
+ case uint8:
+ return int64(val), true
+
+ case uint16:
+ return int64(val), true
+
+ case uint32:
+ return int64(val), true
+
+ case uint64:
+ return int64(val), true
+
+ case time.Duration:
+ return int64(val), true
+
+ case StyledCell:
+ return asInt(val.Data)
+ }
+
+ return 0, false
+}
+
+func asNumber(data interface{}) (float64, bool) {
+ switch val := data.(type) {
+ case float32:
+ return float64(val), true
+
+ case float64:
+ return val, true
+
+ case StyledCell:
+ return asNumber(val.Data)
+ }
+
+ intVal, isInt := asInt(data)
+
+ return float64(intVal), isInt
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/dimensions.go b/vendor/github.com/evertras/bubble-table/table/dimensions.go
new file mode 100644
index 000000000..dbf5997f2
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/dimensions.go
@@ -0,0 +1,73 @@
+package table
+
+func (m *Model) recalculateWidth() {
+ if m.targetTotalWidth != 0 {
+ m.totalWidth = m.targetTotalWidth
+ } else {
+ total := 0
+
+ for _, column := range m.columns {
+ total += column.width
+ }
+
+ m.totalWidth = total + len(m.columns) + 1
+ }
+
+ updateColumnWidths(m.columns, m.targetTotalWidth)
+
+ m.recalculateLastHorizontalColumn()
+}
+
+// Updates column width in-place. This could be optimized but should be called
+// very rarely so we prioritize simplicity over performance here.
+func updateColumnWidths(cols []Column, totalWidth int) {
+ totalFlexWidth := totalWidth - len(cols) - 1
+ totalFlexFactor := 0
+ flexGCD := 0
+
+ for index, col := range cols {
+ if !col.isFlex() {
+ totalFlexWidth -= col.width
+ cols[index].style = col.style.Width(col.width)
+ } else {
+ totalFlexFactor += col.flexFactor
+ flexGCD = gcd(flexGCD, col.flexFactor)
+ }
+ }
+
+ if totalFlexFactor == 0 {
+ return
+ }
+
+ // We use the GCD here because otherwise very large values won't divide
+ // nicely as ints
+ totalFlexFactor /= flexGCD
+
+ flexUnit := totalFlexWidth / totalFlexFactor
+ leftoverWidth := totalFlexWidth % totalFlexFactor
+
+ for index := range cols {
+ if !cols[index].isFlex() {
+ continue
+ }
+
+ width := flexUnit * (cols[index].flexFactor / flexGCD)
+
+ if leftoverWidth > 0 {
+ width++
+ leftoverWidth--
+ }
+
+ if index == len(cols)-1 {
+ width += leftoverWidth
+ leftoverWidth = 0
+ }
+
+ width = max(width, 1)
+
+ cols[index].width = width
+
+ // Take borders into account for the actual style
+ cols[index].style = cols[index].style.Width(width)
+ }
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/doc.go b/vendor/github.com/evertras/bubble-table/table/doc.go
new file mode 100644
index 000000000..554944afc
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/doc.go
@@ -0,0 +1,39 @@
+/*
+Package table contains a Bubble Tea component for an interactive and customizable
+table.
+
+The simplest useful table can be created with table.New(...).WithRows(...). Row
+data should map to the column keys, as shown below. Note that extra data will
+simply not be shown, while missing data will be safely blank in the row's cell.
+
+ const (
+ // This is not necessary, but recommended to avoid typos
+ columnKeyName = "name"
+ columnKeyCount = "count"
+ )
+
+ // Define the columns and how they appear
+ columns := []table.Column{
+ table.NewColumn(columnKeyName, "Name", 10),
+ table.NewColumn(columnKeyCount, "Count", 6),
+ }
+
+ // Define the data that will be in the table, mapping to the column keys
+ rows := []table.Row{
+ table.NewRow(table.RowData{
+ columnKeyName: "Cheeseburger",
+ columnKeyCount: 3,
+ }),
+ table.NewRow(table.RowData{
+ columnKeyName: "Fries",
+ columnKeyCount: 2,
+ }),
+ }
+
+ // Create the table
+ tbl := table.New(columns).WithRows(rows)
+
+ // Use it like any Bubble Tea component in your view
+ tbl.View()
+*/
+package table
diff --git a/vendor/github.com/evertras/bubble-table/table/events.go b/vendor/github.com/evertras/bubble-table/table/events.go
new file mode 100644
index 000000000..4b5e2b09d
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/events.go
@@ -0,0 +1,60 @@
+package table
+
+// UserEvent is some state change that has occurred due to user input. These will
+// ONLY be generated when a user has interacted directly with the table. These
+// will NOT be generated when code programmatically changes values in the table.
+type UserEvent interface{}
+
+func (m *Model) appendUserEvent(e UserEvent) {
+ m.lastUpdateUserEvents = append(m.lastUpdateUserEvents, e)
+}
+
+func (m *Model) clearUserEvents() {
+ m.lastUpdateUserEvents = nil
+}
+
+// GetLastUpdateUserEvents returns a list of events that happened due to user
+// input in the last Update call. This is useful to look for triggers such as
+// whether the user moved to a new highlighted row.
+func (m *Model) GetLastUpdateUserEvents() []UserEvent {
+ // Most common case
+ if len(m.lastUpdateUserEvents) == 0 {
+ return nil
+ }
+
+ returned := make([]UserEvent, len(m.lastUpdateUserEvents))
+
+ // Slightly wasteful but helps guarantee immutability, and this should only
+ // have data very rarely so this is fine
+ copy(returned, m.lastUpdateUserEvents)
+
+ return returned
+}
+
+// UserEventHighlightedIndexChanged indicates that the user has scrolled to a new
+// row.
+type UserEventHighlightedIndexChanged struct {
+ // PreviousRow is the row that was selected before the change.
+ PreviousRowIndex int
+
+ // SelectedRow is the row index that is now selected
+ SelectedRowIndex int
+}
+
+// UserEventRowSelectToggled indicates that the user has either selected or
+// deselected a row by toggling the selection. The event contains information
+// about which row index was selected and whether it was selected or deselected.
+type UserEventRowSelectToggled struct {
+ RowIndex int
+ IsSelected bool
+}
+
+// UserEventFilterInputFocused indicates that the user has focused the filter
+// text input, so that any other typing will type into the filter field. Only
+// activates for the built-in filter text box.
+type UserEventFilterInputFocused struct{}
+
+// UserEventFilterInputUnfocused indicates that the user has unfocused the filter
+// text input, which means the user is done typing into the filter field. Only
+// activates for the built-in filter text box.
+type UserEventFilterInputUnfocused struct{}
diff --git a/vendor/github.com/evertras/bubble-table/table/filter.go b/vendor/github.com/evertras/bubble-table/table/filter.go
new file mode 100644
index 000000000..0ba233b86
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/filter.go
@@ -0,0 +1,71 @@
+package table
+
+import (
+ "fmt"
+ "strings"
+)
+
+func (m Model) getFilteredRows(rows []Row) []Row {
+ filterInputValue := m.filterTextInput.Value()
+ if !m.filtered || filterInputValue == "" {
+ return rows
+ }
+
+ filteredRows := make([]Row, 0)
+
+ for _, row := range rows {
+ if isRowMatched(m.columns, row, filterInputValue) {
+ filteredRows = append(filteredRows, row)
+ }
+ }
+
+ return filteredRows
+}
+
+func isRowMatched(columns []Column, row Row, filter string) bool {
+ if filter == "" {
+ return true
+ }
+
+ checkedAny := false
+
+ filterLower := strings.ToLower(filter)
+
+ for _, column := range columns {
+ if !column.filterable {
+ continue
+ }
+
+ checkedAny = true
+
+ data, ok := row.Data[column.key]
+
+ if !ok {
+ continue
+ }
+
+ // Extract internal StyledCell data
+ switch dataV := data.(type) {
+ case StyledCell:
+ data = dataV.Data
+ }
+
+ var target string
+ switch dataV := data.(type) {
+ case string:
+ target = dataV
+
+ case fmt.Stringer:
+ target = dataV.String()
+
+ default:
+ target = fmt.Sprintf("%v", data)
+ }
+
+ if strings.Contains(strings.ToLower(target), filterLower) {
+ return true
+ }
+ }
+
+ return !checkedAny
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/footer.go b/vendor/github.com/evertras/bubble-table/table/footer.go
new file mode 100644
index 000000000..ba657a1d2
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/footer.go
@@ -0,0 +1,51 @@
+package table
+
+import (
+ "fmt"
+ "strings"
+)
+
+func (m Model) hasFooter() bool {
+ return m.footerVisible && (m.staticFooter != "" || m.pageSize != 0 || m.filtered)
+}
+
+func (m Model) renderFooter(width int, includeTop bool) string {
+ if !m.hasFooter() {
+ return ""
+ }
+
+ const borderAdjustment = 2
+
+ styleFooter := m.baseStyle.Copy().Inherit(m.border.styleFooter).Width(width - borderAdjustment)
+
+ if includeTop {
+ styleFooter.BorderTop(true)
+ }
+
+ if m.staticFooter != "" {
+ return styleFooter.Render(m.staticFooter)
+ }
+
+ sections := []string{}
+
+ if m.filtered && (m.filterTextInput.Focused() || m.filterTextInput.Value() != "") {
+ sections = append(sections, m.filterTextInput.View())
+ }
+
+ // paged feature enabled
+ if m.pageSize != 0 {
+ str := fmt.Sprintf("%d/%d", m.CurrentPage(), m.MaxPages())
+ if m.filtered && m.filterTextInput.Focused() {
+ // Need to apply inline style here in case of filter input cursor, because
+ // the input cursor resets the style after rendering. Note that Inline(true)
+ // creates a copy, so it's safe to use here without mutating the underlying
+ // base style.
+ str = m.baseStyle.Inline(true).Render(str)
+ }
+ sections = append(sections, str)
+ }
+
+ footerText := strings.Join(sections, " ")
+
+ return styleFooter.Render(footerText)
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/header.go b/vendor/github.com/evertras/bubble-table/table/header.go
new file mode 100644
index 000000000..fdd5ac0bd
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/header.go
@@ -0,0 +1,93 @@
+package table
+
+import "github.com/charmbracelet/lipgloss"
+
+// This is long and could use some refactoring in the future, but unsure of how
+// to pick it apart right now.
+//
+//nolint:funlen,cyclop
+func (m Model) renderHeaders() string {
+ headerStrings := []string{}
+
+ totalRenderedWidth := 0
+
+ headerStyles := m.styleHeaders()
+
+ renderHeader := func(column Column, borderStyle lipgloss.Style) string {
+ borderStyle = borderStyle.Inherit(column.style).Inherit(m.baseStyle)
+
+ headerSection := limitStr(column.title, column.width)
+
+ return borderStyle.Render(headerSection)
+ }
+
+ for columnIndex, column := range m.columns {
+ var borderStyle lipgloss.Style
+
+ if m.horizontalScrollOffsetCol > 0 && columnIndex == m.horizontalScrollFreezeColumnsCount {
+ if columnIndex == 0 {
+ borderStyle = headerStyles.left.Copy()
+ } else {
+ borderStyle = headerStyles.inner.Copy()
+ }
+
+ rendered := renderHeader(genOverflowColumnLeft(1), borderStyle)
+
+ totalRenderedWidth += lipgloss.Width(rendered)
+
+ headerStrings = append(headerStrings, rendered)
+ }
+
+ if columnIndex >= m.horizontalScrollFreezeColumnsCount &&
+ columnIndex < m.horizontalScrollOffsetCol+m.horizontalScrollFreezeColumnsCount {
+ continue
+ }
+
+ if len(headerStrings) == 0 {
+ borderStyle = headerStyles.left.Copy()
+ } else if columnIndex < len(m.columns)-1 {
+ borderStyle = headerStyles.inner.Copy()
+ } else {
+ borderStyle = headerStyles.right.Copy()
+ }
+
+ rendered := renderHeader(column, borderStyle)
+
+ if m.maxTotalWidth != 0 {
+ renderedWidth := lipgloss.Width(rendered)
+
+ const (
+ borderAdjustment = 1
+ overflowColWidth = 2
+ )
+
+ targetWidth := m.maxTotalWidth - overflowColWidth
+
+ if columnIndex == len(m.columns)-1 {
+ // If this is the last header, we don't need to account for the
+ // overflow arrow column
+ targetWidth = m.maxTotalWidth
+ }
+
+ if totalRenderedWidth+renderedWidth > targetWidth {
+ overflowWidth := m.maxTotalWidth - totalRenderedWidth - borderAdjustment
+ overflowStyle := genOverflowStyle(headerStyles.right, overflowWidth)
+ overflowColumn := genOverflowColumnRight(overflowWidth)
+
+ overflowStr := renderHeader(overflowColumn, overflowStyle)
+
+ headerStrings = append(headerStrings, overflowStr)
+
+ break
+ }
+
+ totalRenderedWidth += renderedWidth
+ }
+
+ headerStrings = append(headerStrings, rendered)
+ }
+
+ headerBlock := lipgloss.JoinHorizontal(lipgloss.Bottom, headerStrings...)
+
+ return headerBlock
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/keys.go b/vendor/github.com/evertras/bubble-table/table/keys.go
new file mode 100644
index 000000000..bc7d119c1
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/keys.go
@@ -0,0 +1,73 @@
+package table
+
+import "github.com/charmbracelet/bubbles/key"
+
+// KeyMap defines the keybindings for the table when it's focused.
+type KeyMap struct {
+ RowDown key.Binding
+ RowUp key.Binding
+
+ RowSelectToggle key.Binding
+
+ PageDown key.Binding
+ PageUp key.Binding
+ PageFirst key.Binding
+ PageLast key.Binding
+
+ // Filter allows the user to start typing and filter the rows.
+ Filter key.Binding
+
+ // FilterBlur is the key that stops the user's input from typing into the filter.
+ FilterBlur key.Binding
+
+ // FilterClear will clear the filter while it's blurred.
+ FilterClear key.Binding
+
+ // ScrollRight will move one column to the right when overflow occurs.
+ ScrollRight key.Binding
+
+ // ScrollLeft will move one column to the left when overflow occurs.
+ ScrollLeft key.Binding
+}
+
+// DefaultKeyMap returns a set of sensible defaults for controlling a focused table.
+func DefaultKeyMap() KeyMap {
+ return KeyMap{
+ RowDown: key.NewBinding(
+ key.WithKeys("down", "j"),
+ ),
+ RowUp: key.NewBinding(
+ key.WithKeys("up", "k"),
+ ),
+ RowSelectToggle: key.NewBinding(
+ key.WithKeys(" ", "enter"),
+ ),
+ PageDown: key.NewBinding(
+ key.WithKeys("right", "l", "pgdown"),
+ ),
+ PageUp: key.NewBinding(
+ key.WithKeys("left", "h", "pgup"),
+ ),
+ PageFirst: key.NewBinding(
+ key.WithKeys("home", "g"),
+ ),
+ PageLast: key.NewBinding(
+ key.WithKeys("end", "G"),
+ ),
+ Filter: key.NewBinding(
+ key.WithKeys("/"),
+ ),
+ FilterBlur: key.NewBinding(
+ key.WithKeys("enter", "esc"),
+ ),
+ FilterClear: key.NewBinding(
+ key.WithKeys("esc"),
+ ),
+ ScrollRight: key.NewBinding(
+ key.WithKeys("shift+right"),
+ ),
+ ScrollLeft: key.NewBinding(
+ key.WithKeys("shift+left"),
+ ),
+ }
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/model.go b/vendor/github.com/evertras/bubble-table/table/model.go
new file mode 100644
index 000000000..be25cf216
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/model.go
@@ -0,0 +1,119 @@
+package table
+
+import (
+ "github.com/charmbracelet/bubbles/textinput"
+ tea "github.com/charmbracelet/bubbletea"
+ "github.com/charmbracelet/lipgloss"
+)
+
+const (
+ columnKeySelect = "___select___"
+)
+
+var (
+ defaultHighlightStyle = lipgloss.NewStyle().Background(lipgloss.Color("#334"))
+)
+
+// Model is the main table model. Create using New().
+type Model struct {
+ // Data
+ columns []Column
+ rows []Row
+
+ // Caches for optimizations
+ visibleRowCacheUpdated bool
+ visibleRowCache []Row
+
+ // Shown when data is missing from a row
+ missingDataIndicator interface{}
+
+ // Interaction
+ focused bool
+ keyMap KeyMap
+ selectableRows bool
+ rowCursorIndex int
+
+ // Events
+ lastUpdateUserEvents []UserEvent
+
+ // Styles
+ baseStyle lipgloss.Style
+ highlightStyle lipgloss.Style
+ headerStyle lipgloss.Style
+ border Border
+ selectedText string
+ unselectedText string
+
+ // Header
+ headerVisible bool
+
+ // Footers
+ footerVisible bool
+ staticFooter string
+
+ // Pagination
+ pageSize int
+ currentPage int
+ paginationWrapping bool
+
+ // Sorting, where a stable sort is applied from first element to last so
+ // that elements are grouped by the later elements.
+ sortOrder []SortColumn
+
+ // Filter
+ filtered bool
+ filterTextInput textinput.Model
+
+ // For flex columns
+ targetTotalWidth int
+
+ // The maximum total width for overflow/scrolling
+ maxTotalWidth int
+
+ // Internal cached calculations for reference, may be higher than
+ // maxTotalWidth. If this is the case, we need to adjust the view
+ totalWidth int
+
+ // How far to scroll to the right, in columns
+ horizontalScrollOffsetCol int
+
+ // How many columns to freeze when scrolling horizontally
+ horizontalScrollFreezeColumnsCount int
+
+ // Calculated maximum column we can scroll to before the last is displayed
+ maxHorizontalColumnIndex int
+}
+
+// New creates a new table ready for further modifications.
+func New(columns []Column) Model {
+ filterInput := textinput.New()
+ filterInput.Prompt = "/"
+ model := Model{
+ columns: make([]Column, len(columns)),
+ highlightStyle: defaultHighlightStyle.Copy(),
+ border: borderDefault,
+ headerVisible: true,
+ footerVisible: true,
+ keyMap: DefaultKeyMap(),
+
+ selectedText: "[x]",
+ unselectedText: "[ ]",
+
+ filterTextInput: filterInput,
+ baseStyle: lipgloss.NewStyle().Align(lipgloss.Right),
+
+ paginationWrapping: true,
+ }
+
+ // Do a full deep copy to avoid unexpected edits
+ copy(model.columns, columns)
+
+ model.recalculateWidth()
+
+ return model
+}
+
+// Init initializes the table per the Bubble Tea architecture.
+func (m Model) Init() tea.Cmd {
+ return nil
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/options.go b/vendor/github.com/evertras/bubble-table/table/options.go
new file mode 100644
index 000000000..05f6fb8f5
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/options.go
@@ -0,0 +1,393 @@
+package table
+
+import (
+ "github.com/charmbracelet/bubbles/textinput"
+ "github.com/charmbracelet/lipgloss"
+)
+
+// WithHighlightedRow sets the highlighted row to the given index.
+func (m Model) WithHighlightedRow(index int) Model {
+ m.rowCursorIndex = index
+
+ if m.rowCursorIndex >= len(m.GetVisibleRows()) {
+ m.rowCursorIndex = len(m.GetVisibleRows()) - 1
+ }
+
+ if m.rowCursorIndex < 0 {
+ m.rowCursorIndex = 0
+ }
+
+ m.currentPage = m.expectedPageForRowIndex(m.rowCursorIndex)
+
+ return m
+}
+
+// HeaderStyle sets the style to apply to the header text, such as color or bold.
+func (m Model) HeaderStyle(style lipgloss.Style) Model {
+ m.headerStyle = style.Copy()
+
+ return m
+}
+
+// WithRows sets the rows to show as data in the table.
+func (m Model) WithRows(rows []Row) Model {
+ m.rows = rows
+ m.visibleRowCacheUpdated = false
+
+ if m.rowCursorIndex >= len(m.rows) {
+ m.rowCursorIndex = len(m.rows) - 1
+ }
+
+ if m.rowCursorIndex < 0 {
+ m.rowCursorIndex = 0
+ }
+
+ if m.pageSize != 0 {
+ maxPage := m.MaxPages()
+
+ // MaxPages is 1-index, currentPage is 0 index
+ if maxPage <= m.currentPage {
+ m.pageLast()
+ }
+ }
+
+ return m
+}
+
+// WithKeyMap sets the key map to use for controls when focused.
+func (m Model) WithKeyMap(keyMap KeyMap) Model {
+ m.keyMap = keyMap
+
+ return m
+}
+
+// KeyMap returns a copy of the current key map in use.
+func (m Model) KeyMap() KeyMap {
+ return m.keyMap
+}
+
+// SelectableRows sets whether or not rows are selectable. If set, adds a column
+// in the front that acts as a checkbox and responds to controls if Focused.
+func (m Model) SelectableRows(selectable bool) Model {
+ m.selectableRows = selectable
+
+ hasSelectColumn := len(m.columns) > 0 && m.columns[0].key == columnKeySelect
+
+ if hasSelectColumn != selectable {
+ if selectable {
+ m.columns = append([]Column{
+ NewColumn(columnKeySelect, m.selectedText, len([]rune(m.selectedText))),
+ }, m.columns...)
+ } else {
+ m.columns = m.columns[1:]
+ }
+ }
+
+ m.recalculateWidth()
+
+ return m
+}
+
+// HighlightedRow returns the full Row that's currently highlighted by the user.
+func (m Model) HighlightedRow() Row {
+ if len(m.GetVisibleRows()) > 0 {
+ return m.GetVisibleRows()[m.rowCursorIndex]
+ }
+
+ // TODO: Better way to do this without pointers/nil? Or should it be nil?
+ return Row{}
+}
+
+// SelectedRows returns all rows that have been set as selected by the user.
+func (m Model) SelectedRows() []Row {
+ selectedRows := []Row{}
+
+ for _, row := range m.GetVisibleRows() {
+ if row.selected {
+ selectedRows = append(selectedRows, row)
+ }
+ }
+
+ return selectedRows
+}
+
+// HighlightStyle sets a custom style to use when the row is being highlighted
+// by the cursor.
+func (m Model) HighlightStyle(style lipgloss.Style) Model {
+ m.highlightStyle = style
+
+ return m
+}
+
+// Focused allows the table to show highlighted rows and take in controls of
+// up/down/space/etc to let the user navigate the table and interact with it.
+func (m Model) Focused(focused bool) Model {
+ m.focused = focused
+
+ return m
+}
+
+// Filtered allows the table to show rows that match the filter.
+func (m Model) Filtered(filtered bool) Model {
+ m.filtered = filtered
+ m.visibleRowCacheUpdated = false
+
+ return m
+}
+
+// StartFilterTyping focuses the text input to allow user typing to filter.
+func (m Model) StartFilterTyping() Model {
+ m.filterTextInput.Focus()
+
+ return m
+}
+
+// WithStaticFooter adds a footer that only displays the given text.
+func (m Model) WithStaticFooter(footer string) Model {
+ m.staticFooter = footer
+
+ return m
+}
+
+// WithPageSize enables pagination using the given page size. This can be called
+// again at any point to resize the height of the table.
+func (m Model) WithPageSize(pageSize int) Model {
+ m.pageSize = pageSize
+
+ maxPages := m.MaxPages()
+
+ if m.currentPage >= maxPages {
+ m.currentPage = maxPages - 1
+ }
+
+ return m
+}
+
+// WithNoPagination disables pagination in the table.
+func (m Model) WithNoPagination() Model {
+ m.pageSize = 0
+
+ return m
+}
+
+// WithPaginationWrapping sets whether to wrap around from the beginning to the
+// end when navigating through pages. Defaults to true.
+func (m Model) WithPaginationWrapping(wrapping bool) Model {
+ m.paginationWrapping = wrapping
+
+ return m
+}
+
+// WithSelectedText describes what text to show when selectable rows are enabled.
+// The selectable column header will use the selected text string.
+func (m Model) WithSelectedText(unselected, selected string) Model {
+ m.selectedText = selected
+ m.unselectedText = unselected
+
+ if len(m.columns) > 0 && m.columns[0].key == columnKeySelect {
+ m.columns[0] = NewColumn(columnKeySelect, m.selectedText, len([]rune(m.selectedText)))
+ m.recalculateWidth()
+ }
+
+ return m
+}
+
+// WithBaseStyle applies a base style as the default for everything in the table.
+// This is useful for border colors, default alignment, default color, etc.
+func (m Model) WithBaseStyle(style lipgloss.Style) Model {
+ m.baseStyle = style
+
+ return m
+}
+
+// WithTargetWidth sets the total target width of the table, including borders.
+// This only takes effect when using flex columns. When using flex columns,
+// columns will stretch to fill out to the total width given here.
+func (m Model) WithTargetWidth(totalWidth int) Model {
+ m.targetTotalWidth = totalWidth
+
+ m.recalculateWidth()
+
+ return m
+}
+
+// PageDown goes to the next page of a paginated table, wrapping to the first
+// page if the table is already on the last page.
+func (m Model) PageDown() Model {
+ m.pageDown()
+
+ return m
+}
+
+// PageUp goes to the previous page of a paginated table, wrapping to the
+// last page if the table is already on the first page.
+func (m Model) PageUp() Model {
+ m.pageUp()
+
+ return m
+}
+
+// PageLast goes to the last page of a paginated table.
+func (m Model) PageLast() Model {
+ m.pageLast()
+
+ return m
+}
+
+// PageFirst goes to the first page of a paginated table.
+func (m Model) PageFirst() Model {
+ m.pageFirst()
+
+ return m
+}
+
+// WithCurrentPage sets the current page (1 as the first page) of a paginated
+// table, bounded to the total number of pages. The current selected row will
+// be set to the top row of the page if the page changed.
+func (m Model) WithCurrentPage(currentPage int) Model {
+ if m.pageSize == 0 || currentPage == m.CurrentPage() {
+ return m
+ }
+
+ if currentPage < 1 {
+ currentPage = 1
+ } else {
+ maxPages := m.MaxPages()
+
+ if currentPage > maxPages {
+ currentPage = maxPages
+ }
+ }
+
+ m.currentPage = currentPage - 1
+ m.rowCursorIndex = m.currentPage * m.pageSize
+
+ return m
+}
+
+// WithColumns sets the visible columns for the table, so that columns can be
+// added/removed/resized or headers rewritten.
+func (m Model) WithColumns(columns []Column) Model {
+ // Deep copy to avoid edits
+ m.columns = make([]Column, len(columns))
+ copy(m.columns, columns)
+
+ m.recalculateWidth()
+
+ return m
+}
+
+// WithFilterInput makes the table use the provided text input bubble for
+// filtering rather than using the built-in default. This allows for external
+// text input controls to be used.
+func (m Model) WithFilterInput(input textinput.Model) Model {
+ if m.filterTextInput.Value() != input.Value() {
+ m.pageFirst()
+ }
+
+ m.filterTextInput = input
+ m.visibleRowCacheUpdated = false
+
+ return m
+}
+
+// WithFilterInputValue sets the filter value to the given string, immediately
+// applying it as if the user had typed it in. Useful for external filter inputs
+// that are not necessarily a text input.
+func (m Model) WithFilterInputValue(value string) Model {
+ if m.filterTextInput.Value() != value {
+ m.pageFirst()
+ }
+
+ m.filterTextInput.SetValue(value)
+ m.filterTextInput.Blur()
+ m.visibleRowCacheUpdated = false
+
+ return m
+}
+
+// WithFooterVisibility sets the visibility of the footer.
+func (m Model) WithFooterVisibility(visibility bool) Model {
+ m.footerVisible = visibility
+
+ return m
+}
+
+// WithHeaderVisibility sets the visibility of the header.
+func (m Model) WithHeaderVisibility(visibility bool) Model {
+ m.headerVisible = visibility
+
+ return m
+}
+
+// WithMaxTotalWidth sets the maximum total width that the table should render.
+// If this width is exceeded by either the target width or by the total width
+// of all the columns (including borders!), anything extra will be treated as
+// overflow and horizontal scrolling will be enabled to see the rest.
+func (m Model) WithMaxTotalWidth(maxTotalWidth int) Model {
+ m.maxTotalWidth = maxTotalWidth
+
+ m.recalculateWidth()
+
+ return m
+}
+
+// WithHorizontalFreezeColumnCount freezes the given number of columns to the
+// left side. This is useful for things like ID or Name columns that should
+// always be visible even when scrolling.
+func (m Model) WithHorizontalFreezeColumnCount(columnsToFreeze int) Model {
+ m.horizontalScrollFreezeColumnsCount = columnsToFreeze
+
+ m.recalculateWidth()
+
+ return m
+}
+
+// ScrollRight moves one column to the right. Use with WithMaxTotalWidth.
+func (m Model) ScrollRight() Model {
+ m.scrollRight()
+
+ return m
+}
+
+// ScrollLeft moves one column to the left. Use with WithMaxTotalWidth.
+func (m Model) ScrollLeft() Model {
+ m.scrollLeft()
+
+ return m
+}
+
+// WithMissingDataIndicator sets an indicator to use when data for a column is
+// not found in a given row. Note that this is for completely missing data,
+// an empty string or other zero value that is explicitly set is not considered
+// to be missing.
+func (m Model) WithMissingDataIndicator(str string) Model {
+ m.missingDataIndicator = str
+
+ return m
+}
+
+// WithMissingDataIndicatorStyled sets a styled indicator to use when data for
+// a column is not found in a given row. Note that this is for completely
+// missing data, an empty string or other zero value that is explicitly set is
+// not considered to be missing.
+func (m Model) WithMissingDataIndicatorStyled(styled StyledCell) Model {
+ m.missingDataIndicator = styled
+
+ return m
+}
+
+// WithAllRowsDeselected deselects any rows that are currently selected.
+func (m Model) WithAllRowsDeselected() Model {
+ rows := m.GetVisibleRows()
+
+ for i, row := range rows {
+ if row.selected {
+ rows[i] = row.Selected(false)
+ }
+ }
+
+ m.rows = rows
+
+ return m
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/overflow.go b/vendor/github.com/evertras/bubble-table/table/overflow.go
new file mode 100644
index 000000000..143829024
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/overflow.go
@@ -0,0 +1,22 @@
+package table
+
+import "github.com/charmbracelet/lipgloss"
+
+const columnKeyOverflowRight = "___overflow_r___"
+const columnKeyOverflowLeft = "___overflow_l__"
+
+func genOverflowStyle(base lipgloss.Style, width int) lipgloss.Style {
+ style := lipgloss.NewStyle().Width(width).Align(lipgloss.Right)
+
+ style.Inherit(base)
+
+ return style
+}
+
+func genOverflowColumnRight(width int) Column {
+ return NewColumn(columnKeyOverflowRight, ">", width)
+}
+
+func genOverflowColumnLeft(width int) Column {
+ return NewColumn(columnKeyOverflowLeft, "<", width)
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/pagination.go b/vendor/github.com/evertras/bubble-table/table/pagination.go
new file mode 100644
index 000000000..6fce9b519
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/pagination.go
@@ -0,0 +1,112 @@
+package table
+
+// PageSize returns the current page size for the table, or 0 if there is no
+// pagination enabled.
+func (m *Model) PageSize() int {
+ return m.pageSize
+}
+
+// CurrentPage returns the current page that the table is on, starting from an
+// index of 1.
+func (m *Model) CurrentPage() int {
+ return m.currentPage + 1
+}
+
+// MaxPages returns the maximum number of pages that are visible.
+func (m *Model) MaxPages() int {
+ totalRows := len(m.GetVisibleRows())
+
+ if m.pageSize == 0 || totalRows == 0 {
+ return 1
+ }
+
+ return (totalRows-1)/m.pageSize + 1
+}
+
+// TotalRows returns the current total row count of the table. If the table is
+// paginated, this is the total number of rows across all pages.
+func (m *Model) TotalRows() int {
+ return len(m.GetVisibleRows())
+}
+
+// VisibleIndices returns the current visible rows by their 0 based index.
+// Useful for custom pagination footers.
+func (m *Model) VisibleIndices() (start, end int) {
+ totalRows := len(m.GetVisibleRows())
+
+ if m.pageSize == 0 {
+ start = 0
+ end = totalRows - 1
+
+ return start, end
+ }
+
+ start = m.pageSize * m.currentPage
+ end = start + m.pageSize - 1
+
+ if end >= totalRows {
+ end = totalRows - 1
+ }
+
+ return start, end
+}
+
+func (m *Model) pageDown() {
+ if m.pageSize == 0 || len(m.GetVisibleRows()) <= m.pageSize {
+ return
+ }
+
+ m.currentPage++
+
+ maxPageIndex := m.MaxPages() - 1
+
+ if m.currentPage > maxPageIndex {
+ if m.paginationWrapping {
+ m.currentPage = 0
+ } else {
+ m.currentPage = maxPageIndex
+ }
+ }
+
+ m.rowCursorIndex = m.currentPage * m.pageSize
+}
+
+func (m *Model) pageUp() {
+ if m.pageSize == 0 || len(m.GetVisibleRows()) <= m.pageSize {
+ return
+ }
+
+ m.currentPage--
+
+ maxPageIndex := m.MaxPages() - 1
+
+ if m.currentPage < 0 {
+ if m.paginationWrapping {
+ m.currentPage = maxPageIndex
+ } else {
+ m.currentPage = 0
+ }
+ }
+
+ m.rowCursorIndex = m.currentPage * m.pageSize
+}
+
+func (m *Model) pageFirst() {
+ m.currentPage = 0
+ m.rowCursorIndex = 0
+}
+
+func (m *Model) pageLast() {
+ m.currentPage = m.MaxPages() - 1
+ m.rowCursorIndex = m.currentPage * m.pageSize
+}
+
+func (m *Model) expectedPageForRowIndex(rowIndex int) int {
+ if m.pageSize == 0 {
+ return 0
+ }
+
+ expectedPage := rowIndex / m.pageSize
+
+ return expectedPage
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/query.go b/vendor/github.com/evertras/bubble-table/table/query.go
new file mode 100644
index 000000000..669915e72
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/query.go
@@ -0,0 +1,88 @@
+package table
+
+// GetColumnSorting returns the current sorting rules for the table as a list of
+// SortColumns, which are applied from first to last. This means that data will
+// be grouped by the later elements in the list. The returned list is a copy
+// and modifications will have no effect.
+func (m *Model) GetColumnSorting() []SortColumn {
+ c := make([]SortColumn, len(m.sortOrder))
+
+ copy(c, m.sortOrder)
+
+ return c
+}
+
+// GetCanFilter returns true if the table enables filtering at all. This does
+// not say whether a filter is currently active, only that the feature is enabled.
+func (m *Model) GetCanFilter() bool {
+ return m.filtered
+}
+
+// GetIsFilterActive returns true if the table is currently being filtered. This
+// does not say whether the table CAN be filtered, only whether or not a filter
+// is actually currently being applied.
+func (m *Model) GetIsFilterActive() bool {
+ return m.filterTextInput.Value() != ""
+}
+
+// GetIsFilterInputFocused returns true if the table's built-in filter input is
+// currently focused.
+func (m *Model) GetIsFilterInputFocused() bool {
+ return m.filterTextInput.Focused()
+}
+
+// GetCurrentFilter returns the current filter text being applied, or an empty
+// string if none is applied.
+func (m *Model) GetCurrentFilter() string {
+ return m.filterTextInput.Value()
+}
+
+// GetVisibleRows returns sorted and filtered rows.
+func (m *Model) GetVisibleRows() []Row {
+ if m.visibleRowCacheUpdated {
+ return m.visibleRowCache
+ }
+
+ rows := make([]Row, len(m.rows))
+ copy(rows, m.rows)
+ if m.filtered {
+ rows = m.getFilteredRows(rows)
+ }
+ rows = getSortedRows(m.sortOrder, rows)
+
+ m.visibleRowCache = rows
+ m.visibleRowCacheUpdated = true
+
+ return rows
+}
+
+// GetHighlightedRowIndex returns the index of the Row that's currently highlighted
+// by the user.
+func (m *Model) GetHighlightedRowIndex() int {
+ return m.rowCursorIndex
+}
+
+// GetFocused returns whether or not the table is focused and is receiving inputs.
+func (m *Model) GetFocused() bool {
+ return m.focused
+}
+
+// GetHorizontalScrollColumnOffset returns how many columns to the right the table
+// has been scrolled. 0 means the table is all the way to the left, which is
+// the starting default.
+func (m *Model) GetHorizontalScrollColumnOffset() int {
+ return m.horizontalScrollOffsetCol
+}
+
+// GetHeaderVisibility returns true if the header has been set to visible (default)
+// or false if the header has been set to hidden.
+func (m *Model) GetHeaderVisibility() bool {
+ return m.headerVisible
+}
+
+// GetPaginationWrapping returns true if pagination wrapping is enabled, or false
+// if disabled. If disabled, navigating through pages will stop at the first
+// and last pages.
+func (m *Model) GetPaginationWrapping() bool {
+ return m.paginationWrapping
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/row.go b/vendor/github.com/evertras/bubble-table/table/row.go
new file mode 100644
index 000000000..d063f68de
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/row.go
@@ -0,0 +1,198 @@
+package table
+
+import (
+ "fmt"
+
+ "github.com/charmbracelet/lipgloss"
+)
+
+// RowData is a map of string column keys to interface{} data. Data with a key
+// that matches a column key will be displayed. Data with a key that does not
+// match a column key will not be displayed, but will remain attached to the Row.
+// This can be useful for attaching hidden metadata for future reference when
+// retrieving rows.
+type RowData map[string]interface{}
+
+// Row represents a row in the table with some data keyed to the table columns>
+// Can have a style applied to it such as color/bold. Create using NewRow().
+type Row struct {
+ Style lipgloss.Style
+ Data RowData
+
+ selected bool
+}
+
+// NewRow creates a new row and copies the given row data.
+func NewRow(data RowData) Row {
+ row := Row{
+ Data: make(map[string]interface{}),
+ }
+
+ for key, val := range data {
+ // Doesn't deep copy val, but close enough for now...
+ row.Data[key] = val
+ }
+
+ return row
+}
+
+// WithStyle uses the given style for the text in the row.
+func (r Row) WithStyle(style lipgloss.Style) Row {
+ r.Style = style.Copy()
+
+ return r
+}
+
+//nolint:nestif // This has many ifs, but they're short
+func (m Model) renderRowColumnData(row Row, column Column, rowStyle lipgloss.Style, borderStyle lipgloss.Style) string {
+ cellStyle := rowStyle.Copy().Inherit(column.style).Inherit(m.baseStyle)
+
+ var str string
+
+ if column.key == columnKeySelect {
+ if row.selected {
+ str = m.selectedText
+ } else {
+ str = m.unselectedText
+ }
+ } else if column.key == columnKeyOverflowRight {
+ cellStyle = cellStyle.Align(lipgloss.Right)
+ str = ">"
+ } else if column.key == columnKeyOverflowLeft {
+ str = "<"
+ } else {
+ var data interface{}
+
+ if entry, exists := row.Data[column.key]; exists {
+ data = entry
+ } else if m.missingDataIndicator != nil {
+ data = m.missingDataIndicator
+ } else {
+ data = ""
+ }
+
+ fmtString := "%v"
+
+ if column.fmtString != "" {
+ fmtString = column.fmtString
+ }
+
+ switch entry := data.(type) {
+ case StyledCell:
+ str = fmt.Sprintf(fmtString, entry.Data)
+ cellStyle = entry.Style.Copy().Inherit(cellStyle)
+ default:
+ str = fmt.Sprintf(fmtString, entry)
+ }
+ }
+
+ cellStyle = cellStyle.Inherit(borderStyle)
+ cellStr := cellStyle.Render(limitStr(str, column.width))
+
+ return cellStr
+}
+
+// This is long and could use some refactoring in the future, but not quite sure
+// how to pick it apart yet.
+//
+//nolint:funlen, cyclop, gocognit
+func (m Model) renderRow(rowIndex int, last bool) string {
+ numColumns := len(m.columns)
+ row := m.GetVisibleRows()[rowIndex]
+ highlighted := rowIndex == m.rowCursorIndex
+ totalRenderedWidth := 0
+
+ columnStrings := []string{}
+
+ rowStyle := row.Style.Copy()
+
+ if m.focused && highlighted {
+ rowStyle = rowStyle.Inherit(m.highlightStyle)
+ }
+
+ stylesInner, stylesLast := m.styleRows()
+
+ for columnIndex, column := range m.columns {
+ var borderStyle lipgloss.Style
+ var rowStyles borderStyleRow
+
+ if !last {
+ rowStyles = stylesInner
+ } else {
+ rowStyles = stylesLast
+ }
+
+ if m.horizontalScrollOffsetCol > 0 && columnIndex == m.horizontalScrollFreezeColumnsCount {
+ var borderStyle lipgloss.Style
+
+ if columnIndex == 0 {
+ borderStyle = rowStyles.left.Copy()
+ } else {
+ borderStyle = rowStyles.inner.Copy()
+ }
+
+ rendered := m.renderRowColumnData(row, genOverflowColumnLeft(1), rowStyle, borderStyle)
+
+ totalRenderedWidth += lipgloss.Width(rendered)
+
+ columnStrings = append(columnStrings, rendered)
+ }
+
+ if columnIndex >= m.horizontalScrollFreezeColumnsCount &&
+ columnIndex < m.horizontalScrollOffsetCol+m.horizontalScrollFreezeColumnsCount {
+ continue
+ }
+
+ if len(columnStrings) == 0 {
+ borderStyle = rowStyles.left
+ } else if columnIndex < numColumns-1 {
+ borderStyle = rowStyles.inner
+ } else {
+ borderStyle = rowStyles.right
+ }
+
+ cellStr := m.renderRowColumnData(row, column, rowStyle, borderStyle)
+
+ if m.maxTotalWidth != 0 {
+ renderedWidth := lipgloss.Width(cellStr)
+
+ const (
+ borderAdjustment = 1
+ overflowColWidth = 2
+ )
+
+ targetWidth := m.maxTotalWidth - overflowColWidth
+
+ if columnIndex == len(m.columns)-1 {
+ // If this is the last header, we don't need to account for the
+ // overflow arrow column
+ targetWidth = m.maxTotalWidth
+ }
+
+ if totalRenderedWidth+renderedWidth > targetWidth {
+ overflowWidth := m.maxTotalWidth - totalRenderedWidth - borderAdjustment
+ overflowStyle := genOverflowStyle(rowStyles.right, overflowWidth)
+ overflowColumn := genOverflowColumnRight(overflowWidth)
+ overflowStr := m.renderRowColumnData(row, overflowColumn, rowStyle, overflowStyle)
+
+ columnStrings = append(columnStrings, overflowStr)
+
+ break
+ }
+
+ totalRenderedWidth += renderedWidth
+ }
+
+ columnStrings = append(columnStrings, cellStr)
+ }
+
+ return lipgloss.JoinHorizontal(lipgloss.Bottom, columnStrings...)
+}
+
+// Selected returns a copy of the row that's set to be selected or deselected.
+// The old row is not changed in-place.
+func (r Row) Selected(selected bool) Row {
+ r.selected = selected
+
+ return r
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/scrolling.go b/vendor/github.com/evertras/bubble-table/table/scrolling.go
new file mode 100644
index 000000000..3ee3256c9
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/scrolling.go
@@ -0,0 +1,50 @@
+package table
+
+func (m *Model) scrollRight() {
+ if m.horizontalScrollOffsetCol < m.maxHorizontalColumnIndex {
+ m.horizontalScrollOffsetCol++
+ }
+}
+
+func (m *Model) scrollLeft() {
+ if m.horizontalScrollOffsetCol > 0 {
+ m.horizontalScrollOffsetCol--
+ }
+}
+
+func (m *Model) recalculateLastHorizontalColumn() {
+ if m.horizontalScrollFreezeColumnsCount >= len(m.columns) {
+ m.maxHorizontalColumnIndex = 0
+
+ return
+ }
+
+ if m.totalWidth <= m.maxTotalWidth {
+ m.maxHorizontalColumnIndex = 0
+
+ return
+ }
+
+ const (
+ leftOverflowWidth = 2
+ borderAdjustment = 1
+ )
+
+ // Always have left border
+ visibleWidth := borderAdjustment + leftOverflowWidth
+
+ for i := 0; i < m.horizontalScrollFreezeColumnsCount; i++ {
+ visibleWidth += m.columns[i].width + borderAdjustment
+ }
+
+ m.maxHorizontalColumnIndex = len(m.columns) - 1
+
+ // Work backwards from the right
+ for i := len(m.columns) - 1; i >= m.horizontalScrollFreezeColumnsCount && visibleWidth <= m.maxTotalWidth; i-- {
+ visibleWidth += m.columns[i].width + borderAdjustment
+
+ if visibleWidth <= m.maxTotalWidth {
+ m.maxHorizontalColumnIndex = i - m.horizontalScrollFreezeColumnsCount
+ }
+ }
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/sort.go b/vendor/github.com/evertras/bubble-table/table/sort.go
new file mode 100644
index 000000000..9a282cbda
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/sort.go
@@ -0,0 +1,178 @@
+package table
+
+import (
+ "fmt"
+ "sort"
+)
+
+// SortDirection indicates whether a column should sort by ascending or descending.
+type SortDirection int
+
+const (
+ // SortDirectionAsc indicates the column should be in ascending order.
+ SortDirectionAsc SortDirection = iota
+
+ // SortDirectionDesc indicates the column should be in descending order.
+ SortDirectionDesc
+)
+
+// SortColumn describes which column should be sorted and how.
+type SortColumn struct {
+ ColumnKey string
+ Direction SortDirection
+}
+
+// SortByAsc sets the main sorting column to the given key, in ascending order.
+// If a previous sort was used, it is replaced by the given column each time
+// this function is called. Values are sorted as numbers if possible, or just
+// as simple string comparisons if not numbers.
+func (m Model) SortByAsc(columnKey string) Model {
+ m.sortOrder = []SortColumn{
+ {
+ ColumnKey: columnKey,
+ Direction: SortDirectionAsc,
+ },
+ }
+
+ m.visibleRowCacheUpdated = false
+
+ return m
+}
+
+// SortByDesc sets the main sorting column to the given key, in descending order.
+// If a previous sort was used, it is replaced by the given column each time
+// this function is called. Values are sorted as numbers if possible, or just
+// as simple string comparisons if not numbers.
+func (m Model) SortByDesc(columnKey string) Model {
+ m.sortOrder = []SortColumn{
+ {
+ ColumnKey: columnKey,
+ Direction: SortDirectionDesc,
+ },
+ }
+
+ m.visibleRowCacheUpdated = false
+
+ return m
+}
+
+// ThenSortByAsc provides a secondary sort after the first, in ascending order.
+// Can be chained multiple times, applying to smaller subgroups each time.
+func (m Model) ThenSortByAsc(columnKey string) Model {
+ m.sortOrder = append([]SortColumn{
+ {
+ ColumnKey: columnKey,
+ Direction: SortDirectionAsc,
+ },
+ }, m.sortOrder...)
+
+ m.visibleRowCacheUpdated = false
+
+ return m
+}
+
+// ThenSortByDesc provides a secondary sort after the first, in descending order.
+// Can be chained multiple times, applying to smaller subgroups each time.
+func (m Model) ThenSortByDesc(columnKey string) Model {
+ m.sortOrder = append([]SortColumn{
+ {
+ ColumnKey: columnKey,
+ Direction: SortDirectionDesc,
+ },
+ }, m.sortOrder...)
+
+ m.visibleRowCacheUpdated = false
+
+ return m
+}
+
+type sortableTable struct {
+ rows []Row
+ byColumn SortColumn
+}
+
+func (s *sortableTable) Len() int {
+ return len(s.rows)
+}
+
+func (s *sortableTable) Swap(i, j int) {
+ old := s.rows[i]
+ s.rows[i] = s.rows[j]
+ s.rows[j] = old
+}
+
+func (s *sortableTable) extractString(i int, column string) string {
+ iData, exists := s.rows[i].Data[column]
+
+ if !exists {
+ return ""
+ }
+
+ switch iData := iData.(type) {
+ case StyledCell:
+ return fmt.Sprintf("%v", iData.Data)
+
+ case string:
+ return iData
+
+ default:
+ return fmt.Sprintf("%v", iData)
+ }
+}
+
+func (s *sortableTable) extractNumber(i int, column string) (float64, bool) {
+ iData, exists := s.rows[i].Data[column]
+
+ if !exists {
+ return 0, false
+ }
+
+ return asNumber(iData)
+}
+
+func (s *sortableTable) Less(first, second int) bool {
+ firstNum, firstNumIsValid := s.extractNumber(first, s.byColumn.ColumnKey)
+ secondNum, secondNumIsValid := s.extractNumber(second, s.byColumn.ColumnKey)
+
+ if firstNumIsValid && secondNumIsValid {
+ if s.byColumn.Direction == SortDirectionAsc {
+ return firstNum < secondNum
+ }
+
+ return firstNum > secondNum
+ }
+
+ firstVal := s.extractString(first, s.byColumn.ColumnKey)
+ secondVal := s.extractString(second, s.byColumn.ColumnKey)
+
+ if s.byColumn.Direction == SortDirectionAsc {
+ return firstVal < secondVal
+ }
+
+ return firstVal > secondVal
+}
+
+func getSortedRows(sortOrder []SortColumn, rows []Row) []Row {
+ var sortedRows []Row
+ if len(sortOrder) == 0 {
+ sortedRows = rows
+
+ return sortedRows
+ }
+
+ sortedRows = make([]Row, len(rows))
+ copy(sortedRows, rows)
+
+ for _, byColumn := range sortOrder {
+ sorted := &sortableTable{
+ rows: sortedRows,
+ byColumn: byColumn,
+ }
+
+ sort.Stable(sorted)
+
+ sortedRows = sorted.rows
+ }
+
+ return sortedRows
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/strlimit.go b/vendor/github.com/evertras/bubble-table/table/strlimit.go
new file mode 100644
index 000000000..1b656625e
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/strlimit.go
@@ -0,0 +1,25 @@
+package table
+
+import (
+ "strings"
+
+ "github.com/muesli/reflow/ansi"
+ "github.com/muesli/reflow/truncate"
+)
+
+func limitStr(str string, maxLen int) string {
+ if maxLen == 0 {
+ return ""
+ }
+
+ newLineIndex := strings.Index(str, "\n")
+ if newLineIndex > -1 {
+ str = str[:newLineIndex] + "…"
+ }
+
+ if ansi.PrintableRuneWidth(str) > maxLen {
+ return truncate.StringWithTail(str, uint(maxLen), "…")
+ }
+
+ return str
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/update.go b/vendor/github.com/evertras/bubble-table/table/update.go
new file mode 100644
index 000000000..75998deb5
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/update.go
@@ -0,0 +1,149 @@
+package table
+
+import (
+ "github.com/charmbracelet/bubbles/key"
+ tea "github.com/charmbracelet/bubbletea"
+)
+
+func (m *Model) moveHighlightUp() {
+ m.rowCursorIndex--
+
+ if m.rowCursorIndex < 0 {
+ m.rowCursorIndex = len(m.GetVisibleRows()) - 1
+ }
+
+ m.currentPage = m.expectedPageForRowIndex(m.rowCursorIndex)
+}
+
+func (m *Model) moveHighlightDown() {
+ m.rowCursorIndex++
+
+ if m.rowCursorIndex >= len(m.GetVisibleRows()) {
+ m.rowCursorIndex = 0
+ }
+
+ m.currentPage = m.expectedPageForRowIndex(m.rowCursorIndex)
+}
+
+func (m *Model) toggleSelect() {
+ if !m.selectableRows || len(m.GetVisibleRows()) == 0 {
+ return
+ }
+
+ rows := make([]Row, len(m.GetVisibleRows()))
+ copy(rows, m.GetVisibleRows())
+
+ currentSelectedState := rows[m.rowCursorIndex].selected
+
+ rows[m.rowCursorIndex].selected = !currentSelectedState
+
+ m.rows = rows
+ m.visibleRowCacheUpdated = false
+
+ m.appendUserEvent(UserEventRowSelectToggled{
+ RowIndex: m.rowCursorIndex,
+ IsSelected: !currentSelectedState,
+ })
+}
+
+func (m Model) updateFilterTextInput(msg tea.Msg) (Model, tea.Cmd) {
+ var cmd tea.Cmd
+ switch msg := msg.(type) {
+ case tea.KeyMsg:
+ if key.Matches(msg, m.keyMap.FilterBlur) {
+ m.filterTextInput.Blur()
+ }
+ }
+ m.filterTextInput, cmd = m.filterTextInput.Update(msg)
+ m.pageFirst()
+ m.visibleRowCacheUpdated = false
+
+ return m, cmd
+}
+
+// This is a series of Matches tests with minimal logic
+//
+//nolint:cyclop
+func (m *Model) handleKeypress(msg tea.KeyMsg) {
+ previousRowIndex := m.rowCursorIndex
+
+ if key.Matches(msg, m.keyMap.RowDown) {
+ m.moveHighlightDown()
+ }
+
+ if key.Matches(msg, m.keyMap.RowUp) {
+ m.moveHighlightUp()
+ }
+
+ if key.Matches(msg, m.keyMap.RowSelectToggle) {
+ m.toggleSelect()
+ }
+
+ if key.Matches(msg, m.keyMap.PageDown) {
+ m.pageDown()
+ }
+
+ if key.Matches(msg, m.keyMap.PageUp) {
+ m.pageUp()
+ }
+
+ if key.Matches(msg, m.keyMap.PageFirst) {
+ m.pageFirst()
+ }
+
+ if key.Matches(msg, m.keyMap.PageLast) {
+ m.pageLast()
+ }
+
+ if key.Matches(msg, m.keyMap.Filter) {
+ m.filterTextInput.Focus()
+ m.appendUserEvent(UserEventFilterInputFocused{})
+ }
+
+ if key.Matches(msg, m.keyMap.FilterClear) {
+ m.visibleRowCacheUpdated = false
+ m.filterTextInput.Reset()
+ }
+
+ if key.Matches(msg, m.keyMap.ScrollRight) {
+ m.scrollRight()
+ }
+
+ if key.Matches(msg, m.keyMap.ScrollLeft) {
+ m.scrollLeft()
+ }
+
+ if m.rowCursorIndex != previousRowIndex {
+ m.appendUserEvent(UserEventHighlightedIndexChanged{
+ PreviousRowIndex: previousRowIndex,
+ SelectedRowIndex: m.rowCursorIndex,
+ })
+ }
+}
+
+// Update responds to input from the user or other messages from Bubble Tea.
+func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
+ m.clearUserEvents()
+
+ if !m.focused {
+ return m, nil
+ }
+
+ if m.filterTextInput.Focused() {
+ var cmd tea.Cmd
+ m, cmd = m.updateFilterTextInput(msg)
+
+ if !m.filterTextInput.Focused() {
+ m.appendUserEvent(UserEventFilterInputUnfocused{})
+ }
+
+ return m, cmd
+ }
+
+ switch msg := msg.(type) {
+ case tea.KeyMsg:
+ m.handleKeypress(msg)
+ }
+
+ return m, nil
+}
diff --git a/vendor/github.com/evertras/bubble-table/table/view.go b/vendor/github.com/evertras/bubble-table/table/view.go
new file mode 100644
index 000000000..e6bb9d2ff
--- /dev/null
+++ b/vendor/github.com/evertras/bubble-table/table/view.go
@@ -0,0 +1,56 @@
+package table
+
+import (
+ "strings"
+
+ "github.com/charmbracelet/lipgloss"
+)
+
+// View renders the table. It does not end in a newline, so that it can be
+// composed with other elements more consistently.
+func (m Model) View() string {
+ // Safety valve for empty tables
+ if len(m.columns) == 0 {
+ return ""
+ }
+
+ body := strings.Builder{}
+
+ rowStrs := make([]string, 0, 1)
+
+ headers := m.renderHeaders()
+
+ startRowIndex, endRowIndex := m.VisibleIndices()
+
+ if m.headerVisible {
+ rowStrs = append(rowStrs, headers)
+ } else if endRowIndex-startRowIndex > 0 {
+ //nolint: gomnd // This is just getting the first newlined substring
+ split := strings.SplitN(headers, "\n", 2)
+ rowStrs = append(rowStrs, split[0])
+ }
+
+ for i := startRowIndex; i <= endRowIndex; i++ {
+ rowStrs = append(rowStrs, m.renderRow(i, i == endRowIndex))
+ }
+
+ var footer string
+
+ if len(rowStrs) > 0 {
+ footer = m.renderFooter(lipgloss.Width(rowStrs[0]), false)
+ } else {
+ footer = m.renderFooter(lipgloss.Width(headers), true)
+ }
+
+ if footer != "" {
+ rowStrs = append(rowStrs, footer)
+ }
+
+ if len(rowStrs) == 0 {
+ return ""
+ }
+
+ body.WriteString(lipgloss.JoinVertical(lipgloss.Left, rowStrs...))
+
+ return body.String()
+}
diff --git a/vendor/github.com/imdario/mergo/.deepsource.toml b/vendor/github.com/imdario/mergo/.deepsource.toml
new file mode 100644
index 000000000..8a0681af8
--- /dev/null
+++ b/vendor/github.com/imdario/mergo/.deepsource.toml
@@ -0,0 +1,12 @@
+version = 1
+
+test_patterns = [
+ "*_test.go"
+]
+
+[[analyzers]]
+name = "go"
+enabled = true
+
+ [analyzers.meta]
+ import_path = "github.com/imdario/mergo"
\ No newline at end of file
diff --git a/vendor/github.com/imdario/mergo/.gitignore b/vendor/github.com/imdario/mergo/.gitignore
new file mode 100644
index 000000000..529c3412b
--- /dev/null
+++ b/vendor/github.com/imdario/mergo/.gitignore
@@ -0,0 +1,33 @@
+#### joe made this: http://goel.io/joe
+
+#### go ####
+# Binaries for programs and plugins
+*.exe
+*.dll
+*.so
+*.dylib
+
+# Test binary, build with `go test -c`
+*.test
+
+# Output of the go coverage tool, specifically when used with LiteIDE
+*.out
+
+# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
+.glide/
+
+#### vim ####
+# Swap
+[._]*.s[a-v][a-z]
+[._]*.sw[a-p]
+[._]s[a-v][a-z]
+[._]sw[a-p]
+
+# Session
+Session.vim
+
+# Temporary
+.netrwhist
+*~
+# Auto-generated tag files
+tags
diff --git a/vendor/github.com/imdario/mergo/.travis.yml b/vendor/github.com/imdario/mergo/.travis.yml
new file mode 100644
index 000000000..d324c43ba
--- /dev/null
+++ b/vendor/github.com/imdario/mergo/.travis.yml
@@ -0,0 +1,12 @@
+language: go
+arch:
+ - amd64
+ - ppc64le
+install:
+ - go get -t
+ - go get golang.org/x/tools/cmd/cover
+ - go get github.com/mattn/goveralls
+script:
+ - go test -race -v ./...
+after_script:
+ - $HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN
diff --git a/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md b/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000..469b44907
--- /dev/null
+++ b/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md
@@ -0,0 +1,46 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at i@dario.im. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
+
+[homepage]: http://contributor-covenant.org
+[version]: http://contributor-covenant.org/version/1/4/
diff --git a/vendor/github.com/imdario/mergo/CONTRIBUTING.md b/vendor/github.com/imdario/mergo/CONTRIBUTING.md
new file mode 100644
index 000000000..0a1ff9f94
--- /dev/null
+++ b/vendor/github.com/imdario/mergo/CONTRIBUTING.md
@@ -0,0 +1,112 @@
+
+# Contributing to mergo
+
+First off, thanks for taking the time to contribute! ❤️
+
+All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
+
+> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
+> - Star the project
+> - Tweet about it
+> - Refer this project in your project's readme
+> - Mention the project at local meetups and tell your friends/colleagues
+
+
+## Table of Contents
+
+- [Code of Conduct](#code-of-conduct)
+- [I Have a Question](#i-have-a-question)
+- [I Want To Contribute](#i-want-to-contribute)
+- [Reporting Bugs](#reporting-bugs)
+- [Suggesting Enhancements](#suggesting-enhancements)
+
+## Code of Conduct
+
+This project and everyone participating in it is governed by the
+[mergo Code of Conduct](https://github.com/imdario/mergoblob/master/CODE_OF_CONDUCT.md).
+By participating, you are expected to uphold this code. Please report unacceptable behavior
+to <>.
+
+
+## I Have a Question
+
+> If you want to ask a question, we assume that you have read the available [Documentation](https://pkg.go.dev/github.com/imdario/mergo).
+
+Before you ask a question, it is best to search for existing [Issues](https://github.com/imdario/mergo/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
+
+If you then still feel the need to ask a question and need clarification, we recommend the following:
+
+- Open an [Issue](https://github.com/imdario/mergo/issues/new).
+- Provide as much context as you can about what you're running into.
+- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
+
+We will then take care of the issue as soon as possible.
+
+## I Want To Contribute
+
+> ### Legal Notice
+> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
+
+### Reporting Bugs
+
+
+#### Before Submitting a Bug Report
+
+A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
+
+- Make sure that you are using the latest version.
+- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](). If you are looking for support, you might want to check [this section](#i-have-a-question)).
+- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/imdario/mergoissues?q=label%3Abug).
+- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
+- Collect information about the bug:
+- Stack trace (Traceback)
+- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
+- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
+- Possibly your input and the output
+- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
+
+
+#### How Do I Submit a Good Bug Report?
+
+> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to .
+
+
+We use GitHub issues to track bugs and errors. If you run into an issue with the project:
+
+- Open an [Issue](https://github.com/imdario/mergo/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
+- Explain the behavior you would expect and the actual behavior.
+- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
+- Provide the information you collected in the previous section.
+
+Once it's filed:
+
+- The project team will label the issue accordingly.
+- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
+- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be implemented by someone.
+
+### Suggesting Enhancements
+
+This section guides you through submitting an enhancement suggestion for mergo, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
+
+
+#### Before Submitting an Enhancement
+
+- Make sure that you are using the latest version.
+- Read the [documentation]() carefully and find out if the functionality is already covered, maybe by an individual configuration.
+- Perform a [search](https://github.com/imdario/mergo/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
+- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
+
+
+#### How Do I Submit a Good Enhancement Suggestion?
+
+Enhancement suggestions are tracked as [GitHub issues](https://github.com/imdario/mergo/issues).
+
+- Use a **clear and descriptive title** for the issue to identify the suggestion.
+- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
+- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
+- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
+- **Explain why this enhancement would be useful** to most mergo users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
+
+
+## Attribution
+This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!
diff --git a/vendor/github.com/imdario/mergo/LICENSE b/vendor/github.com/imdario/mergo/LICENSE
new file mode 100644
index 000000000..686680298
--- /dev/null
+++ b/vendor/github.com/imdario/mergo/LICENSE
@@ -0,0 +1,28 @@
+Copyright (c) 2013 Dario Castañé. All rights reserved.
+Copyright (c) 2012 The Go Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/imdario/mergo/README.md b/vendor/github.com/imdario/mergo/README.md
new file mode 100644
index 000000000..ffbbb62c7
--- /dev/null
+++ b/vendor/github.com/imdario/mergo/README.md
@@ -0,0 +1,242 @@
+# Mergo
+
+[![GitHub release][5]][6]
+[![GoCard][7]][8]
+[![Test status][1]][2]
+[![OpenSSF Scorecard][21]][22]
+[![OpenSSF Best Practices][19]][20]
+[![Coverage status][9]][10]
+[![Sourcegraph][11]][12]
+[![FOSSA status][13]][14]
+
+[![GoDoc][3]][4]
+[![Become my sponsor][15]][16]
+[![Tidelift][17]][18]
+
+[1]: https://github.com/imdario/mergo/workflows/tests/badge.svg?branch=master
+[2]: https://github.com/imdario/mergo/actions/workflows/tests.yml
+[3]: https://godoc.org/github.com/imdario/mergo?status.svg
+[4]: https://godoc.org/github.com/imdario/mergo
+[5]: https://img.shields.io/github/release/imdario/mergo.svg
+[6]: https://github.com/imdario/mergo/releases
+[7]: https://goreportcard.com/badge/imdario/mergo
+[8]: https://goreportcard.com/report/github.com/imdario/mergo
+[9]: https://coveralls.io/repos/github/imdario/mergo/badge.svg?branch=master
+[10]: https://coveralls.io/github/imdario/mergo?branch=master
+[11]: https://sourcegraph.com/github.com/imdario/mergo/-/badge.svg
+[12]: https://sourcegraph.com/github.com/imdario/mergo?badge
+[13]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Fimdario%2Fmergo.svg?type=shield
+[14]: https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_shield
+[15]: https://img.shields.io/github/sponsors/imdario
+[16]: https://github.com/sponsors/imdario
+[17]: https://tidelift.com/badges/package/go/github.com%2Fimdario%2Fmergo
+[18]: https://tidelift.com/subscription/pkg/go-github.aaakk.us.kg-imdario-mergo
+[19]: https://bestpractices.coreinfrastructure.org/projects/7177/badge
+[20]: https://bestpractices.coreinfrastructure.org/projects/7177
+[21]: https://api.securityscorecards.dev/projects/github.com/imdario/mergo/badge
+[22]: https://api.securityscorecards.dev/projects/github.com/imdario/mergo
+
+A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements.
+
+Mergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection).
+
+Also a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the Province of Ancona in the Italian region of Marche.
+
+## Status
+
+It is ready for production use. [It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, Microsoft, etc](https://github.com/imdario/mergo#mergo-in-the-wild).
+
+### Important note
+
+Please keep in mind that a problematic PR broke [0.3.9](//github.com/imdario/mergo/releases/tag/0.3.9). I reverted it in [0.3.10](//github.com/imdario/mergo/releases/tag/0.3.10), and I consider it stable but not bug-free. Also, this version adds support for go modules.
+
+Keep in mind that in [0.3.2](//github.com/imdario/mergo/releases/tag/0.3.2), Mergo changed `Merge()`and `Map()` signatures to support [transformers](#transformers). I added an optional/variadic argument so that it won't break the existing code.
+
+If you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with ```go get -u github.com/imdario/mergo```. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0).
+
+### Donations
+
+If Mergo is useful to you, consider buying me a coffee, a beer, or making a monthly donation to allow me to keep building great free software. :heart_eyes:
+
+
+
+
+
+### Mergo in the wild
+
+- [moby/moby](https://github.com/moby/moby)
+- [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes)
+- [vmware/dispatch](https://github.com/vmware/dispatch)
+- [Shopify/themekit](https://github.com/Shopify/themekit)
+- [imdario/zas](https://github.com/imdario/zas)
+- [matcornic/hermes](https://github.com/matcornic/hermes)
+- [OpenBazaar/openbazaar-go](https://github.com/OpenBazaar/openbazaar-go)
+- [kataras/iris](https://github.com/kataras/iris)
+- [michaelsauter/crane](https://github.com/michaelsauter/crane)
+- [go-task/task](https://github.com/go-task/task)
+- [sensu/uchiwa](https://github.com/sensu/uchiwa)
+- [ory/hydra](https://github.com/ory/hydra)
+- [sisatech/vcli](https://github.com/sisatech/vcli)
+- [dairycart/dairycart](https://github.com/dairycart/dairycart)
+- [projectcalico/felix](https://github.com/projectcalico/felix)
+- [resin-os/balena](https://github.com/resin-os/balena)
+- [go-kivik/kivik](https://github.com/go-kivik/kivik)
+- [Telefonica/govice](https://github.com/Telefonica/govice)
+- [supergiant/supergiant](supergiant/supergiant)
+- [SergeyTsalkov/brooce](https://github.com/SergeyTsalkov/brooce)
+- [soniah/dnsmadeeasy](https://github.com/soniah/dnsmadeeasy)
+- [ohsu-comp-bio/funnel](https://github.com/ohsu-comp-bio/funnel)
+- [EagerIO/Stout](https://github.com/EagerIO/Stout)
+- [lynndylanhurley/defsynth-api](https://github.com/lynndylanhurley/defsynth-api)
+- [russross/canvasassignments](https://github.com/russross/canvasassignments)
+- [rdegges/cryptly-api](https://github.com/rdegges/cryptly-api)
+- [casualjim/exeggutor](https://github.com/casualjim/exeggutor)
+- [divshot/gitling](https://github.com/divshot/gitling)
+- [RWJMurphy/gorl](https://github.com/RWJMurphy/gorl)
+- [andrerocker/deploy42](https://github.com/andrerocker/deploy42)
+- [elwinar/rambler](https://github.com/elwinar/rambler)
+- [tmaiaroto/gopartman](https://github.com/tmaiaroto/gopartman)
+- [jfbus/impressionist](https://github.com/jfbus/impressionist)
+- [Jmeyering/zealot](https://github.com/Jmeyering/zealot)
+- [godep-migrator/rigger-host](https://github.com/godep-migrator/rigger-host)
+- [Dronevery/MultiwaySwitch-Go](https://github.com/Dronevery/MultiwaySwitch-Go)
+- [thoas/picfit](https://github.com/thoas/picfit)
+- [mantasmatelis/whooplist-server](https://github.com/mantasmatelis/whooplist-server)
+- [jnuthong/item_search](https://github.com/jnuthong/item_search)
+- [bukalapak/snowboard](https://github.com/bukalapak/snowboard)
+- [containerssh/containerssh](https://github.com/containerssh/containerssh)
+- [goreleaser/goreleaser](https://github.com/goreleaser/goreleaser)
+- [tjpnz/structbot](https://github.com/tjpnz/structbot)
+
+## Install
+
+ go get github.com/imdario/mergo
+
+ // use in your .go code
+ import (
+ "github.com/imdario/mergo"
+ )
+
+## Usage
+
+You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as [they are zero values](https://golang.org/ref/spec#The_zero_value) too. Also, maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection).
+
+```go
+if err := mergo.Merge(&dst, src); err != nil {
+ // ...
+}
+```
+
+Also, you can merge overwriting values using the transformer `WithOverride`.
+
+```go
+if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil {
+ // ...
+}
+```
+
+Additionally, you can map a `map[string]interface{}` to a struct (and otherwise, from struct to map), following the same restrictions as in `Merge()`. Keys are capitalized to find each corresponding exported field.
+
+```go
+if err := mergo.Map(&dst, srcMap); err != nil {
+ // ...
+}
+```
+
+Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as `map[string]interface{}`. They will be just assigned as values.
+
+Here is a nice example:
+
+```go
+package main
+
+import (
+ "fmt"
+ "github.com/imdario/mergo"
+)
+
+type Foo struct {
+ A string
+ B int64
+}
+
+func main() {
+ src := Foo{
+ A: "one",
+ B: 2,
+ }
+ dest := Foo{
+ A: "two",
+ }
+ mergo.Merge(&dest, src)
+ fmt.Println(dest)
+ // Will print
+ // {two 2}
+}
+```
+
+Note: if test are failing due missing package, please execute:
+
+ go get gopkg.in/yaml.v3
+
+### Transformers
+
+Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, `time.Time` is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero `time.Time`?
+
+```go
+package main
+
+import (
+ "fmt"
+ "github.com/imdario/mergo"
+ "reflect"
+ "time"
+)
+
+type timeTransformer struct {
+}
+
+func (t timeTransformer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error {
+ if typ == reflect.TypeOf(time.Time{}) {
+ return func(dst, src reflect.Value) error {
+ if dst.CanSet() {
+ isZero := dst.MethodByName("IsZero")
+ result := isZero.Call([]reflect.Value{})
+ if result[0].Bool() {
+ dst.Set(src)
+ }
+ }
+ return nil
+ }
+ }
+ return nil
+}
+
+type Snapshot struct {
+ Time time.Time
+ // ...
+}
+
+func main() {
+ src := Snapshot{time.Now()}
+ dest := Snapshot{}
+ mergo.Merge(&dest, src, mergo.WithTransformers(timeTransformer{}))
+ fmt.Println(dest)
+ // Will print
+ // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 }
+}
+```
+
+## Contact me
+
+If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): [@im_dario](https://twitter.com/im_dario)
+
+## About
+
+Written by [Dario Castañé](http://dario.im).
+
+## License
+
+[BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) license, as [Go language](http://golang.org/LICENSE).
+
+[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fimdario%2Fmergo.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_large)
diff --git a/vendor/github.com/imdario/mergo/SECURITY.md b/vendor/github.com/imdario/mergo/SECURITY.md
new file mode 100644
index 000000000..a5de61f77
--- /dev/null
+++ b/vendor/github.com/imdario/mergo/SECURITY.md
@@ -0,0 +1,14 @@
+# Security Policy
+
+## Supported Versions
+
+| Version | Supported |
+| ------- | ------------------ |
+| 0.3.x | :white_check_mark: |
+| < 0.3 | :x: |
+
+## Security contact information
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure.
diff --git a/vendor/github.com/imdario/mergo/doc.go b/vendor/github.com/imdario/mergo/doc.go
new file mode 100644
index 000000000..fcd985f99
--- /dev/null
+++ b/vendor/github.com/imdario/mergo/doc.go
@@ -0,0 +1,143 @@
+// Copyright 2013 Dario Castañé. All rights reserved.
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+/*
+A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements.
+
+Mergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection).
+
+Status
+
+It is ready for production use. It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, etc.
+
+Important note
+
+Please keep in mind that a problematic PR broke 0.3.9. We reverted it in 0.3.10. We consider 0.3.10 as stable but not bug-free. . Also, this version adds suppot for go modules.
+
+Keep in mind that in 0.3.2, Mergo changed Merge() and Map() signatures to support transformers. We added an optional/variadic argument so that it won't break the existing code.
+
+If you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with go get -u github.com/imdario/mergo. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0).
+
+Install
+
+Do your usual installation procedure:
+
+ go get github.com/imdario/mergo
+
+ // use in your .go code
+ import (
+ "github.com/imdario/mergo"
+ )
+
+Usage
+
+You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as they are zero values too. Also, maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection).
+
+ if err := mergo.Merge(&dst, src); err != nil {
+ // ...
+ }
+
+Also, you can merge overwriting values using the transformer WithOverride.
+
+ if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil {
+ // ...
+ }
+
+Additionally, you can map a map[string]interface{} to a struct (and otherwise, from struct to map), following the same restrictions as in Merge(). Keys are capitalized to find each corresponding exported field.
+
+ if err := mergo.Map(&dst, srcMap); err != nil {
+ // ...
+ }
+
+Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as map[string]interface{}. They will be just assigned as values.
+
+Here is a nice example:
+
+ package main
+
+ import (
+ "fmt"
+ "github.com/imdario/mergo"
+ )
+
+ type Foo struct {
+ A string
+ B int64
+ }
+
+ func main() {
+ src := Foo{
+ A: "one",
+ B: 2,
+ }
+ dest := Foo{
+ A: "two",
+ }
+ mergo.Merge(&dest, src)
+ fmt.Println(dest)
+ // Will print
+ // {two 2}
+ }
+
+Transformers
+
+Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, time.Time is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero time.Time?
+
+ package main
+
+ import (
+ "fmt"
+ "github.com/imdario/mergo"
+ "reflect"
+ "time"
+ )
+
+ type timeTransformer struct {
+ }
+
+ func (t timeTransformer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error {
+ if typ == reflect.TypeOf(time.Time{}) {
+ return func(dst, src reflect.Value) error {
+ if dst.CanSet() {
+ isZero := dst.MethodByName("IsZero")
+ result := isZero.Call([]reflect.Value{})
+ if result[0].Bool() {
+ dst.Set(src)
+ }
+ }
+ return nil
+ }
+ }
+ return nil
+ }
+
+ type Snapshot struct {
+ Time time.Time
+ // ...
+ }
+
+ func main() {
+ src := Snapshot{time.Now()}
+ dest := Snapshot{}
+ mergo.Merge(&dest, src, mergo.WithTransformers(timeTransformer{}))
+ fmt.Println(dest)
+ // Will print
+ // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 }
+ }
+
+Contact me
+
+If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): https://twitter.com/im_dario
+
+About
+
+Written by Dario Castañé: https://da.rio.hn
+
+License
+
+BSD 3-Clause license, as Go language.
+
+*/
+package mergo
diff --git a/vendor/github.com/imdario/mergo/map.go b/vendor/github.com/imdario/mergo/map.go
new file mode 100644
index 000000000..b50d5c2a4
--- /dev/null
+++ b/vendor/github.com/imdario/mergo/map.go
@@ -0,0 +1,178 @@
+// Copyright 2014 Dario Castañé. All rights reserved.
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Based on src/pkg/reflect/deepequal.go from official
+// golang's stdlib.
+
+package mergo
+
+import (
+ "fmt"
+ "reflect"
+ "unicode"
+ "unicode/utf8"
+)
+
+func changeInitialCase(s string, mapper func(rune) rune) string {
+ if s == "" {
+ return s
+ }
+ r, n := utf8.DecodeRuneInString(s)
+ return string(mapper(r)) + s[n:]
+}
+
+func isExported(field reflect.StructField) bool {
+ r, _ := utf8.DecodeRuneInString(field.Name)
+ return r >= 'A' && r <= 'Z'
+}
+
+// Traverses recursively both values, assigning src's fields values to dst.
+// The map argument tracks comparisons that have already been seen, which allows
+// short circuiting on recursive types.
+func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) {
+ overwrite := config.Overwrite
+ if dst.CanAddr() {
+ addr := dst.UnsafeAddr()
+ h := 17 * addr
+ seen := visited[h]
+ typ := dst.Type()
+ for p := seen; p != nil; p = p.next {
+ if p.ptr == addr && p.typ == typ {
+ return nil
+ }
+ }
+ // Remember, remember...
+ visited[h] = &visit{typ, seen, addr}
+ }
+ zeroValue := reflect.Value{}
+ switch dst.Kind() {
+ case reflect.Map:
+ dstMap := dst.Interface().(map[string]interface{})
+ for i, n := 0, src.NumField(); i < n; i++ {
+ srcType := src.Type()
+ field := srcType.Field(i)
+ if !isExported(field) {
+ continue
+ }
+ fieldName := field.Name
+ fieldName = changeInitialCase(fieldName, unicode.ToLower)
+ if v, ok := dstMap[fieldName]; !ok || (isEmptyValue(reflect.ValueOf(v), !config.ShouldNotDereference) || overwrite) {
+ dstMap[fieldName] = src.Field(i).Interface()
+ }
+ }
+ case reflect.Ptr:
+ if dst.IsNil() {
+ v := reflect.New(dst.Type().Elem())
+ dst.Set(v)
+ }
+ dst = dst.Elem()
+ fallthrough
+ case reflect.Struct:
+ srcMap := src.Interface().(map[string]interface{})
+ for key := range srcMap {
+ config.overwriteWithEmptyValue = true
+ srcValue := srcMap[key]
+ fieldName := changeInitialCase(key, unicode.ToUpper)
+ dstElement := dst.FieldByName(fieldName)
+ if dstElement == zeroValue {
+ // We discard it because the field doesn't exist.
+ continue
+ }
+ srcElement := reflect.ValueOf(srcValue)
+ dstKind := dstElement.Kind()
+ srcKind := srcElement.Kind()
+ if srcKind == reflect.Ptr && dstKind != reflect.Ptr {
+ srcElement = srcElement.Elem()
+ srcKind = reflect.TypeOf(srcElement.Interface()).Kind()
+ } else if dstKind == reflect.Ptr {
+ // Can this work? I guess it can't.
+ if srcKind != reflect.Ptr && srcElement.CanAddr() {
+ srcPtr := srcElement.Addr()
+ srcElement = reflect.ValueOf(srcPtr)
+ srcKind = reflect.Ptr
+ }
+ }
+
+ if !srcElement.IsValid() {
+ continue
+ }
+ if srcKind == dstKind {
+ if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil {
+ return
+ }
+ } else if dstKind == reflect.Interface && dstElement.Kind() == reflect.Interface {
+ if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil {
+ return
+ }
+ } else if srcKind == reflect.Map {
+ if err = deepMap(dstElement, srcElement, visited, depth+1, config); err != nil {
+ return
+ }
+ } else {
+ return fmt.Errorf("type mismatch on %s field: found %v, expected %v", fieldName, srcKind, dstKind)
+ }
+ }
+ }
+ return
+}
+
+// Map sets fields' values in dst from src.
+// src can be a map with string keys or a struct. dst must be the opposite:
+// if src is a map, dst must be a valid pointer to struct. If src is a struct,
+// dst must be map[string]interface{}.
+// It won't merge unexported (private) fields and will do recursively
+// any exported field.
+// If dst is a map, keys will be src fields' names in lower camel case.
+// Missing key in src that doesn't match a field in dst will be skipped. This
+// doesn't apply if dst is a map.
+// This is separated method from Merge because it is cleaner and it keeps sane
+// semantics: merging equal types, mapping different (restricted) types.
+func Map(dst, src interface{}, opts ...func(*Config)) error {
+ return _map(dst, src, opts...)
+}
+
+// MapWithOverwrite will do the same as Map except that non-empty dst attributes will be overridden by
+// non-empty src attribute values.
+// Deprecated: Use Map(…) with WithOverride
+func MapWithOverwrite(dst, src interface{}, opts ...func(*Config)) error {
+ return _map(dst, src, append(opts, WithOverride)...)
+}
+
+func _map(dst, src interface{}, opts ...func(*Config)) error {
+ if dst != nil && reflect.ValueOf(dst).Kind() != reflect.Ptr {
+ return ErrNonPointerArgument
+ }
+ var (
+ vDst, vSrc reflect.Value
+ err error
+ )
+ config := &Config{}
+
+ for _, opt := range opts {
+ opt(config)
+ }
+
+ if vDst, vSrc, err = resolveValues(dst, src); err != nil {
+ return err
+ }
+ // To be friction-less, we redirect equal-type arguments
+ // to deepMerge. Only because arguments can be anything.
+ if vSrc.Kind() == vDst.Kind() {
+ return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config)
+ }
+ switch vSrc.Kind() {
+ case reflect.Struct:
+ if vDst.Kind() != reflect.Map {
+ return ErrExpectedMapAsDestination
+ }
+ case reflect.Map:
+ if vDst.Kind() != reflect.Struct {
+ return ErrExpectedStructAsDestination
+ }
+ default:
+ return ErrNotSupported
+ }
+ return deepMap(vDst, vSrc, make(map[uintptr]*visit), 0, config)
+}
diff --git a/vendor/github.com/imdario/mergo/merge.go b/vendor/github.com/imdario/mergo/merge.go
new file mode 100644
index 000000000..0ef9b2138
--- /dev/null
+++ b/vendor/github.com/imdario/mergo/merge.go
@@ -0,0 +1,409 @@
+// Copyright 2013 Dario Castañé. All rights reserved.
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Based on src/pkg/reflect/deepequal.go from official
+// golang's stdlib.
+
+package mergo
+
+import (
+ "fmt"
+ "reflect"
+)
+
+func hasMergeableFields(dst reflect.Value) (exported bool) {
+ for i, n := 0, dst.NumField(); i < n; i++ {
+ field := dst.Type().Field(i)
+ if field.Anonymous && dst.Field(i).Kind() == reflect.Struct {
+ exported = exported || hasMergeableFields(dst.Field(i))
+ } else if isExportedComponent(&field) {
+ exported = exported || len(field.PkgPath) == 0
+ }
+ }
+ return
+}
+
+func isExportedComponent(field *reflect.StructField) bool {
+ pkgPath := field.PkgPath
+ if len(pkgPath) > 0 {
+ return false
+ }
+ c := field.Name[0]
+ if 'a' <= c && c <= 'z' || c == '_' {
+ return false
+ }
+ return true
+}
+
+type Config struct {
+ Transformers Transformers
+ Overwrite bool
+ ShouldNotDereference bool
+ AppendSlice bool
+ TypeCheck bool
+ overwriteWithEmptyValue bool
+ overwriteSliceWithEmptyValue bool
+ sliceDeepCopy bool
+ debug bool
+}
+
+type Transformers interface {
+ Transformer(reflect.Type) func(dst, src reflect.Value) error
+}
+
+// Traverses recursively both values, assigning src's fields values to dst.
+// The map argument tracks comparisons that have already been seen, which allows
+// short circuiting on recursive types.
+func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) {
+ overwrite := config.Overwrite
+ typeCheck := config.TypeCheck
+ overwriteWithEmptySrc := config.overwriteWithEmptyValue
+ overwriteSliceWithEmptySrc := config.overwriteSliceWithEmptyValue
+ sliceDeepCopy := config.sliceDeepCopy
+
+ if !src.IsValid() {
+ return
+ }
+ if dst.CanAddr() {
+ addr := dst.UnsafeAddr()
+ h := 17 * addr
+ seen := visited[h]
+ typ := dst.Type()
+ for p := seen; p != nil; p = p.next {
+ if p.ptr == addr && p.typ == typ {
+ return nil
+ }
+ }
+ // Remember, remember...
+ visited[h] = &visit{typ, seen, addr}
+ }
+
+ if config.Transformers != nil && !isReflectNil(dst) && dst.IsValid() {
+ if fn := config.Transformers.Transformer(dst.Type()); fn != nil {
+ err = fn(dst, src)
+ return
+ }
+ }
+
+ switch dst.Kind() {
+ case reflect.Struct:
+ if hasMergeableFields(dst) {
+ for i, n := 0, dst.NumField(); i < n; i++ {
+ if err = deepMerge(dst.Field(i), src.Field(i), visited, depth+1, config); err != nil {
+ return
+ }
+ }
+ } else {
+ if dst.CanSet() && (isReflectNil(dst) || overwrite) && (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc) {
+ dst.Set(src)
+ }
+ }
+ case reflect.Map:
+ if dst.IsNil() && !src.IsNil() {
+ if dst.CanSet() {
+ dst.Set(reflect.MakeMap(dst.Type()))
+ } else {
+ dst = src
+ return
+ }
+ }
+
+ if src.Kind() != reflect.Map {
+ if overwrite && dst.CanSet() {
+ dst.Set(src)
+ }
+ return
+ }
+
+ for _, key := range src.MapKeys() {
+ srcElement := src.MapIndex(key)
+ if !srcElement.IsValid() {
+ continue
+ }
+ dstElement := dst.MapIndex(key)
+ switch srcElement.Kind() {
+ case reflect.Chan, reflect.Func, reflect.Map, reflect.Interface, reflect.Slice:
+ if srcElement.IsNil() {
+ if overwrite {
+ dst.SetMapIndex(key, srcElement)
+ }
+ continue
+ }
+ fallthrough
+ default:
+ if !srcElement.CanInterface() {
+ continue
+ }
+ switch reflect.TypeOf(srcElement.Interface()).Kind() {
+ case reflect.Struct:
+ fallthrough
+ case reflect.Ptr:
+ fallthrough
+ case reflect.Map:
+ srcMapElm := srcElement
+ dstMapElm := dstElement
+ if srcMapElm.CanInterface() {
+ srcMapElm = reflect.ValueOf(srcMapElm.Interface())
+ if dstMapElm.IsValid() {
+ dstMapElm = reflect.ValueOf(dstMapElm.Interface())
+ }
+ }
+ if err = deepMerge(dstMapElm, srcMapElm, visited, depth+1, config); err != nil {
+ return
+ }
+ case reflect.Slice:
+ srcSlice := reflect.ValueOf(srcElement.Interface())
+
+ var dstSlice reflect.Value
+ if !dstElement.IsValid() || dstElement.IsNil() {
+ dstSlice = reflect.MakeSlice(srcSlice.Type(), 0, srcSlice.Len())
+ } else {
+ dstSlice = reflect.ValueOf(dstElement.Interface())
+ }
+
+ if (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) && !config.AppendSlice && !sliceDeepCopy {
+ if typeCheck && srcSlice.Type() != dstSlice.Type() {
+ return fmt.Errorf("cannot override two slices with different type (%s, %s)", srcSlice.Type(), dstSlice.Type())
+ }
+ dstSlice = srcSlice
+ } else if config.AppendSlice {
+ if srcSlice.Type() != dstSlice.Type() {
+ return fmt.Errorf("cannot append two slices with different type (%s, %s)", srcSlice.Type(), dstSlice.Type())
+ }
+ dstSlice = reflect.AppendSlice(dstSlice, srcSlice)
+ } else if sliceDeepCopy {
+ i := 0
+ for ; i < srcSlice.Len() && i < dstSlice.Len(); i++ {
+ srcElement := srcSlice.Index(i)
+ dstElement := dstSlice.Index(i)
+
+ if srcElement.CanInterface() {
+ srcElement = reflect.ValueOf(srcElement.Interface())
+ }
+ if dstElement.CanInterface() {
+ dstElement = reflect.ValueOf(dstElement.Interface())
+ }
+
+ if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil {
+ return
+ }
+ }
+
+ }
+ dst.SetMapIndex(key, dstSlice)
+ }
+ }
+
+ if dstElement.IsValid() && !isEmptyValue(dstElement, !config.ShouldNotDereference) {
+ if reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Slice {
+ continue
+ }
+ if reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Map && reflect.TypeOf(dstElement.Interface()).Kind() == reflect.Map {
+ continue
+ }
+ }
+
+ if srcElement.IsValid() && ((srcElement.Kind() != reflect.Ptr && overwrite) || !dstElement.IsValid() || isEmptyValue(dstElement, !config.ShouldNotDereference)) {
+ if dst.IsNil() {
+ dst.Set(reflect.MakeMap(dst.Type()))
+ }
+ dst.SetMapIndex(key, srcElement)
+ }
+ }
+
+ // Ensure that all keys in dst are deleted if they are not in src.
+ if overwriteWithEmptySrc {
+ for _, key := range dst.MapKeys() {
+ srcElement := src.MapIndex(key)
+ if !srcElement.IsValid() {
+ dst.SetMapIndex(key, reflect.Value{})
+ }
+ }
+ }
+ case reflect.Slice:
+ if !dst.CanSet() {
+ break
+ }
+ if (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) && !config.AppendSlice && !sliceDeepCopy {
+ dst.Set(src)
+ } else if config.AppendSlice {
+ if src.Type() != dst.Type() {
+ return fmt.Errorf("cannot append two slice with different type (%s, %s)", src.Type(), dst.Type())
+ }
+ dst.Set(reflect.AppendSlice(dst, src))
+ } else if sliceDeepCopy {
+ for i := 0; i < src.Len() && i < dst.Len(); i++ {
+ srcElement := src.Index(i)
+ dstElement := dst.Index(i)
+ if srcElement.CanInterface() {
+ srcElement = reflect.ValueOf(srcElement.Interface())
+ }
+ if dstElement.CanInterface() {
+ dstElement = reflect.ValueOf(dstElement.Interface())
+ }
+
+ if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil {
+ return
+ }
+ }
+ }
+ case reflect.Ptr:
+ fallthrough
+ case reflect.Interface:
+ if isReflectNil(src) {
+ if overwriteWithEmptySrc && dst.CanSet() && src.Type().AssignableTo(dst.Type()) {
+ dst.Set(src)
+ }
+ break
+ }
+
+ if src.Kind() != reflect.Interface {
+ if dst.IsNil() || (src.Kind() != reflect.Ptr && overwrite) {
+ if dst.CanSet() && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) {
+ dst.Set(src)
+ }
+ } else if src.Kind() == reflect.Ptr {
+ if !config.ShouldNotDereference {
+ if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil {
+ return
+ }
+ } else {
+ if overwriteWithEmptySrc || (overwrite && !src.IsNil()) || dst.IsNil() {
+ dst.Set(src)
+ }
+ }
+ } else if dst.Elem().Type() == src.Type() {
+ if err = deepMerge(dst.Elem(), src, visited, depth+1, config); err != nil {
+ return
+ }
+ } else {
+ return ErrDifferentArgumentsTypes
+ }
+ break
+ }
+
+ if dst.IsNil() || overwrite {
+ if dst.CanSet() && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) {
+ dst.Set(src)
+ }
+ break
+ }
+
+ if dst.Elem().Kind() == src.Elem().Kind() {
+ if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil {
+ return
+ }
+ break
+ }
+ default:
+ mustSet := (isEmptyValue(dst, !config.ShouldNotDereference) || overwrite) && (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc)
+ if mustSet {
+ if dst.CanSet() {
+ dst.Set(src)
+ } else {
+ dst = src
+ }
+ }
+ }
+
+ return
+}
+
+// Merge will fill any empty for value type attributes on the dst struct using corresponding
+// src attributes if they themselves are not empty. dst and src must be valid same-type structs
+// and dst must be a pointer to struct.
+// It won't merge unexported (private) fields and will do recursively any exported field.
+func Merge(dst, src interface{}, opts ...func(*Config)) error {
+ return merge(dst, src, opts...)
+}
+
+// MergeWithOverwrite will do the same as Merge except that non-empty dst attributes will be overridden by
+// non-empty src attribute values.
+// Deprecated: use Merge(…) with WithOverride
+func MergeWithOverwrite(dst, src interface{}, opts ...func(*Config)) error {
+ return merge(dst, src, append(opts, WithOverride)...)
+}
+
+// WithTransformers adds transformers to merge, allowing to customize the merging of some types.
+func WithTransformers(transformers Transformers) func(*Config) {
+ return func(config *Config) {
+ config.Transformers = transformers
+ }
+}
+
+// WithOverride will make merge override non-empty dst attributes with non-empty src attributes values.
+func WithOverride(config *Config) {
+ config.Overwrite = true
+}
+
+// WithOverwriteWithEmptyValue will make merge override non empty dst attributes with empty src attributes values.
+func WithOverwriteWithEmptyValue(config *Config) {
+ config.Overwrite = true
+ config.overwriteWithEmptyValue = true
+}
+
+// WithOverrideEmptySlice will make merge override empty dst slice with empty src slice.
+func WithOverrideEmptySlice(config *Config) {
+ config.overwriteSliceWithEmptyValue = true
+}
+
+// WithoutDereference prevents dereferencing pointers when evaluating whether they are empty
+// (i.e. a non-nil pointer is never considered empty).
+func WithoutDereference(config *Config) {
+ config.ShouldNotDereference = true
+}
+
+// WithAppendSlice will make merge append slices instead of overwriting it.
+func WithAppendSlice(config *Config) {
+ config.AppendSlice = true
+}
+
+// WithTypeCheck will make merge check types while overwriting it (must be used with WithOverride).
+func WithTypeCheck(config *Config) {
+ config.TypeCheck = true
+}
+
+// WithSliceDeepCopy will merge slice element one by one with Overwrite flag.
+func WithSliceDeepCopy(config *Config) {
+ config.sliceDeepCopy = true
+ config.Overwrite = true
+}
+
+func merge(dst, src interface{}, opts ...func(*Config)) error {
+ if dst != nil && reflect.ValueOf(dst).Kind() != reflect.Ptr {
+ return ErrNonPointerArgument
+ }
+ var (
+ vDst, vSrc reflect.Value
+ err error
+ )
+
+ config := &Config{}
+
+ for _, opt := range opts {
+ opt(config)
+ }
+
+ if vDst, vSrc, err = resolveValues(dst, src); err != nil {
+ return err
+ }
+ if vDst.Type() != vSrc.Type() {
+ return ErrDifferentArgumentsTypes
+ }
+ return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config)
+}
+
+// IsReflectNil is the reflect value provided nil
+func isReflectNil(v reflect.Value) bool {
+ k := v.Kind()
+ switch k {
+ case reflect.Interface, reflect.Slice, reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr:
+ // Both interface and slice are nil if first word is 0.
+ // Both are always bigger than a word; assume flagIndir.
+ return v.IsNil()
+ default:
+ return false
+ }
+}
diff --git a/vendor/github.com/imdario/mergo/mergo.go b/vendor/github.com/imdario/mergo/mergo.go
new file mode 100644
index 000000000..0a721e2d8
--- /dev/null
+++ b/vendor/github.com/imdario/mergo/mergo.go
@@ -0,0 +1,81 @@
+// Copyright 2013 Dario Castañé. All rights reserved.
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Based on src/pkg/reflect/deepequal.go from official
+// golang's stdlib.
+
+package mergo
+
+import (
+ "errors"
+ "reflect"
+)
+
+// Errors reported by Mergo when it finds invalid arguments.
+var (
+ ErrNilArguments = errors.New("src and dst must not be nil")
+ ErrDifferentArgumentsTypes = errors.New("src and dst must be of same type")
+ ErrNotSupported = errors.New("only structs, maps, and slices are supported")
+ ErrExpectedMapAsDestination = errors.New("dst was expected to be a map")
+ ErrExpectedStructAsDestination = errors.New("dst was expected to be a struct")
+ ErrNonPointerArgument = errors.New("dst must be a pointer")
+)
+
+// During deepMerge, must keep track of checks that are
+// in progress. The comparison algorithm assumes that all
+// checks in progress are true when it reencounters them.
+// Visited are stored in a map indexed by 17 * a1 + a2;
+type visit struct {
+ typ reflect.Type
+ next *visit
+ ptr uintptr
+}
+
+// From src/pkg/encoding/json/encode.go.
+func isEmptyValue(v reflect.Value, shouldDereference bool) bool {
+ switch v.Kind() {
+ case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
+ return v.Len() == 0
+ case reflect.Bool:
+ return !v.Bool()
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ return v.Int() == 0
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ return v.Uint() == 0
+ case reflect.Float32, reflect.Float64:
+ return v.Float() == 0
+ case reflect.Interface, reflect.Ptr:
+ if v.IsNil() {
+ return true
+ }
+ if shouldDereference {
+ return isEmptyValue(v.Elem(), shouldDereference)
+ }
+ return false
+ case reflect.Func:
+ return v.IsNil()
+ case reflect.Invalid:
+ return true
+ }
+ return false
+}
+
+func resolveValues(dst, src interface{}) (vDst, vSrc reflect.Value, err error) {
+ if dst == nil || src == nil {
+ err = ErrNilArguments
+ return
+ }
+ vDst = reflect.ValueOf(dst).Elem()
+ if vDst.Kind() != reflect.Struct && vDst.Kind() != reflect.Map && vDst.Kind() != reflect.Slice {
+ err = ErrNotSupported
+ return
+ }
+ vSrc = reflect.ValueOf(src)
+ // We check if vSrc is a pointer to dereference it.
+ if vSrc.Kind() == reflect.Ptr {
+ vSrc = vSrc.Elem()
+ }
+ return
+}
diff --git a/vendor/github.com/mitchellh/go-homedir/LICENSE b/vendor/github.com/mitchellh/go-homedir/LICENSE
new file mode 100644
index 000000000..f9c841a51
--- /dev/null
+++ b/vendor/github.com/mitchellh/go-homedir/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 Mitchell Hashimoto
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/github.com/mitchellh/go-homedir/README.md b/vendor/github.com/mitchellh/go-homedir/README.md
new file mode 100644
index 000000000..d70706d5b
--- /dev/null
+++ b/vendor/github.com/mitchellh/go-homedir/README.md
@@ -0,0 +1,14 @@
+# go-homedir
+
+This is a Go library for detecting the user's home directory without
+the use of cgo, so the library can be used in cross-compilation environments.
+
+Usage is incredibly simple, just call `homedir.Dir()` to get the home directory
+for a user, and `homedir.Expand()` to expand the `~` in a path to the home
+directory.
+
+**Why not just use `os/user`?** The built-in `os/user` package requires
+cgo on Darwin systems. This means that any Go code that uses that package
+cannot cross compile. But 99% of the time the use for `os/user` is just to
+retrieve the home directory, which we can do for the current user without
+cgo. This library does that, enabling cross-compilation.
diff --git a/vendor/github.com/mitchellh/go-homedir/homedir.go b/vendor/github.com/mitchellh/go-homedir/homedir.go
new file mode 100644
index 000000000..25378537e
--- /dev/null
+++ b/vendor/github.com/mitchellh/go-homedir/homedir.go
@@ -0,0 +1,167 @@
+package homedir
+
+import (
+ "bytes"
+ "errors"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "runtime"
+ "strconv"
+ "strings"
+ "sync"
+)
+
+// DisableCache will disable caching of the home directory. Caching is enabled
+// by default.
+var DisableCache bool
+
+var homedirCache string
+var cacheLock sync.RWMutex
+
+// Dir returns the home directory for the executing user.
+//
+// This uses an OS-specific method for discovering the home directory.
+// An error is returned if a home directory cannot be detected.
+func Dir() (string, error) {
+ if !DisableCache {
+ cacheLock.RLock()
+ cached := homedirCache
+ cacheLock.RUnlock()
+ if cached != "" {
+ return cached, nil
+ }
+ }
+
+ cacheLock.Lock()
+ defer cacheLock.Unlock()
+
+ var result string
+ var err error
+ if runtime.GOOS == "windows" {
+ result, err = dirWindows()
+ } else {
+ // Unix-like system, so just assume Unix
+ result, err = dirUnix()
+ }
+
+ if err != nil {
+ return "", err
+ }
+ homedirCache = result
+ return result, nil
+}
+
+// Expand expands the path to include the home directory if the path
+// is prefixed with `~`. If it isn't prefixed with `~`, the path is
+// returned as-is.
+func Expand(path string) (string, error) {
+ if len(path) == 0 {
+ return path, nil
+ }
+
+ if path[0] != '~' {
+ return path, nil
+ }
+
+ if len(path) > 1 && path[1] != '/' && path[1] != '\\' {
+ return "", errors.New("cannot expand user-specific home dir")
+ }
+
+ dir, err := Dir()
+ if err != nil {
+ return "", err
+ }
+
+ return filepath.Join(dir, path[1:]), nil
+}
+
+// Reset clears the cache, forcing the next call to Dir to re-detect
+// the home directory. This generally never has to be called, but can be
+// useful in tests if you're modifying the home directory via the HOME
+// env var or something.
+func Reset() {
+ cacheLock.Lock()
+ defer cacheLock.Unlock()
+ homedirCache = ""
+}
+
+func dirUnix() (string, error) {
+ homeEnv := "HOME"
+ if runtime.GOOS == "plan9" {
+ // On plan9, env vars are lowercase.
+ homeEnv = "home"
+ }
+
+ // First prefer the HOME environmental variable
+ if home := os.Getenv(homeEnv); home != "" {
+ return home, nil
+ }
+
+ var stdout bytes.Buffer
+
+ // If that fails, try OS specific commands
+ if runtime.GOOS == "darwin" {
+ cmd := exec.Command("sh", "-c", `dscl -q . -read /Users/"$(whoami)" NFSHomeDirectory | sed 's/^[^ ]*: //'`)
+ cmd.Stdout = &stdout
+ if err := cmd.Run(); err == nil {
+ result := strings.TrimSpace(stdout.String())
+ if result != "" {
+ return result, nil
+ }
+ }
+ } else {
+ cmd := exec.Command("getent", "passwd", strconv.Itoa(os.Getuid()))
+ cmd.Stdout = &stdout
+ if err := cmd.Run(); err != nil {
+ // If the error is ErrNotFound, we ignore it. Otherwise, return it.
+ if err != exec.ErrNotFound {
+ return "", err
+ }
+ } else {
+ if passwd := strings.TrimSpace(stdout.String()); passwd != "" {
+ // username:password:uid:gid:gecos:home:shell
+ passwdParts := strings.SplitN(passwd, ":", 7)
+ if len(passwdParts) > 5 {
+ return passwdParts[5], nil
+ }
+ }
+ }
+ }
+
+ // If all else fails, try the shell
+ stdout.Reset()
+ cmd := exec.Command("sh", "-c", "cd && pwd")
+ cmd.Stdout = &stdout
+ if err := cmd.Run(); err != nil {
+ return "", err
+ }
+
+ result := strings.TrimSpace(stdout.String())
+ if result == "" {
+ return "", errors.New("blank output when reading home directory")
+ }
+
+ return result, nil
+}
+
+func dirWindows() (string, error) {
+ // First prefer the HOME environmental variable
+ if home := os.Getenv("HOME"); home != "" {
+ return home, nil
+ }
+
+ // Prefer standard environment variable USERPROFILE
+ if home := os.Getenv("USERPROFILE"); home != "" {
+ return home, nil
+ }
+
+ drive := os.Getenv("HOMEDRIVE")
+ path := os.Getenv("HOMEPATH")
+ home := drive + path
+ if drive == "" || path == "" {
+ return "", errors.New("HOMEDRIVE, HOMEPATH, or USERPROFILE are blank")
+ }
+
+ return home, nil
+}
diff --git a/vendor/github.com/oliveagle/jsonpath/.gitignore b/vendor/github.com/oliveagle/jsonpath/.gitignore
new file mode 100644
index 000000000..c469a41f6
--- /dev/null
+++ b/vendor/github.com/oliveagle/jsonpath/.gitignore
@@ -0,0 +1,26 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+*.sw[op]
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.test
+*.prof
+.idea
diff --git a/vendor/github.com/oliveagle/jsonpath/.travis.yml b/vendor/github.com/oliveagle/jsonpath/.travis.yml
new file mode 100644
index 000000000..abf693ce9
--- /dev/null
+++ b/vendor/github.com/oliveagle/jsonpath/.travis.yml
@@ -0,0 +1,8 @@
+language: go
+
+go:
+ - 1.5
+ - 1.5.1
+ - 1.6.2
+
+os: linux
diff --git a/vendor/github.com/oliveagle/jsonpath/LICENSE b/vendor/github.com/oliveagle/jsonpath/LICENSE
new file mode 100644
index 000000000..530afca3d
--- /dev/null
+++ b/vendor/github.com/oliveagle/jsonpath/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 oliver
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/vendor/github.com/oliveagle/jsonpath/jsonpath.go b/vendor/github.com/oliveagle/jsonpath/jsonpath.go
new file mode 100644
index 000000000..00dc6fde8
--- /dev/null
+++ b/vendor/github.com/oliveagle/jsonpath/jsonpath.go
@@ -0,0 +1,722 @@
+package jsonpath
+
+import (
+ "errors"
+ "fmt"
+ "go/token"
+ "go/types"
+ "reflect"
+ "regexp"
+ "strconv"
+ "strings"
+)
+
+var ErrGetFromNullObj = errors.New("get attribute from null object")
+
+func JsonPathLookup(obj interface{}, jpath string) (interface{}, error) {
+ c, err := Compile(jpath)
+ if err != nil {
+ return nil, err
+ }
+ return c.Lookup(obj)
+}
+
+type Compiled struct {
+ path string
+ steps []step
+}
+
+type step struct {
+ op string
+ key string
+ args interface{}
+}
+
+func MustCompile(jpath string) *Compiled {
+ c, err := Compile(jpath)
+ if err != nil {
+ panic(err)
+ }
+ return c
+}
+
+func Compile(jpath string) (*Compiled, error) {
+ tokens, err := tokenize(jpath)
+ if err != nil {
+ return nil, err
+ }
+ if tokens[0] != "@" && tokens[0] != "$" {
+ return nil, fmt.Errorf("$ or @ should in front of path")
+ }
+ tokens = tokens[1:]
+ res := Compiled{
+ path: jpath,
+ steps: make([]step, len(tokens)),
+ }
+ for i, token := range tokens {
+ op, key, args, err := parse_token(token)
+ if err != nil {
+ return nil, err
+ }
+ res.steps[i] = step{op, key, args}
+ }
+ return &res, nil
+}
+
+func (c *Compiled) String() string {
+ return fmt.Sprintf("Compiled lookup: %s", c.path)
+}
+
+func (c *Compiled) Lookup(obj interface{}) (interface{}, error) {
+ var err error
+ for _, s := range c.steps {
+ // "key", "idx"
+ switch s.op {
+ case "key":
+ obj, err = get_key(obj, s.key)
+ if err != nil {
+ return nil, err
+ }
+ case "idx":
+ if len(s.key) > 0 {
+ // no key `$[0].test`
+ obj, err = get_key(obj, s.key)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ if len(s.args.([]int)) > 1 {
+ res := []interface{}{}
+ for _, x := range s.args.([]int) {
+ //fmt.Println("idx ---- ", x)
+ tmp, err := get_idx(obj, x)
+ if err != nil {
+ return nil, err
+ }
+ res = append(res, tmp)
+ }
+ obj = res
+ } else if len(s.args.([]int)) == 1 {
+ //fmt.Println("idx ----------------3")
+ obj, err = get_idx(obj, s.args.([]int)[0])
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ //fmt.Println("idx ----------------4")
+ return nil, fmt.Errorf("cannot index on empty slice")
+ }
+ case "range":
+ if len(s.key) > 0 {
+ // no key `$[:1].test`
+ obj, err = get_key(obj, s.key)
+ if err != nil {
+ return nil, err
+ }
+ }
+ if argsv, ok := s.args.([2]interface{}); ok == true {
+ obj, err = get_range(obj, argsv[0], argsv[1])
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ return nil, fmt.Errorf("range args length should be 2")
+ }
+ case "filter":
+ obj, err = get_key(obj, s.key)
+ if err != nil {
+ return nil, err
+ }
+ obj, err = get_filtered(obj, obj, s.args.(string))
+ if err != nil {
+ return nil, err
+ }
+ default:
+ return nil, fmt.Errorf("expression don't support in filter")
+ }
+ }
+ return obj, nil
+}
+
+func tokenize(query string) ([]string, error) {
+ tokens := []string{}
+ // token_start := false
+ // token_end := false
+ token := ""
+
+ // fmt.Println("-------------------------------------------------- start")
+ for idx, x := range query {
+ token += string(x)
+ // //fmt.Printf("idx: %d, x: %s, token: %s, tokens: %v\n", idx, string(x), token, tokens)
+ if idx == 0 {
+ if token == "$" || token == "@" {
+ tokens = append(tokens, token[:])
+ token = ""
+ continue
+ } else {
+ return nil, fmt.Errorf("should start with '$'")
+ }
+ }
+ if token == "." {
+ continue
+ } else if token == ".." {
+ if tokens[len(tokens)-1] != "*" {
+ tokens = append(tokens, "*")
+ }
+ token = "."
+ continue
+ } else {
+ // fmt.Println("else: ", string(x), token)
+ if strings.Contains(token, "[") {
+ // fmt.Println(" contains [ ")
+ if x == ']' && !strings.HasSuffix(token, "\\]") {
+ if token[0] == '.' {
+ tokens = append(tokens, token[1:])
+ } else {
+ tokens = append(tokens, token[:])
+ }
+ token = ""
+ continue
+ }
+ } else {
+ // fmt.Println(" doesn't contains [ ")
+ if x == '.' {
+ if token[0] == '.' {
+ tokens = append(tokens, token[1:len(token)-1])
+ } else {
+ tokens = append(tokens, token[:len(token)-1])
+ }
+ token = "."
+ continue
+ }
+ }
+ }
+ }
+ if len(token) > 0 {
+ if token[0] == '.' {
+ token = token[1:]
+ if token != "*" {
+ tokens = append(tokens, token[:])
+ } else if tokens[len(tokens)-1] != "*" {
+ tokens = append(tokens, token[:])
+ }
+ } else {
+ if token != "*" {
+ tokens = append(tokens, token[:])
+ } else if tokens[len(tokens)-1] != "*" {
+ tokens = append(tokens, token[:])
+ }
+ }
+ }
+ // fmt.Println("finished tokens: ", tokens)
+ // fmt.Println("================================================= done ")
+ return tokens, nil
+}
+
+/*
+ op: "root", "key", "idx", "range", "filter", "scan"
+*/
+func parse_token(token string) (op string, key string, args interface{}, err error) {
+ if token == "$" {
+ return "root", "$", nil, nil
+ }
+ if token == "*" {
+ return "scan", "*", nil, nil
+ }
+
+ bracket_idx := strings.Index(token, "[")
+ if bracket_idx < 0 {
+ return "key", token, nil, nil
+ } else {
+ key = token[:bracket_idx]
+ tail := token[bracket_idx:]
+ if len(tail) < 3 {
+ err = fmt.Errorf("len(tail) should >=3, %v", tail)
+ return
+ }
+ tail = tail[1 : len(tail)-1]
+
+ //fmt.Println(key, tail)
+ if strings.Contains(tail, "?") {
+ // filter -------------------------------------------------
+ op = "filter"
+ if strings.HasPrefix(tail, "?(") && strings.HasSuffix(tail, ")") {
+ args = strings.Trim(tail[2:len(tail)-1], " ")
+ }
+ return
+ } else if strings.Contains(tail, ":") {
+ // range ----------------------------------------------
+ op = "range"
+ tails := strings.Split(tail, ":")
+ if len(tails) != 2 {
+ err = fmt.Errorf("only support one range(from, to): %v", tails)
+ return
+ }
+ var frm interface{}
+ var to interface{}
+ if frm, err = strconv.Atoi(strings.Trim(tails[0], " ")); err != nil {
+ if strings.Trim(tails[0], " ") == "" {
+ err = nil
+ }
+ frm = nil
+ }
+ if to, err = strconv.Atoi(strings.Trim(tails[1], " ")); err != nil {
+ if strings.Trim(tails[1], " ") == "" {
+ err = nil
+ }
+ to = nil
+ }
+ args = [2]interface{}{frm, to}
+ return
+ } else if tail == "*" {
+ op = "range"
+ args = [2]interface{}{nil, nil}
+ return
+ } else {
+ // idx ------------------------------------------------
+ op = "idx"
+ res := []int{}
+ for _, x := range strings.Split(tail, ",") {
+ if i, err := strconv.Atoi(strings.Trim(x, " ")); err == nil {
+ res = append(res, i)
+ } else {
+ return "", "", nil, err
+ }
+ }
+ args = res
+ }
+ }
+ return op, key, args, nil
+}
+
+func filter_get_from_explicit_path(obj interface{}, path string) (interface{}, error) {
+ steps, err := tokenize(path)
+ //fmt.Println("f: steps: ", steps, err)
+ //fmt.Println(path, steps)
+ if err != nil {
+ return nil, err
+ }
+ if steps[0] != "@" && steps[0] != "$" {
+ return nil, fmt.Errorf("$ or @ should in front of path")
+ }
+ steps = steps[1:]
+ xobj := obj
+ //fmt.Println("f: xobj", xobj)
+ for _, s := range steps {
+ op, key, args, err := parse_token(s)
+ // "key", "idx"
+ switch op {
+ case "key":
+ xobj, err = get_key(xobj, key)
+ if err != nil {
+ return nil, err
+ }
+ case "idx":
+ if len(args.([]int)) != 1 {
+ return nil, fmt.Errorf("don't support multiple index in filter")
+ }
+ xobj, err = get_key(xobj, key)
+ if err != nil {
+ return nil, err
+ }
+ xobj, err = get_idx(xobj, args.([]int)[0])
+ if err != nil {
+ return nil, err
+ }
+ default:
+ return nil, fmt.Errorf("expression don't support in filter")
+ }
+ }
+ return xobj, nil
+}
+
+func get_key(obj interface{}, key string) (interface{}, error) {
+ if reflect.TypeOf(obj) == nil {
+ return nil, ErrGetFromNullObj
+ }
+ switch reflect.TypeOf(obj).Kind() {
+ case reflect.Map:
+ // if obj came from stdlib json, its highly likely to be a map[string]interface{}
+ // in which case we can save having to iterate the map keys to work out if the
+ // key exists
+ if jsonMap, ok := obj.(map[string]interface{}); ok {
+ val, exists := jsonMap[key]
+ if !exists {
+ return nil, fmt.Errorf("key error: %s not found in object", key)
+ }
+ return val, nil
+ }
+ for _, kv := range reflect.ValueOf(obj).MapKeys() {
+ //fmt.Println(kv.String())
+ if kv.String() == key {
+ return reflect.ValueOf(obj).MapIndex(kv).Interface(), nil
+ }
+ }
+ return nil, fmt.Errorf("key error: %s not found in object", key)
+ case reflect.Slice:
+ // slice we should get from all objects in it.
+ res := []interface{}{}
+ for i := 0; i < reflect.ValueOf(obj).Len(); i++ {
+ tmp, _ := get_idx(obj, i)
+ if v, err := get_key(tmp, key); err == nil {
+ res = append(res, v)
+ }
+ }
+ return res, nil
+ default:
+ return nil, fmt.Errorf("object is not map")
+ }
+}
+
+func get_idx(obj interface{}, idx int) (interface{}, error) {
+ switch reflect.TypeOf(obj).Kind() {
+ case reflect.Slice:
+ length := reflect.ValueOf(obj).Len()
+ if idx >= 0 {
+ if idx >= length {
+ return nil, fmt.Errorf("index out of range: len: %v, idx: %v", length, idx)
+ }
+ return reflect.ValueOf(obj).Index(idx).Interface(), nil
+ } else {
+ // < 0
+ _idx := length + idx
+ if _idx < 0 {
+ return nil, fmt.Errorf("index out of range: len: %v, idx: %v", length, idx)
+ }
+ return reflect.ValueOf(obj).Index(_idx).Interface(), nil
+ }
+ default:
+ return nil, fmt.Errorf("object is not Slice")
+ }
+}
+
+func get_range(obj, frm, to interface{}) (interface{}, error) {
+ switch reflect.TypeOf(obj).Kind() {
+ case reflect.Slice:
+ length := reflect.ValueOf(obj).Len()
+ _frm := 0
+ _to := length
+ if frm == nil {
+ frm = 0
+ }
+ if to == nil {
+ to = length - 1
+ }
+ if fv, ok := frm.(int); ok == true {
+ if fv < 0 {
+ _frm = length + fv
+ } else {
+ _frm = fv
+ }
+ }
+ if tv, ok := to.(int); ok == true {
+ if tv < 0 {
+ _to = length + tv + 1
+ } else {
+ _to = tv + 1
+ }
+ }
+ if _frm < 0 || _frm >= length {
+ return nil, fmt.Errorf("index [from] out of range: len: %v, from: %v", length, frm)
+ }
+ if _to < 0 || _to > length {
+ return nil, fmt.Errorf("index [to] out of range: len: %v, to: %v", length, to)
+ }
+ //fmt.Println("_frm, _to: ", _frm, _to)
+ res_v := reflect.ValueOf(obj).Slice(_frm, _to)
+ return res_v.Interface(), nil
+ default:
+ return nil, fmt.Errorf("object is not Slice")
+ }
+}
+
+func regFilterCompile(rule string) (*regexp.Regexp, error) {
+ runes := []rune(rule)
+ if len(runes) <= 2 {
+ return nil, errors.New("empty rule")
+ }
+
+ if runes[0] != '/' || runes[len(runes)-1] != '/' {
+ return nil, errors.New("invalid syntax. should be in `/pattern/` form")
+ }
+ runes = runes[1 : len(runes)-1]
+ return regexp.Compile(string(runes))
+}
+
+func get_filtered(obj, root interface{}, filter string) ([]interface{}, error) {
+ lp, op, rp, err := parse_filter(filter)
+ if err != nil {
+ return nil, err
+ }
+
+ res := []interface{}{}
+
+ switch reflect.TypeOf(obj).Kind() {
+ case reflect.Slice:
+ if op == "=~" {
+ // regexp
+ pat, err := regFilterCompile(rp)
+ if err != nil {
+ return nil, err
+ }
+
+ for i := 0; i < reflect.ValueOf(obj).Len(); i++ {
+ tmp := reflect.ValueOf(obj).Index(i).Interface()
+ ok, err := eval_reg_filter(tmp, root, lp, pat)
+ if err != nil {
+ return nil, err
+ }
+ if ok == true {
+ res = append(res, tmp)
+ }
+ }
+ } else {
+ for i := 0; i < reflect.ValueOf(obj).Len(); i++ {
+ tmp := reflect.ValueOf(obj).Index(i).Interface()
+ ok, err := eval_filter(tmp, root, lp, op, rp)
+ if err != nil {
+ return nil, err
+ }
+ if ok == true {
+ res = append(res, tmp)
+ }
+ }
+ }
+ return res, nil
+ case reflect.Map:
+ if op == "=~" {
+ // regexp
+ pat, err := regFilterCompile(rp)
+ if err != nil {
+ return nil, err
+ }
+
+ for _, kv := range reflect.ValueOf(obj).MapKeys() {
+ tmp := reflect.ValueOf(obj).MapIndex(kv).Interface()
+ ok, err := eval_reg_filter(tmp, root, lp, pat)
+ if err != nil {
+ return nil, err
+ }
+ if ok == true {
+ res = append(res, tmp)
+ }
+ }
+ } else {
+ for _, kv := range reflect.ValueOf(obj).MapKeys() {
+ tmp := reflect.ValueOf(obj).MapIndex(kv).Interface()
+ ok, err := eval_filter(tmp, root, lp, op, rp)
+ if err != nil {
+ return nil, err
+ }
+ if ok == true {
+ res = append(res, tmp)
+ }
+ }
+ }
+ default:
+ return nil, fmt.Errorf("don't support filter on this type: %v", reflect.TypeOf(obj).Kind())
+ }
+
+ return res, nil
+}
+
+// @.isbn => @.isbn, exists, nil
+// @.price < 10 => @.price, <, 10
+// @.price <= $.expensive => @.price, <=, $.expensive
+// @.author =~ /.*REES/i => @.author, match, /.*REES/i
+
+func parse_filter(filter string) (lp string, op string, rp string, err error) {
+ tmp := ""
+
+ stage := 0
+ str_embrace := false
+ for idx, c := range filter {
+ switch c {
+ case '\'':
+ if str_embrace == false {
+ str_embrace = true
+ } else {
+ switch stage {
+ case 0:
+ lp = tmp
+ case 1:
+ op = tmp
+ case 2:
+ rp = tmp
+ }
+ tmp = ""
+ }
+ case ' ':
+ if str_embrace == true {
+ tmp += string(c)
+ continue
+ }
+ switch stage {
+ case 0:
+ lp = tmp
+ case 1:
+ op = tmp
+ case 2:
+ rp = tmp
+ }
+ tmp = ""
+
+ stage += 1
+ if stage > 2 {
+ return "", "", "", errors.New(fmt.Sprintf("invalid char at %d: `%c`", idx, c))
+ }
+ default:
+ tmp += string(c)
+ }
+ }
+ if tmp != "" {
+ switch stage {
+ case 0:
+ lp = tmp
+ op = "exists"
+ case 1:
+ op = tmp
+ case 2:
+ rp = tmp
+ }
+ tmp = ""
+ }
+ return lp, op, rp, err
+}
+
+func parse_filter_v1(filter string) (lp string, op string, rp string, err error) {
+ tmp := ""
+ istoken := false
+ for _, c := range filter {
+ if istoken == false && c != ' ' {
+ istoken = true
+ }
+ if istoken == true && c == ' ' {
+ istoken = false
+ }
+ if istoken == true {
+ tmp += string(c)
+ }
+ if istoken == false && tmp != "" {
+ if lp == "" {
+ lp = tmp[:]
+ tmp = ""
+ } else if op == "" {
+ op = tmp[:]
+ tmp = ""
+ } else if rp == "" {
+ rp = tmp[:]
+ tmp = ""
+ }
+ }
+ }
+ if tmp != "" && lp == "" && op == "" && rp == "" {
+ lp = tmp[:]
+ op = "exists"
+ rp = ""
+ err = nil
+ return
+ } else if tmp != "" && rp == "" {
+ rp = tmp[:]
+ tmp = ""
+ }
+ return lp, op, rp, err
+}
+
+func eval_reg_filter(obj, root interface{}, lp string, pat *regexp.Regexp) (res bool, err error) {
+ if pat == nil {
+ return false, errors.New("nil pat")
+ }
+ lp_v, err := get_lp_v(obj, root, lp)
+ if err != nil {
+ return false, err
+ }
+ switch v := lp_v.(type) {
+ case string:
+ return pat.MatchString(v), nil
+ default:
+ return false, errors.New("only string can match with regular expression")
+ }
+}
+
+func get_lp_v(obj, root interface{}, lp string) (interface{}, error) {
+ var lp_v interface{}
+ if strings.HasPrefix(lp, "@.") {
+ return filter_get_from_explicit_path(obj, lp)
+ } else if strings.HasPrefix(lp, "$.") {
+ return filter_get_from_explicit_path(root, lp)
+ } else {
+ lp_v = lp
+ }
+ return lp_v, nil
+}
+
+func eval_filter(obj, root interface{}, lp, op, rp string) (res bool, err error) {
+ lp_v, err := get_lp_v(obj, root, lp)
+
+ if op == "exists" {
+ return lp_v != nil, nil
+ } else if op == "=~" {
+ return false, fmt.Errorf("not implemented yet")
+ } else {
+ var rp_v interface{}
+ if strings.HasPrefix(rp, "@.") {
+ rp_v, err = filter_get_from_explicit_path(obj, rp)
+ } else if strings.HasPrefix(rp, "$.") {
+ rp_v, err = filter_get_from_explicit_path(root, rp)
+ } else {
+ rp_v = rp
+ }
+ //fmt.Printf("lp_v: %v, rp_v: %v\n", lp_v, rp_v)
+ return cmp_any(lp_v, rp_v, op)
+ }
+}
+
+func isNumber(o interface{}) bool {
+ switch v := o.(type) {
+ case int, int8, int16, int32, int64:
+ return true
+ case uint, uint8, uint16, uint32, uint64:
+ return true
+ case float32, float64:
+ return true
+ case string:
+ _, err := strconv.ParseFloat(v, 64)
+ if err == nil {
+ return true
+ } else {
+ return false
+ }
+ }
+ return false
+}
+
+func cmp_any(obj1, obj2 interface{}, op string) (bool, error) {
+ switch op {
+ case "<", "<=", "==", ">=", ">":
+ default:
+ return false, fmt.Errorf("op should only be <, <=, ==, >= and >")
+ }
+
+ var exp string
+ if isNumber(obj1) && isNumber(obj2) {
+ exp = fmt.Sprintf(`%v %s %v`, obj1, op, obj2)
+ } else {
+ exp = fmt.Sprintf(`"%v" %s "%v"`, obj1, op, obj2)
+ }
+ //fmt.Println("exp: ", exp)
+ fset := token.NewFileSet()
+ res, err := types.Eval(fset, nil, 0, exp)
+ if err != nil {
+ return false, err
+ }
+ if res.IsValue() == false || (res.Value.String() != "false" && res.Value.String() != "true") {
+ return false, fmt.Errorf("result should only be true or false")
+ }
+ if res.Value.String() == "true" {
+ return true, nil
+ }
+
+ return false, nil
+}
diff --git a/vendor/github.com/oliveagle/jsonpath/readme.md b/vendor/github.com/oliveagle/jsonpath/readme.md
new file mode 100644
index 000000000..a8ee2dbfa
--- /dev/null
+++ b/vendor/github.com/oliveagle/jsonpath/readme.md
@@ -0,0 +1,114 @@
+JsonPath
+----------------
+
+![Build Status](https://travis-ci.org/oliveagle/jsonpath.svg?branch=master)
+
+A golang implementation of JsonPath syntax.
+follow the majority rules in http://goessner.net/articles/JsonPath/
+but also with some minor differences.
+
+this library is till bleeding edge, so use it at your own risk. :D
+
+**Golang Version Required**: 1.5+
+
+Get Started
+------------
+
+```bash
+go get github.com/oliveagle/jsonpath
+```
+
+example code:
+
+```go
+import (
+ "github.com/oliveagle/jsonpath"
+ "encoding/json"
+)
+
+var json_data interface{}
+json.Unmarshal([]byte(data), &json_data)
+
+res, err := jsonpath.JsonPathLookup(json_data, "$.expensive")
+
+//or reuse lookup pattern
+pat, _ := jsonpath.Compile(`$.store.book[?(@.price < $.expensive)].price`)
+res, err := pat.Lookup(json_data)
+```
+
+Operators
+--------
+referenced from github.com/jayway/JsonPath
+
+| Operator | Supported | Description |
+| ---- | :---: | ---------- |
+| $ | Y | The root element to query. This starts all path expressions. |
+| @ | Y | The current node being processed by a filter predicate. |
+| * | X | Wildcard. Available anywhere a name or numeric are required. |
+| .. | X | Deep scan. Available anywhere a name is required. |
+| . | Y | Dot-notated child |
+| ['' (, '')] | X | Bracket-notated child or children |
+| [ (, )] | Y | Array index or indexes |
+| [start:end] | Y | Array slice operator |
+| [?()] | Y | Filter expression. Expression must evaluate to a boolean value. |
+
+Examples
+--------
+given these example data.
+
+```javascript
+{
+ "store": {
+ "book": [
+ {
+ "category": "reference",
+ "author": "Nigel Rees",
+ "title": "Sayings of the Century",
+ "price": 8.95
+ },
+ {
+ "category": "fiction",
+ "author": "Evelyn Waugh",
+ "title": "Sword of Honour",
+ "price": 12.99
+ },
+ {
+ "category": "fiction",
+ "author": "Herman Melville",
+ "title": "Moby Dick",
+ "isbn": "0-553-21311-3",
+ "price": 8.99
+ },
+ {
+ "category": "fiction",
+ "author": "J. R. R. Tolkien",
+ "title": "The Lord of the Rings",
+ "isbn": "0-395-19395-8",
+ "price": 22.99
+ }
+ ],
+ "bicycle": {
+ "color": "red",
+ "price": 19.95
+ }
+ },
+ "expensive": 10
+}
+```
+example json path syntax.
+----
+
+| jsonpath | result|
+| :--------- | :-------|
+| $.expensive | 10|
+| $.store.book[0].price | 8.95|
+| $.store.book[-1].isbn | "0-395-19395-8"|
+| $.store.book[0,1].price | [8.95, 12.99] |
+| $.store.book[0:2].price | [8.95, 12.99, 8.99]|
+| $.store.book[?(@.isbn)].price | [8.99, 22.99] |
+| $.store.book[?(@.price > 10)].title | ["Sword of Honour", "The Lord of the Rings"]|
+| $.store.book[?(@.price < $.expensive)].price | [8.95, 8.99] |
+| $.store.book[:].price | [8.9.5, 12.99, 8.9.9, 22.99] |
+| $.store.book[?(@.author =~ /(?i).*REES/)].author | "Nigel Rees" |
+
+> Note: golang support regular expression flags in form of `(?imsU)pattern`
\ No newline at end of file
diff --git a/vendor/github.com/patrickmn/go-cache/CONTRIBUTORS b/vendor/github.com/patrickmn/go-cache/CONTRIBUTORS
new file mode 100644
index 000000000..2b16e9974
--- /dev/null
+++ b/vendor/github.com/patrickmn/go-cache/CONTRIBUTORS
@@ -0,0 +1,9 @@
+This is a list of people who have contributed code to go-cache. They, or their
+employers, are the copyright holders of the contributed code. Contributed code
+is subject to the license restrictions listed in LICENSE (as they were when the
+code was contributed.)
+
+Dustin Sallings
+Jason Mooberry
+Sergey Shepelev
+Alex Edwards
diff --git a/vendor/github.com/patrickmn/go-cache/LICENSE b/vendor/github.com/patrickmn/go-cache/LICENSE
new file mode 100644
index 000000000..db9903c75
--- /dev/null
+++ b/vendor/github.com/patrickmn/go-cache/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2012-2017 Patrick Mylund Nielsen and the go-cache contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/vendor/github.com/patrickmn/go-cache/README.md b/vendor/github.com/patrickmn/go-cache/README.md
new file mode 100644
index 000000000..c5789cc66
--- /dev/null
+++ b/vendor/github.com/patrickmn/go-cache/README.md
@@ -0,0 +1,83 @@
+# go-cache
+
+go-cache is an in-memory key:value store/cache similar to memcached that is
+suitable for applications running on a single machine. Its major advantage is
+that, being essentially a thread-safe `map[string]interface{}` with expiration
+times, it doesn't need to serialize or transmit its contents over the network.
+
+Any object can be stored, for a given duration or forever, and the cache can be
+safely used by multiple goroutines.
+
+Although go-cache isn't meant to be used as a persistent datastore, the entire
+cache can be saved to and loaded from a file (using `c.Items()` to retrieve the
+items map to serialize, and `NewFrom()` to create a cache from a deserialized
+one) to recover from downtime quickly. (See the docs for `NewFrom()` for caveats.)
+
+### Installation
+
+`go get github.com/patrickmn/go-cache`
+
+### Usage
+
+```go
+import (
+ "fmt"
+ "github.com/patrickmn/go-cache"
+ "time"
+)
+
+func main() {
+ // Create a cache with a default expiration time of 5 minutes, and which
+ // purges expired items every 10 minutes
+ c := cache.New(5*time.Minute, 10*time.Minute)
+
+ // Set the value of the key "foo" to "bar", with the default expiration time
+ c.Set("foo", "bar", cache.DefaultExpiration)
+
+ // Set the value of the key "baz" to 42, with no expiration time
+ // (the item won't be removed until it is re-set, or removed using
+ // c.Delete("baz")
+ c.Set("baz", 42, cache.NoExpiration)
+
+ // Get the string associated with the key "foo" from the cache
+ foo, found := c.Get("foo")
+ if found {
+ fmt.Println(foo)
+ }
+
+ // Since Go is statically typed, and cache values can be anything, type
+ // assertion is needed when values are being passed to functions that don't
+ // take arbitrary types, (i.e. interface{}). The simplest way to do this for
+ // values which will only be used once--e.g. for passing to another
+ // function--is:
+ foo, found := c.Get("foo")
+ if found {
+ MyFunction(foo.(string))
+ }
+
+ // This gets tedious if the value is used several times in the same function.
+ // You might do either of the following instead:
+ if x, found := c.Get("foo"); found {
+ foo := x.(string)
+ // ...
+ }
+ // or
+ var foo string
+ if x, found := c.Get("foo"); found {
+ foo = x.(string)
+ }
+ // ...
+ // foo can then be passed around freely as a string
+
+ // Want performance? Store pointers!
+ c.Set("foo", &MyStruct, cache.DefaultExpiration)
+ if x, found := c.Get("foo"); found {
+ foo := x.(*MyStruct)
+ // ...
+ }
+}
+```
+
+### Reference
+
+`godoc` or [http://godoc.org/github.com/patrickmn/go-cache](http://godoc.org/github.com/patrickmn/go-cache)
diff --git a/vendor/github.com/patrickmn/go-cache/cache.go b/vendor/github.com/patrickmn/go-cache/cache.go
new file mode 100644
index 000000000..db88d2f2c
--- /dev/null
+++ b/vendor/github.com/patrickmn/go-cache/cache.go
@@ -0,0 +1,1161 @@
+package cache
+
+import (
+ "encoding/gob"
+ "fmt"
+ "io"
+ "os"
+ "runtime"
+ "sync"
+ "time"
+)
+
+type Item struct {
+ Object interface{}
+ Expiration int64
+}
+
+// Returns true if the item has expired.
+func (item Item) Expired() bool {
+ if item.Expiration == 0 {
+ return false
+ }
+ return time.Now().UnixNano() > item.Expiration
+}
+
+const (
+ // For use with functions that take an expiration time.
+ NoExpiration time.Duration = -1
+ // For use with functions that take an expiration time. Equivalent to
+ // passing in the same expiration duration as was given to New() or
+ // NewFrom() when the cache was created (e.g. 5 minutes.)
+ DefaultExpiration time.Duration = 0
+)
+
+type Cache struct {
+ *cache
+ // If this is confusing, see the comment at the bottom of New()
+}
+
+type cache struct {
+ defaultExpiration time.Duration
+ items map[string]Item
+ mu sync.RWMutex
+ onEvicted func(string, interface{})
+ janitor *janitor
+}
+
+// Add an item to the cache, replacing any existing item. If the duration is 0
+// (DefaultExpiration), the cache's default expiration time is used. If it is -1
+// (NoExpiration), the item never expires.
+func (c *cache) Set(k string, x interface{}, d time.Duration) {
+ // "Inlining" of set
+ var e int64
+ if d == DefaultExpiration {
+ d = c.defaultExpiration
+ }
+ if d > 0 {
+ e = time.Now().Add(d).UnixNano()
+ }
+ c.mu.Lock()
+ c.items[k] = Item{
+ Object: x,
+ Expiration: e,
+ }
+ // TODO: Calls to mu.Unlock are currently not deferred because defer
+ // adds ~200 ns (as of go1.)
+ c.mu.Unlock()
+}
+
+func (c *cache) set(k string, x interface{}, d time.Duration) {
+ var e int64
+ if d == DefaultExpiration {
+ d = c.defaultExpiration
+ }
+ if d > 0 {
+ e = time.Now().Add(d).UnixNano()
+ }
+ c.items[k] = Item{
+ Object: x,
+ Expiration: e,
+ }
+}
+
+// Add an item to the cache, replacing any existing item, using the default
+// expiration.
+func (c *cache) SetDefault(k string, x interface{}) {
+ c.Set(k, x, DefaultExpiration)
+}
+
+// Add an item to the cache only if an item doesn't already exist for the given
+// key, or if the existing item has expired. Returns an error otherwise.
+func (c *cache) Add(k string, x interface{}, d time.Duration) error {
+ c.mu.Lock()
+ _, found := c.get(k)
+ if found {
+ c.mu.Unlock()
+ return fmt.Errorf("Item %s already exists", k)
+ }
+ c.set(k, x, d)
+ c.mu.Unlock()
+ return nil
+}
+
+// Set a new value for the cache key only if it already exists, and the existing
+// item hasn't expired. Returns an error otherwise.
+func (c *cache) Replace(k string, x interface{}, d time.Duration) error {
+ c.mu.Lock()
+ _, found := c.get(k)
+ if !found {
+ c.mu.Unlock()
+ return fmt.Errorf("Item %s doesn't exist", k)
+ }
+ c.set(k, x, d)
+ c.mu.Unlock()
+ return nil
+}
+
+// Get an item from the cache. Returns the item or nil, and a bool indicating
+// whether the key was found.
+func (c *cache) Get(k string) (interface{}, bool) {
+ c.mu.RLock()
+ // "Inlining" of get and Expired
+ item, found := c.items[k]
+ if !found {
+ c.mu.RUnlock()
+ return nil, false
+ }
+ if item.Expiration > 0 {
+ if time.Now().UnixNano() > item.Expiration {
+ c.mu.RUnlock()
+ return nil, false
+ }
+ }
+ c.mu.RUnlock()
+ return item.Object, true
+}
+
+// GetWithExpiration returns an item and its expiration time from the cache.
+// It returns the item or nil, the expiration time if one is set (if the item
+// never expires a zero value for time.Time is returned), and a bool indicating
+// whether the key was found.
+func (c *cache) GetWithExpiration(k string) (interface{}, time.Time, bool) {
+ c.mu.RLock()
+ // "Inlining" of get and Expired
+ item, found := c.items[k]
+ if !found {
+ c.mu.RUnlock()
+ return nil, time.Time{}, false
+ }
+
+ if item.Expiration > 0 {
+ if time.Now().UnixNano() > item.Expiration {
+ c.mu.RUnlock()
+ return nil, time.Time{}, false
+ }
+
+ // Return the item and the expiration time
+ c.mu.RUnlock()
+ return item.Object, time.Unix(0, item.Expiration), true
+ }
+
+ // If expiration <= 0 (i.e. no expiration time set) then return the item
+ // and a zeroed time.Time
+ c.mu.RUnlock()
+ return item.Object, time.Time{}, true
+}
+
+func (c *cache) get(k string) (interface{}, bool) {
+ item, found := c.items[k]
+ if !found {
+ return nil, false
+ }
+ // "Inlining" of Expired
+ if item.Expiration > 0 {
+ if time.Now().UnixNano() > item.Expiration {
+ return nil, false
+ }
+ }
+ return item.Object, true
+}
+
+// Increment an item of type int, int8, int16, int32, int64, uintptr, uint,
+// uint8, uint32, or uint64, float32 or float64 by n. Returns an error if the
+// item's value is not an integer, if it was not found, or if it is not
+// possible to increment it by n. To retrieve the incremented value, use one
+// of the specialized methods, e.g. IncrementInt64.
+func (c *cache) Increment(k string, n int64) error {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return fmt.Errorf("Item %s not found", k)
+ }
+ switch v.Object.(type) {
+ case int:
+ v.Object = v.Object.(int) + int(n)
+ case int8:
+ v.Object = v.Object.(int8) + int8(n)
+ case int16:
+ v.Object = v.Object.(int16) + int16(n)
+ case int32:
+ v.Object = v.Object.(int32) + int32(n)
+ case int64:
+ v.Object = v.Object.(int64) + n
+ case uint:
+ v.Object = v.Object.(uint) + uint(n)
+ case uintptr:
+ v.Object = v.Object.(uintptr) + uintptr(n)
+ case uint8:
+ v.Object = v.Object.(uint8) + uint8(n)
+ case uint16:
+ v.Object = v.Object.(uint16) + uint16(n)
+ case uint32:
+ v.Object = v.Object.(uint32) + uint32(n)
+ case uint64:
+ v.Object = v.Object.(uint64) + uint64(n)
+ case float32:
+ v.Object = v.Object.(float32) + float32(n)
+ case float64:
+ v.Object = v.Object.(float64) + float64(n)
+ default:
+ c.mu.Unlock()
+ return fmt.Errorf("The value for %s is not an integer", k)
+ }
+ c.items[k] = v
+ c.mu.Unlock()
+ return nil
+}
+
+// Increment an item of type float32 or float64 by n. Returns an error if the
+// item's value is not floating point, if it was not found, or if it is not
+// possible to increment it by n. Pass a negative number to decrement the
+// value. To retrieve the incremented value, use one of the specialized methods,
+// e.g. IncrementFloat64.
+func (c *cache) IncrementFloat(k string, n float64) error {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return fmt.Errorf("Item %s not found", k)
+ }
+ switch v.Object.(type) {
+ case float32:
+ v.Object = v.Object.(float32) + float32(n)
+ case float64:
+ v.Object = v.Object.(float64) + n
+ default:
+ c.mu.Unlock()
+ return fmt.Errorf("The value for %s does not have type float32 or float64", k)
+ }
+ c.items[k] = v
+ c.mu.Unlock()
+ return nil
+}
+
+// Increment an item of type int by n. Returns an error if the item's value is
+// not an int, or if it was not found. If there is no error, the incremented
+// value is returned.
+func (c *cache) IncrementInt(k string, n int) (int, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(int)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an int", k)
+ }
+ nv := rv + n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Increment an item of type int8 by n. Returns an error if the item's value is
+// not an int8, or if it was not found. If there is no error, the incremented
+// value is returned.
+func (c *cache) IncrementInt8(k string, n int8) (int8, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(int8)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an int8", k)
+ }
+ nv := rv + n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Increment an item of type int16 by n. Returns an error if the item's value is
+// not an int16, or if it was not found. If there is no error, the incremented
+// value is returned.
+func (c *cache) IncrementInt16(k string, n int16) (int16, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(int16)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an int16", k)
+ }
+ nv := rv + n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Increment an item of type int32 by n. Returns an error if the item's value is
+// not an int32, or if it was not found. If there is no error, the incremented
+// value is returned.
+func (c *cache) IncrementInt32(k string, n int32) (int32, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(int32)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an int32", k)
+ }
+ nv := rv + n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Increment an item of type int64 by n. Returns an error if the item's value is
+// not an int64, or if it was not found. If there is no error, the incremented
+// value is returned.
+func (c *cache) IncrementInt64(k string, n int64) (int64, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(int64)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an int64", k)
+ }
+ nv := rv + n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Increment an item of type uint by n. Returns an error if the item's value is
+// not an uint, or if it was not found. If there is no error, the incremented
+// value is returned.
+func (c *cache) IncrementUint(k string, n uint) (uint, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(uint)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an uint", k)
+ }
+ nv := rv + n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Increment an item of type uintptr by n. Returns an error if the item's value
+// is not an uintptr, or if it was not found. If there is no error, the
+// incremented value is returned.
+func (c *cache) IncrementUintptr(k string, n uintptr) (uintptr, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(uintptr)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an uintptr", k)
+ }
+ nv := rv + n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Increment an item of type uint8 by n. Returns an error if the item's value
+// is not an uint8, or if it was not found. If there is no error, the
+// incremented value is returned.
+func (c *cache) IncrementUint8(k string, n uint8) (uint8, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(uint8)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an uint8", k)
+ }
+ nv := rv + n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Increment an item of type uint16 by n. Returns an error if the item's value
+// is not an uint16, or if it was not found. If there is no error, the
+// incremented value is returned.
+func (c *cache) IncrementUint16(k string, n uint16) (uint16, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(uint16)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an uint16", k)
+ }
+ nv := rv + n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Increment an item of type uint32 by n. Returns an error if the item's value
+// is not an uint32, or if it was not found. If there is no error, the
+// incremented value is returned.
+func (c *cache) IncrementUint32(k string, n uint32) (uint32, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(uint32)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an uint32", k)
+ }
+ nv := rv + n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Increment an item of type uint64 by n. Returns an error if the item's value
+// is not an uint64, or if it was not found. If there is no error, the
+// incremented value is returned.
+func (c *cache) IncrementUint64(k string, n uint64) (uint64, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(uint64)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an uint64", k)
+ }
+ nv := rv + n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Increment an item of type float32 by n. Returns an error if the item's value
+// is not an float32, or if it was not found. If there is no error, the
+// incremented value is returned.
+func (c *cache) IncrementFloat32(k string, n float32) (float32, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(float32)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an float32", k)
+ }
+ nv := rv + n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Increment an item of type float64 by n. Returns an error if the item's value
+// is not an float64, or if it was not found. If there is no error, the
+// incremented value is returned.
+func (c *cache) IncrementFloat64(k string, n float64) (float64, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(float64)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an float64", k)
+ }
+ nv := rv + n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Decrement an item of type int, int8, int16, int32, int64, uintptr, uint,
+// uint8, uint32, or uint64, float32 or float64 by n. Returns an error if the
+// item's value is not an integer, if it was not found, or if it is not
+// possible to decrement it by n. To retrieve the decremented value, use one
+// of the specialized methods, e.g. DecrementInt64.
+func (c *cache) Decrement(k string, n int64) error {
+ // TODO: Implement Increment and Decrement more cleanly.
+ // (Cannot do Increment(k, n*-1) for uints.)
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return fmt.Errorf("Item not found")
+ }
+ switch v.Object.(type) {
+ case int:
+ v.Object = v.Object.(int) - int(n)
+ case int8:
+ v.Object = v.Object.(int8) - int8(n)
+ case int16:
+ v.Object = v.Object.(int16) - int16(n)
+ case int32:
+ v.Object = v.Object.(int32) - int32(n)
+ case int64:
+ v.Object = v.Object.(int64) - n
+ case uint:
+ v.Object = v.Object.(uint) - uint(n)
+ case uintptr:
+ v.Object = v.Object.(uintptr) - uintptr(n)
+ case uint8:
+ v.Object = v.Object.(uint8) - uint8(n)
+ case uint16:
+ v.Object = v.Object.(uint16) - uint16(n)
+ case uint32:
+ v.Object = v.Object.(uint32) - uint32(n)
+ case uint64:
+ v.Object = v.Object.(uint64) - uint64(n)
+ case float32:
+ v.Object = v.Object.(float32) - float32(n)
+ case float64:
+ v.Object = v.Object.(float64) - float64(n)
+ default:
+ c.mu.Unlock()
+ return fmt.Errorf("The value for %s is not an integer", k)
+ }
+ c.items[k] = v
+ c.mu.Unlock()
+ return nil
+}
+
+// Decrement an item of type float32 or float64 by n. Returns an error if the
+// item's value is not floating point, if it was not found, or if it is not
+// possible to decrement it by n. Pass a negative number to decrement the
+// value. To retrieve the decremented value, use one of the specialized methods,
+// e.g. DecrementFloat64.
+func (c *cache) DecrementFloat(k string, n float64) error {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return fmt.Errorf("Item %s not found", k)
+ }
+ switch v.Object.(type) {
+ case float32:
+ v.Object = v.Object.(float32) - float32(n)
+ case float64:
+ v.Object = v.Object.(float64) - n
+ default:
+ c.mu.Unlock()
+ return fmt.Errorf("The value for %s does not have type float32 or float64", k)
+ }
+ c.items[k] = v
+ c.mu.Unlock()
+ return nil
+}
+
+// Decrement an item of type int by n. Returns an error if the item's value is
+// not an int, or if it was not found. If there is no error, the decremented
+// value is returned.
+func (c *cache) DecrementInt(k string, n int) (int, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(int)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an int", k)
+ }
+ nv := rv - n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Decrement an item of type int8 by n. Returns an error if the item's value is
+// not an int8, or if it was not found. If there is no error, the decremented
+// value is returned.
+func (c *cache) DecrementInt8(k string, n int8) (int8, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(int8)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an int8", k)
+ }
+ nv := rv - n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Decrement an item of type int16 by n. Returns an error if the item's value is
+// not an int16, or if it was not found. If there is no error, the decremented
+// value is returned.
+func (c *cache) DecrementInt16(k string, n int16) (int16, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(int16)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an int16", k)
+ }
+ nv := rv - n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Decrement an item of type int32 by n. Returns an error if the item's value is
+// not an int32, or if it was not found. If there is no error, the decremented
+// value is returned.
+func (c *cache) DecrementInt32(k string, n int32) (int32, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(int32)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an int32", k)
+ }
+ nv := rv - n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Decrement an item of type int64 by n. Returns an error if the item's value is
+// not an int64, or if it was not found. If there is no error, the decremented
+// value is returned.
+func (c *cache) DecrementInt64(k string, n int64) (int64, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(int64)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an int64", k)
+ }
+ nv := rv - n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Decrement an item of type uint by n. Returns an error if the item's value is
+// not an uint, or if it was not found. If there is no error, the decremented
+// value is returned.
+func (c *cache) DecrementUint(k string, n uint) (uint, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(uint)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an uint", k)
+ }
+ nv := rv - n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Decrement an item of type uintptr by n. Returns an error if the item's value
+// is not an uintptr, or if it was not found. If there is no error, the
+// decremented value is returned.
+func (c *cache) DecrementUintptr(k string, n uintptr) (uintptr, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(uintptr)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an uintptr", k)
+ }
+ nv := rv - n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Decrement an item of type uint8 by n. Returns an error if the item's value is
+// not an uint8, or if it was not found. If there is no error, the decremented
+// value is returned.
+func (c *cache) DecrementUint8(k string, n uint8) (uint8, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(uint8)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an uint8", k)
+ }
+ nv := rv - n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Decrement an item of type uint16 by n. Returns an error if the item's value
+// is not an uint16, or if it was not found. If there is no error, the
+// decremented value is returned.
+func (c *cache) DecrementUint16(k string, n uint16) (uint16, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(uint16)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an uint16", k)
+ }
+ nv := rv - n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Decrement an item of type uint32 by n. Returns an error if the item's value
+// is not an uint32, or if it was not found. If there is no error, the
+// decremented value is returned.
+func (c *cache) DecrementUint32(k string, n uint32) (uint32, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(uint32)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an uint32", k)
+ }
+ nv := rv - n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Decrement an item of type uint64 by n. Returns an error if the item's value
+// is not an uint64, or if it was not found. If there is no error, the
+// decremented value is returned.
+func (c *cache) DecrementUint64(k string, n uint64) (uint64, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(uint64)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an uint64", k)
+ }
+ nv := rv - n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Decrement an item of type float32 by n. Returns an error if the item's value
+// is not an float32, or if it was not found. If there is no error, the
+// decremented value is returned.
+func (c *cache) DecrementFloat32(k string, n float32) (float32, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(float32)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an float32", k)
+ }
+ nv := rv - n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Decrement an item of type float64 by n. Returns an error if the item's value
+// is not an float64, or if it was not found. If there is no error, the
+// decremented value is returned.
+func (c *cache) DecrementFloat64(k string, n float64) (float64, error) {
+ c.mu.Lock()
+ v, found := c.items[k]
+ if !found || v.Expired() {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("Item %s not found", k)
+ }
+ rv, ok := v.Object.(float64)
+ if !ok {
+ c.mu.Unlock()
+ return 0, fmt.Errorf("The value for %s is not an float64", k)
+ }
+ nv := rv - n
+ v.Object = nv
+ c.items[k] = v
+ c.mu.Unlock()
+ return nv, nil
+}
+
+// Delete an item from the cache. Does nothing if the key is not in the cache.
+func (c *cache) Delete(k string) {
+ c.mu.Lock()
+ v, evicted := c.delete(k)
+ c.mu.Unlock()
+ if evicted {
+ c.onEvicted(k, v)
+ }
+}
+
+func (c *cache) delete(k string) (interface{}, bool) {
+ if c.onEvicted != nil {
+ if v, found := c.items[k]; found {
+ delete(c.items, k)
+ return v.Object, true
+ }
+ }
+ delete(c.items, k)
+ return nil, false
+}
+
+type keyAndValue struct {
+ key string
+ value interface{}
+}
+
+// Delete all expired items from the cache.
+func (c *cache) DeleteExpired() {
+ var evictedItems []keyAndValue
+ now := time.Now().UnixNano()
+ c.mu.Lock()
+ for k, v := range c.items {
+ // "Inlining" of expired
+ if v.Expiration > 0 && now > v.Expiration {
+ ov, evicted := c.delete(k)
+ if evicted {
+ evictedItems = append(evictedItems, keyAndValue{k, ov})
+ }
+ }
+ }
+ c.mu.Unlock()
+ for _, v := range evictedItems {
+ c.onEvicted(v.key, v.value)
+ }
+}
+
+// Sets an (optional) function that is called with the key and value when an
+// item is evicted from the cache. (Including when it is deleted manually, but
+// not when it is overwritten.) Set to nil to disable.
+func (c *cache) OnEvicted(f func(string, interface{})) {
+ c.mu.Lock()
+ c.onEvicted = f
+ c.mu.Unlock()
+}
+
+// Write the cache's items (using Gob) to an io.Writer.
+//
+// NOTE: This method is deprecated in favor of c.Items() and NewFrom() (see the
+// documentation for NewFrom().)
+func (c *cache) Save(w io.Writer) (err error) {
+ enc := gob.NewEncoder(w)
+ defer func() {
+ if x := recover(); x != nil {
+ err = fmt.Errorf("Error registering item types with Gob library")
+ }
+ }()
+ c.mu.RLock()
+ defer c.mu.RUnlock()
+ for _, v := range c.items {
+ gob.Register(v.Object)
+ }
+ err = enc.Encode(&c.items)
+ return
+}
+
+// Save the cache's items to the given filename, creating the file if it
+// doesn't exist, and overwriting it if it does.
+//
+// NOTE: This method is deprecated in favor of c.Items() and NewFrom() (see the
+// documentation for NewFrom().)
+func (c *cache) SaveFile(fname string) error {
+ fp, err := os.Create(fname)
+ if err != nil {
+ return err
+ }
+ err = c.Save(fp)
+ if err != nil {
+ fp.Close()
+ return err
+ }
+ return fp.Close()
+}
+
+// Add (Gob-serialized) cache items from an io.Reader, excluding any items with
+// keys that already exist (and haven't expired) in the current cache.
+//
+// NOTE: This method is deprecated in favor of c.Items() and NewFrom() (see the
+// documentation for NewFrom().)
+func (c *cache) Load(r io.Reader) error {
+ dec := gob.NewDecoder(r)
+ items := map[string]Item{}
+ err := dec.Decode(&items)
+ if err == nil {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+ for k, v := range items {
+ ov, found := c.items[k]
+ if !found || ov.Expired() {
+ c.items[k] = v
+ }
+ }
+ }
+ return err
+}
+
+// Load and add cache items from the given filename, excluding any items with
+// keys that already exist in the current cache.
+//
+// NOTE: This method is deprecated in favor of c.Items() and NewFrom() (see the
+// documentation for NewFrom().)
+func (c *cache) LoadFile(fname string) error {
+ fp, err := os.Open(fname)
+ if err != nil {
+ return err
+ }
+ err = c.Load(fp)
+ if err != nil {
+ fp.Close()
+ return err
+ }
+ return fp.Close()
+}
+
+// Copies all unexpired items in the cache into a new map and returns it.
+func (c *cache) Items() map[string]Item {
+ c.mu.RLock()
+ defer c.mu.RUnlock()
+ m := make(map[string]Item, len(c.items))
+ now := time.Now().UnixNano()
+ for k, v := range c.items {
+ // "Inlining" of Expired
+ if v.Expiration > 0 {
+ if now > v.Expiration {
+ continue
+ }
+ }
+ m[k] = v
+ }
+ return m
+}
+
+// Returns the number of items in the cache. This may include items that have
+// expired, but have not yet been cleaned up.
+func (c *cache) ItemCount() int {
+ c.mu.RLock()
+ n := len(c.items)
+ c.mu.RUnlock()
+ return n
+}
+
+// Delete all items from the cache.
+func (c *cache) Flush() {
+ c.mu.Lock()
+ c.items = map[string]Item{}
+ c.mu.Unlock()
+}
+
+type janitor struct {
+ Interval time.Duration
+ stop chan bool
+}
+
+func (j *janitor) Run(c *cache) {
+ ticker := time.NewTicker(j.Interval)
+ for {
+ select {
+ case <-ticker.C:
+ c.DeleteExpired()
+ case <-j.stop:
+ ticker.Stop()
+ return
+ }
+ }
+}
+
+func stopJanitor(c *Cache) {
+ c.janitor.stop <- true
+}
+
+func runJanitor(c *cache, ci time.Duration) {
+ j := &janitor{
+ Interval: ci,
+ stop: make(chan bool),
+ }
+ c.janitor = j
+ go j.Run(c)
+}
+
+func newCache(de time.Duration, m map[string]Item) *cache {
+ if de == 0 {
+ de = -1
+ }
+ c := &cache{
+ defaultExpiration: de,
+ items: m,
+ }
+ return c
+}
+
+func newCacheWithJanitor(de time.Duration, ci time.Duration, m map[string]Item) *Cache {
+ c := newCache(de, m)
+ // This trick ensures that the janitor goroutine (which--granted it
+ // was enabled--is running DeleteExpired on c forever) does not keep
+ // the returned C object from being garbage collected. When it is
+ // garbage collected, the finalizer stops the janitor goroutine, after
+ // which c can be collected.
+ C := &Cache{c}
+ if ci > 0 {
+ runJanitor(c, ci)
+ runtime.SetFinalizer(C, stopJanitor)
+ }
+ return C
+}
+
+// Return a new cache with a given default expiration duration and cleanup
+// interval. If the expiration duration is less than one (or NoExpiration),
+// the items in the cache never expire (by default), and must be deleted
+// manually. If the cleanup interval is less than one, expired items are not
+// deleted from the cache before calling c.DeleteExpired().
+func New(defaultExpiration, cleanupInterval time.Duration) *Cache {
+ items := make(map[string]Item)
+ return newCacheWithJanitor(defaultExpiration, cleanupInterval, items)
+}
+
+// Return a new cache with a given default expiration duration and cleanup
+// interval. If the expiration duration is less than one (or NoExpiration),
+// the items in the cache never expire (by default), and must be deleted
+// manually. If the cleanup interval is less than one, expired items are not
+// deleted from the cache before calling c.DeleteExpired().
+//
+// NewFrom() also accepts an items map which will serve as the underlying map
+// for the cache. This is useful for starting from a deserialized cache
+// (serialized using e.g. gob.Encode() on c.Items()), or passing in e.g.
+// make(map[string]Item, 500) to improve startup performance when the cache
+// is expected to reach a certain minimum size.
+//
+// Only the cache's methods synchronize access to this map, so it is not
+// recommended to keep any references to the map around after creating a cache.
+// If need be, the map can be accessed at a later point using c.Items() (subject
+// to the same caveat.)
+//
+// Note regarding serialization: When using e.g. gob, make sure to
+// gob.Register() the individual types stored in the cache before encoding a
+// map retrieved with c.Items(), and to register those same types before
+// decoding a blob containing an items map.
+func NewFrom(defaultExpiration, cleanupInterval time.Duration, items map[string]Item) *Cache {
+ return newCacheWithJanitor(defaultExpiration, cleanupInterval, items)
+}
diff --git a/vendor/github.com/patrickmn/go-cache/sharded.go b/vendor/github.com/patrickmn/go-cache/sharded.go
new file mode 100644
index 000000000..bcc0538bc
--- /dev/null
+++ b/vendor/github.com/patrickmn/go-cache/sharded.go
@@ -0,0 +1,192 @@
+package cache
+
+import (
+ "crypto/rand"
+ "math"
+ "math/big"
+ insecurerand "math/rand"
+ "os"
+ "runtime"
+ "time"
+)
+
+// This is an experimental and unexported (for now) attempt at making a cache
+// with better algorithmic complexity than the standard one, namely by
+// preventing write locks of the entire cache when an item is added. As of the
+// time of writing, the overhead of selecting buckets results in cache
+// operations being about twice as slow as for the standard cache with small
+// total cache sizes, and faster for larger ones.
+//
+// See cache_test.go for a few benchmarks.
+
+type unexportedShardedCache struct {
+ *shardedCache
+}
+
+type shardedCache struct {
+ seed uint32
+ m uint32
+ cs []*cache
+ janitor *shardedJanitor
+}
+
+// djb2 with better shuffling. 5x faster than FNV with the hash.Hash overhead.
+func djb33(seed uint32, k string) uint32 {
+ var (
+ l = uint32(len(k))
+ d = 5381 + seed + l
+ i = uint32(0)
+ )
+ // Why is all this 5x faster than a for loop?
+ if l >= 4 {
+ for i < l-4 {
+ d = (d * 33) ^ uint32(k[i])
+ d = (d * 33) ^ uint32(k[i+1])
+ d = (d * 33) ^ uint32(k[i+2])
+ d = (d * 33) ^ uint32(k[i+3])
+ i += 4
+ }
+ }
+ switch l - i {
+ case 1:
+ case 2:
+ d = (d * 33) ^ uint32(k[i])
+ case 3:
+ d = (d * 33) ^ uint32(k[i])
+ d = (d * 33) ^ uint32(k[i+1])
+ case 4:
+ d = (d * 33) ^ uint32(k[i])
+ d = (d * 33) ^ uint32(k[i+1])
+ d = (d * 33) ^ uint32(k[i+2])
+ }
+ return d ^ (d >> 16)
+}
+
+func (sc *shardedCache) bucket(k string) *cache {
+ return sc.cs[djb33(sc.seed, k)%sc.m]
+}
+
+func (sc *shardedCache) Set(k string, x interface{}, d time.Duration) {
+ sc.bucket(k).Set(k, x, d)
+}
+
+func (sc *shardedCache) Add(k string, x interface{}, d time.Duration) error {
+ return sc.bucket(k).Add(k, x, d)
+}
+
+func (sc *shardedCache) Replace(k string, x interface{}, d time.Duration) error {
+ return sc.bucket(k).Replace(k, x, d)
+}
+
+func (sc *shardedCache) Get(k string) (interface{}, bool) {
+ return sc.bucket(k).Get(k)
+}
+
+func (sc *shardedCache) Increment(k string, n int64) error {
+ return sc.bucket(k).Increment(k, n)
+}
+
+func (sc *shardedCache) IncrementFloat(k string, n float64) error {
+ return sc.bucket(k).IncrementFloat(k, n)
+}
+
+func (sc *shardedCache) Decrement(k string, n int64) error {
+ return sc.bucket(k).Decrement(k, n)
+}
+
+func (sc *shardedCache) Delete(k string) {
+ sc.bucket(k).Delete(k)
+}
+
+func (sc *shardedCache) DeleteExpired() {
+ for _, v := range sc.cs {
+ v.DeleteExpired()
+ }
+}
+
+// Returns the items in the cache. This may include items that have expired,
+// but have not yet been cleaned up. If this is significant, the Expiration
+// fields of the items should be checked. Note that explicit synchronization
+// is needed to use a cache and its corresponding Items() return values at
+// the same time, as the maps are shared.
+func (sc *shardedCache) Items() []map[string]Item {
+ res := make([]map[string]Item, len(sc.cs))
+ for i, v := range sc.cs {
+ res[i] = v.Items()
+ }
+ return res
+}
+
+func (sc *shardedCache) Flush() {
+ for _, v := range sc.cs {
+ v.Flush()
+ }
+}
+
+type shardedJanitor struct {
+ Interval time.Duration
+ stop chan bool
+}
+
+func (j *shardedJanitor) Run(sc *shardedCache) {
+ j.stop = make(chan bool)
+ tick := time.Tick(j.Interval)
+ for {
+ select {
+ case <-tick:
+ sc.DeleteExpired()
+ case <-j.stop:
+ return
+ }
+ }
+}
+
+func stopShardedJanitor(sc *unexportedShardedCache) {
+ sc.janitor.stop <- true
+}
+
+func runShardedJanitor(sc *shardedCache, ci time.Duration) {
+ j := &shardedJanitor{
+ Interval: ci,
+ }
+ sc.janitor = j
+ go j.Run(sc)
+}
+
+func newShardedCache(n int, de time.Duration) *shardedCache {
+ max := big.NewInt(0).SetUint64(uint64(math.MaxUint32))
+ rnd, err := rand.Int(rand.Reader, max)
+ var seed uint32
+ if err != nil {
+ os.Stderr.Write([]byte("WARNING: go-cache's newShardedCache failed to read from the system CSPRNG (/dev/urandom or equivalent.) Your system's security may be compromised. Continuing with an insecure seed.\n"))
+ seed = insecurerand.Uint32()
+ } else {
+ seed = uint32(rnd.Uint64())
+ }
+ sc := &shardedCache{
+ seed: seed,
+ m: uint32(n),
+ cs: make([]*cache, n),
+ }
+ for i := 0; i < n; i++ {
+ c := &cache{
+ defaultExpiration: de,
+ items: map[string]Item{},
+ }
+ sc.cs[i] = c
+ }
+ return sc
+}
+
+func unexportedNewSharded(defaultExpiration, cleanupInterval time.Duration, shards int) *unexportedShardedCache {
+ if defaultExpiration == 0 {
+ defaultExpiration = -1
+ }
+ sc := newShardedCache(shards, defaultExpiration)
+ SC := &unexportedShardedCache{sc}
+ if cleanupInterval > 0 {
+ runShardedJanitor(sc, cleanupInterval)
+ runtime.SetFinalizer(SC, stopShardedJanitor)
+ }
+ return SC
+}
diff --git a/vendor/github.com/sahilm/fuzzy/.editorconfig b/vendor/github.com/sahilm/fuzzy/.editorconfig
new file mode 100644
index 000000000..8a8f6a579
--- /dev/null
+++ b/vendor/github.com/sahilm/fuzzy/.editorconfig
@@ -0,0 +1,18 @@
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+indent_style = space
+indent_size = 2
+
+[*.sh]
+indent_size = 4
+
+[Makefile]
+indent_style = tab
+indent_size = 4
+
+[*.go]
+indent_style = tab
+indent_size = 4
diff --git a/vendor/github.com/sahilm/fuzzy/.gitignore b/vendor/github.com/sahilm/fuzzy/.gitignore
new file mode 100644
index 000000000..d6c59ee86
--- /dev/null
+++ b/vendor/github.com/sahilm/fuzzy/.gitignore
@@ -0,0 +1,2 @@
+vendor/
+coverage/
diff --git a/vendor/github.com/sahilm/fuzzy/.travis.yml b/vendor/github.com/sahilm/fuzzy/.travis.yml
new file mode 100644
index 000000000..6756d8009
--- /dev/null
+++ b/vendor/github.com/sahilm/fuzzy/.travis.yml
@@ -0,0 +1,5 @@
+language: go
+go:
+ - 1.x
+script:
+ - make
diff --git a/vendor/github.com/sahilm/fuzzy/CONTRIBUTING.md b/vendor/github.com/sahilm/fuzzy/CONTRIBUTING.md
new file mode 100644
index 000000000..7068ce130
--- /dev/null
+++ b/vendor/github.com/sahilm/fuzzy/CONTRIBUTING.md
@@ -0,0 +1 @@
+Everyone is welcome to contribute. Please send me a pull request or file an issue. I promise to respond promptly.
diff --git a/vendor/github.com/sahilm/fuzzy/Gopkg.lock b/vendor/github.com/sahilm/fuzzy/Gopkg.lock
new file mode 100644
index 000000000..6e3a7fe54
--- /dev/null
+++ b/vendor/github.com/sahilm/fuzzy/Gopkg.lock
@@ -0,0 +1,20 @@
+# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
+
+
+[[projects]]
+ branch = "master"
+ digest = "1:ee97ec8a00b2424570c1ce53d7b410e96fbd4c241b29df134276ff6aa3750335"
+ name = "github.com/kylelemons/godebug"
+ packages = [
+ "diff",
+ "pretty",
+ ]
+ pruneopts = ""
+ revision = "d65d576e9348f5982d7f6d83682b694e731a45c6"
+
+[solve-meta]
+ analyzer-name = "dep"
+ analyzer-version = 1
+ input-imports = ["github.com/kylelemons/godebug/pretty"]
+ solver-name = "gps-cdcl"
+ solver-version = 1
diff --git a/vendor/github.com/sahilm/fuzzy/Gopkg.toml b/vendor/github.com/sahilm/fuzzy/Gopkg.toml
new file mode 100644
index 000000000..8f96b112e
--- /dev/null
+++ b/vendor/github.com/sahilm/fuzzy/Gopkg.toml
@@ -0,0 +1,4 @@
+# Test dependency
+[[constraint]]
+ branch = "master"
+ name = "github.com/kylelemons/godebug"
diff --git a/vendor/github.com/sahilm/fuzzy/LICENSE b/vendor/github.com/sahilm/fuzzy/LICENSE
new file mode 100644
index 000000000..f848719e6
--- /dev/null
+++ b/vendor/github.com/sahilm/fuzzy/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2017 Sahil Muthoo
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/sahilm/fuzzy/Makefile b/vendor/github.com/sahilm/fuzzy/Makefile
new file mode 100644
index 000000000..7fa2be4ec
--- /dev/null
+++ b/vendor/github.com/sahilm/fuzzy/Makefile
@@ -0,0 +1,57 @@
+.PHONY: all
+all: setup lint test
+
+.PHONY: test
+test: setup
+ go test -bench ./...
+
+.PHONY: cover
+cover: setup
+ mkdir -p coverage
+ gocov test ./... | gocov-html > coverage/coverage.html
+
+sources = $(shell find . -name '*.go' -not -path './vendor/*')
+.PHONY: goimports
+goimports: setup
+ goimports -w $(sources)
+
+.PHONY: lint
+lint: setup
+ gometalinter ./... --enable=goimports --disable=gocyclo --vendor -t
+
+.PHONY: install
+install: setup
+ go install
+
+BIN_DIR := $(GOPATH)/bin
+GOIMPORTS := $(BIN_DIR)/goimports
+GOMETALINTER := $(BIN_DIR)/gometalinter
+DEP := $(BIN_DIR)/dep
+GOCOV := $(BIN_DIR)/gocov
+GOCOV_HTML := $(BIN_DIR)/gocov-html
+
+$(GOIMPORTS):
+ go get -u golang.org/x/tools/cmd/goimports
+
+$(GOMETALINTER):
+ go get -u github.com/alecthomas/gometalinter
+ gometalinter --install &> /dev/null
+
+$(GOCOV):
+ go get -u github.com/axw/gocov/gocov
+
+$(GOCOV_HTML):
+ go get -u gopkg.in/matm/v1/gocov-html
+
+$(DEP):
+ go get -u github.com/golang/dep/cmd/dep
+
+tools: $(GOIMPORTS) $(GOMETALINTER) $(GOCOV) $(GOCOV_HTML) $(DEP)
+
+vendor: $(DEP)
+ dep ensure
+
+setup: tools vendor
+
+updatedeps:
+ dep ensure -update
diff --git a/vendor/github.com/sahilm/fuzzy/README.md b/vendor/github.com/sahilm/fuzzy/README.md
new file mode 100644
index 000000000..c632da5d9
--- /dev/null
+++ b/vendor/github.com/sahilm/fuzzy/README.md
@@ -0,0 +1,184 @@
+
+
+# fuzzy
+[![Build Status](https://travis-ci.org/sahilm/fuzzy.svg?branch=master)](https://travis-ci.org/sahilm/fuzzy)
+[![Documentation](https://godoc.org/github.com/sahilm/fuzzy?status.svg)](https://godoc.org/github.com/sahilm/fuzzy)
+
+Go library that provides fuzzy string matching optimized for filenames and code symbols in the style of Sublime Text,
+VSCode, IntelliJ IDEA et al. This library is external dependency-free. It only depends on the Go standard library.
+
+## Features
+
+- Intuitive matching. Results are returned in descending order of match quality. Quality is determined by:
+ - The first character in the pattern matches the first character in the match string.
+ - The matched character is camel cased.
+ - The matched character follows a separator such as an underscore character.
+ - The matched character is adjacent to a previous match.
+
+- Speed. Matches are returned in milliseconds. It's perfect for interactive search boxes.
+
+- The positions of matches is returned. Allows you to highlight matching characters.
+
+- Unicode aware.
+
+## Demo
+
+Here is a [demo](_example/main.go) of matching various patterns against ~16K files from the Unreal Engine 4 codebase.
+
+![demo](assets/demo.gif)
+
+You can run the demo yourself like so:
+
+```
+cd _example/
+go get github.com/jroimartin/gocui
+go run main.go
+```
+
+## Usage
+
+The following example prints out matches with the matched chars in bold.
+
+```go
+package main
+
+import (
+ "fmt"
+
+ "github.com/sahilm/fuzzy"
+)
+
+func main() {
+ const bold = "\033[1m%s\033[0m"
+ pattern := "mnr"
+ data := []string{"game.cpp", "moduleNameResolver.ts", "my name is_Ramsey"}
+
+ matches := fuzzy.Find(pattern, data)
+
+ for _, match := range matches {
+ for i := 0; i < len(match.Str); i++ {
+ if contains(i, match.MatchedIndexes) {
+ fmt.Print(fmt.Sprintf(bold, string(match.Str[i])))
+ } else {
+ fmt.Print(string(match.Str[i]))
+ }
+ }
+ fmt.Println()
+ }
+}
+
+func contains(needle int, haystack []int) bool {
+ for _, i := range haystack {
+ if needle == i {
+ return true
+ }
+ }
+ return false
+}
+```
+If the data you want to match isn't a slice of strings, you can use `FindFromSource` by implementing
+the provided `Source` interface. Here's an example:
+
+```go
+package main
+
+import (
+ "fmt"
+
+ "github.com/sahilm/fuzzy"
+)
+
+type employee struct {
+ name string
+ age int
+}
+
+type employees []employee
+
+func (e employees) String(i int) string {
+ return e[i].name
+}
+
+func (e employees) Len() int {
+ return len(e)
+}
+
+func main() {
+ emps := employees{
+ {
+ name: "Alice",
+ age: 45,
+ },
+ {
+ name: "Bob",
+ age: 35,
+ },
+ {
+ name: "Allie",
+ age: 35,
+ },
+ }
+ results := fuzzy.FindFrom("al", emps)
+ fmt.Println(results)
+}
+```
+
+Check out the [godoc](https://godoc.org/github.com/sahilm/fuzzy) for detailed documentation.
+
+## Installation
+
+`go get github.com/sahilm/fuzzy` or use your favorite dependency management tool.
+
+## Speed
+
+Here are a few benchmark results on a normal laptop.
+
+```
+BenchmarkFind/with_unreal_4_(~16K_files)-4 100 12915315 ns/op
+BenchmarkFind/with_linux_kernel_(~60K_files)-4 50 30885038 ns/op
+```
+
+Matching a pattern against ~60K files from the Linux kernel takes about 30ms.
+
+## Contributing
+
+Everyone is welcome to contribute. Please send me a pull request or file an issue. I promise
+to respond promptly.
+
+## Credits
+
+* [@ericpauley](https://github.com/ericpauley) & [@lunixbochs](https://github.com/lunixbochs) contributed Unicode awareness and various performance optimisations.
+
+* The algorithm is based of the awesome work of [forrestthewoods](https://github.com/forrestthewoods/lib_fts/blob/master/code/fts_fuzzy_match.js).
+See [this](https://blog.forrestthewoods.com/reverse-engineering-sublime-text-s-fuzzy-match-4cffeed33fdb#.d05n81yjy)
+blog post for details of the algorithm.
+
+* The artwork is by my lovely wife Sanah. It's based on the Go Gopher.
+
+* The Go gopher was designed by Renee French (http://reneefrench.blogspot.com/).
+The design is licensed under the Creative Commons 3.0 Attributions license.
+
+## License
+
+The MIT License (MIT)
+
+Copyright (c) 2017 Sahil Muthoo
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/vendor/github.com/sahilm/fuzzy/fuzzy.go b/vendor/github.com/sahilm/fuzzy/fuzzy.go
new file mode 100644
index 000000000..bd66ee66c
--- /dev/null
+++ b/vendor/github.com/sahilm/fuzzy/fuzzy.go
@@ -0,0 +1,235 @@
+/*
+Package fuzzy provides fuzzy string matching optimized
+for filenames and code symbols in the style of Sublime Text,
+VSCode, IntelliJ IDEA et al.
+*/
+package fuzzy
+
+import (
+ "sort"
+ "unicode"
+ "unicode/utf8"
+)
+
+// Match represents a matched string.
+type Match struct {
+ // The matched string.
+ Str string
+ // The index of the matched string in the supplied slice.
+ Index int
+ // The indexes of matched characters. Useful for highlighting matches.
+ MatchedIndexes []int
+ // Score used to rank matches
+ Score int
+}
+
+const (
+ firstCharMatchBonus = 10
+ matchFollowingSeparatorBonus = 20
+ camelCaseMatchBonus = 20
+ adjacentMatchBonus = 5
+ unmatchedLeadingCharPenalty = -5
+ maxUnmatchedLeadingCharPenalty = -15
+)
+
+var separators = []rune("/-_ .\\")
+
+// Matches is a slice of Match structs
+type Matches []Match
+
+func (a Matches) Len() int { return len(a) }
+func (a Matches) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
+func (a Matches) Less(i, j int) bool { return a[i].Score >= a[j].Score }
+
+// Source represents an abstract source of a list of strings. Source must be iterable type such as a slice.
+// The source will be iterated over till Len() with String(i) being called for each element where i is the
+// index of the element. You can find a working example in the README.
+type Source interface {
+ // The string to be matched at position i.
+ String(i int) string
+ // The length of the source. Typically is the length of the slice of things that you want to match.
+ Len() int
+}
+
+type stringSource []string
+
+func (ss stringSource) String(i int) string {
+ return ss[i]
+}
+
+func (ss stringSource) Len() int { return len(ss) }
+
+/*
+Find looks up pattern in data and returns matches
+in descending order of match quality. Match quality
+is determined by a set of bonus and penalty rules.
+
+The following types of matches apply a bonus:
+
+* The first character in the pattern matches the first character in the match string.
+
+* The matched character is camel cased.
+
+* The matched character follows a separator such as an underscore character.
+
+* The matched character is adjacent to a previous match.
+
+Penalties are applied for every character in the search string that wasn't matched and all leading
+characters upto the first match.
+*/
+func Find(pattern string, data []string) Matches {
+ return FindFrom(pattern, stringSource(data))
+}
+
+/*
+FindFrom is an alternative implementation of Find using a Source
+instead of a list of strings.
+*/
+func FindFrom(pattern string, data Source) Matches {
+ if len(pattern) == 0 {
+ return nil
+ }
+ runes := []rune(pattern)
+ var matches Matches
+ var matchedIndexes []int
+ for i := 0; i < data.Len(); i++ {
+ var match Match
+ match.Str = data.String(i)
+ match.Index = i
+ if matchedIndexes != nil {
+ match.MatchedIndexes = matchedIndexes
+ } else {
+ match.MatchedIndexes = make([]int, 0, len(runes))
+ }
+ var score int
+ patternIndex := 0
+ bestScore := -1
+ matchedIndex := -1
+ currAdjacentMatchBonus := 0
+ var last rune
+ var lastIndex int
+ nextc, nextSize := utf8.DecodeRuneInString(data.String(i))
+ var candidate rune
+ var candidateSize int
+ for j := 0; j < len(data.String(i)); j += candidateSize {
+ candidate, candidateSize = nextc, nextSize
+ if equalFold(candidate, runes[patternIndex]) {
+ score = 0
+ if j == 0 {
+ score += firstCharMatchBonus
+ }
+ if unicode.IsLower(last) && unicode.IsUpper(candidate) {
+ score += camelCaseMatchBonus
+ }
+ if j != 0 && isSeparator(last) {
+ score += matchFollowingSeparatorBonus
+ }
+ if len(match.MatchedIndexes) > 0 {
+ lastMatch := match.MatchedIndexes[len(match.MatchedIndexes)-1]
+ bonus := adjacentCharBonus(lastIndex, lastMatch, currAdjacentMatchBonus)
+ score += bonus
+ // adjacent matches are incremental and keep increasing based on previous adjacent matches
+ // thus we need to maintain the current match bonus
+ currAdjacentMatchBonus += bonus
+ }
+ if score > bestScore {
+ bestScore = score
+ matchedIndex = j
+ }
+ }
+ var nextp rune
+ if patternIndex < len(runes)-1 {
+ nextp = runes[patternIndex+1]
+ }
+ if j+candidateSize < len(data.String(i)) {
+ if data.String(i)[j+candidateSize] < utf8.RuneSelf { // Fast path for ASCII
+ nextc, nextSize = rune(data.String(i)[j+candidateSize]), 1
+ } else {
+ nextc, nextSize = utf8.DecodeRuneInString(data.String(i)[j+candidateSize:])
+ }
+ } else {
+ nextc, nextSize = 0, 0
+ }
+ // We apply the best score when we have the next match coming up or when the search string has ended.
+ // Tracking when the next match is coming up allows us to exhaustively find the best match and not necessarily
+ // the first match.
+ // For example given the pattern "tk" and search string "The Black Knight", exhaustively matching allows us
+ // to match the second k thus giving this string a higher score.
+ if equalFold(nextp, nextc) || nextc == 0 {
+ if matchedIndex > -1 {
+ if len(match.MatchedIndexes) == 0 {
+ penalty := matchedIndex * unmatchedLeadingCharPenalty
+ bestScore += max(penalty, maxUnmatchedLeadingCharPenalty)
+ }
+ match.Score += bestScore
+ match.MatchedIndexes = append(match.MatchedIndexes, matchedIndex)
+ score = 0
+ bestScore = -1
+ patternIndex++
+ }
+ }
+ lastIndex = j
+ last = candidate
+ }
+ // apply penalty for each unmatched character
+ penalty := len(match.MatchedIndexes) - len(data.String(i))
+ match.Score += penalty
+ if len(match.MatchedIndexes) == len(runes) {
+ matches = append(matches, match)
+ matchedIndexes = nil
+ } else {
+ matchedIndexes = match.MatchedIndexes[:0] // Recycle match index slice
+ }
+ }
+ sort.Stable(matches)
+ return matches
+}
+
+// Taken from strings.EqualFold
+func equalFold(tr, sr rune) bool {
+ if tr == sr {
+ return true
+ }
+ if tr < sr {
+ tr, sr = sr, tr
+ }
+ // Fast check for ASCII.
+ if tr < utf8.RuneSelf {
+ // ASCII, and sr is upper case. tr must be lower case.
+ if 'A' <= sr && sr <= 'Z' && tr == sr+'a'-'A' {
+ return true
+ }
+ return false
+ }
+
+ // General case. SimpleFold(x) returns the next equivalent rune > x
+ // or wraps around to smaller values.
+ r := unicode.SimpleFold(sr)
+ for r != sr && r < tr {
+ r = unicode.SimpleFold(r)
+ }
+ return r == tr
+}
+
+func adjacentCharBonus(i int, lastMatch int, currentBonus int) int {
+ if lastMatch == i {
+ return currentBonus*2 + adjacentMatchBonus
+ }
+ return 0
+}
+
+func isSeparator(s rune) bool {
+ for _, sep := range separators {
+ if s == sep {
+ return true
+ }
+ }
+ return false
+}
+
+func max(x int, y int) int {
+ if x > y {
+ return x
+ }
+ return y
+}
diff --git a/vendor/go.uber.org/multierr/CHANGELOG.md b/vendor/go.uber.org/multierr/CHANGELOG.md
index d2c8aadaf..f8177b978 100644
--- a/vendor/go.uber.org/multierr/CHANGELOG.md
+++ b/vendor/go.uber.org/multierr/CHANGELOG.md
@@ -1,6 +1,21 @@
Releases
========
+v1.11.0 (2023-03-28)
+====================
+- `Errors` now supports any error that implements multiple-error
+ interface.
+- Add `Every` function to allow checking if all errors in the chain
+ satisfies `errors.Is` against the target error.
+
+v1.10.0 (2023-03-08)
+====================
+
+- Comply with Go 1.20's multiple-error interface.
+- Drop Go 1.18 support.
+ Per the support policy, only Go 1.19 and 1.20 are supported now.
+- Drop all non-test external dependencies.
+
v1.9.0 (2022-12-12)
===================
diff --git a/vendor/go.uber.org/multierr/README.md b/vendor/go.uber.org/multierr/README.md
index 70aacecd7..5ab6ac40f 100644
--- a/vendor/go.uber.org/multierr/README.md
+++ b/vendor/go.uber.org/multierr/README.md
@@ -2,9 +2,29 @@
`multierr` allows combining one or more Go `error`s together.
+## Features
+
+- **Idiomatic**:
+ multierr follows best practices in Go, and keeps your code idiomatic.
+ - It keeps the underlying error type hidden,
+ allowing you to deal in `error` values exclusively.
+ - It provides APIs to safely append into an error from a `defer` statement.
+- **Performant**:
+ multierr is optimized for performance:
+ - It avoids allocations where possible.
+ - It utilizes slice resizing semantics to optimize common cases
+ like appending into the same error object from a loop.
+- **Interoperable**:
+ multierr interoperates with the Go standard library's error APIs seamlessly:
+ - The `errors.Is` and `errors.As` functions *just work*.
+- **Lightweight**:
+ multierr comes with virtually no dependencies.
+
## Installation
- go get -u go.uber.org/multierr
+```bash
+go get -u go.uber.org/multierr@latest
+```
## Status
diff --git a/vendor/go.uber.org/multierr/error.go b/vendor/go.uber.org/multierr/error.go
index cdd91ae56..3a828b2df 100644
--- a/vendor/go.uber.org/multierr/error.go
+++ b/vendor/go.uber.org/multierr/error.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2017-2021 Uber Technologies, Inc.
+// Copyright (c) 2017-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -147,8 +147,7 @@ import (
"io"
"strings"
"sync"
-
- "go.uber.org/atomic"
+ "sync/atomic"
)
var (
@@ -196,23 +195,7 @@ type errorGroup interface {
//
// Callers of this function are free to modify the returned slice.
func Errors(err error) []error {
- if err == nil {
- return nil
- }
-
- // Note that we're casting to multiError, not errorGroup. Our contract is
- // that returned errors MAY implement errorGroup. Errors, however, only
- // has special behavior for multierr-specific error objects.
- //
- // This behavior can be expanded in the future but I think it's prudent to
- // start with as little as possible in terms of contract and possibility
- // of misuse.
- eg, ok := err.(*multiError)
- if !ok {
- return []error{err}
- }
-
- return append(([]error)(nil), eg.Errors()...)
+ return extractErrors(err)
}
// multiError is an error that holds one or more errors.
@@ -227,8 +210,6 @@ type multiError struct {
errors []error
}
-var _ errorGroup = (*multiError)(nil)
-
// Errors returns the list of underlying errors.
//
// This slice MUST NOT be modified.
@@ -239,33 +220,6 @@ func (merr *multiError) Errors() []error {
return merr.errors
}
-// As attempts to find the first error in the error list that matches the type
-// of the value that target points to.
-//
-// This function allows errors.As to traverse the values stored on the
-// multierr error.
-func (merr *multiError) As(target interface{}) bool {
- for _, err := range merr.Errors() {
- if errors.As(err, target) {
- return true
- }
- }
- return false
-}
-
-// Is attempts to match the provided error against errors in the error list.
-//
-// This function allows errors.Is to traverse the values stored on the
-// multierr error.
-func (merr *multiError) Is(target error) bool {
- for _, err := range merr.Errors() {
- if errors.Is(err, target) {
- return true
- }
- }
- return false
-}
-
func (merr *multiError) Error() string {
if merr == nil {
return ""
@@ -281,6 +235,17 @@ func (merr *multiError) Error() string {
return result
}
+// Every compares every error in the given err against the given target error
+// using [errors.Is], and returns true only if every comparison returned true.
+func Every(err error, target error) bool {
+ for _, e := range extractErrors(err) {
+ if !errors.Is(e, target) {
+ return false
+ }
+ }
+ return true
+}
+
func (merr *multiError) Format(f fmt.State, c rune) {
if c == 'v' && f.Flag('+') {
merr.writeMultiline(f)
diff --git a/vendor/go.uber.org/multierr/error_post_go120.go b/vendor/go.uber.org/multierr/error_post_go120.go
new file mode 100644
index 000000000..a173f9c25
--- /dev/null
+++ b/vendor/go.uber.org/multierr/error_post_go120.go
@@ -0,0 +1,48 @@
+// Copyright (c) 2017-2023 Uber Technologies, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+//go:build go1.20
+// +build go1.20
+
+package multierr
+
+// Unwrap returns a list of errors wrapped by this multierr.
+func (merr *multiError) Unwrap() []error {
+ return merr.Errors()
+}
+
+type multipleErrors interface {
+ Unwrap() []error
+}
+
+func extractErrors(err error) []error {
+ if err == nil {
+ return nil
+ }
+
+ // check if the given err is an Unwrapable error that
+ // implements multipleErrors interface.
+ eg, ok := err.(multipleErrors)
+ if !ok {
+ return []error{err}
+ }
+
+ return append(([]error)(nil), eg.Unwrap()...)
+}
diff --git a/vendor/go.uber.org/multierr/error_pre_go120.go b/vendor/go.uber.org/multierr/error_pre_go120.go
new file mode 100644
index 000000000..93872a3fc
--- /dev/null
+++ b/vendor/go.uber.org/multierr/error_pre_go120.go
@@ -0,0 +1,79 @@
+// Copyright (c) 2017-2023 Uber Technologies, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+//go:build !go1.20
+// +build !go1.20
+
+package multierr
+
+import "errors"
+
+// Versions of Go before 1.20 did not support the Unwrap() []error method.
+// This provides a similar behavior by implementing the Is(..) and As(..)
+// methods.
+// See the errors.Join proposal for details:
+// https://github.com/golang/go/issues/53435
+
+// As attempts to find the first error in the error list that matches the type
+// of the value that target points to.
+//
+// This function allows errors.As to traverse the values stored on the
+// multierr error.
+func (merr *multiError) As(target interface{}) bool {
+ for _, err := range merr.Errors() {
+ if errors.As(err, target) {
+ return true
+ }
+ }
+ return false
+}
+
+// Is attempts to match the provided error against errors in the error list.
+//
+// This function allows errors.Is to traverse the values stored on the
+// multierr error.
+func (merr *multiError) Is(target error) bool {
+ for _, err := range merr.Errors() {
+ if errors.Is(err, target) {
+ return true
+ }
+ }
+ return false
+}
+
+func extractErrors(err error) []error {
+ if err == nil {
+ return nil
+ }
+
+ // Note that we're casting to multiError, not errorGroup. Our contract is
+ // that returned errors MAY implement errorGroup. Errors, however, only
+ // has special behavior for multierr-specific error objects.
+ //
+ // This behavior can be expanded in the future but I think it's prudent to
+ // start with as little as possible in terms of contract and possibility
+ // of misuse.
+ eg, ok := err.(*multiError)
+ if !ok {
+ return []error{err}
+ }
+
+ return append(([]error)(nil), eg.Errors()...)
+}
diff --git a/vendor/go.uber.org/multierr/glide.yaml b/vendor/go.uber.org/multierr/glide.yaml
deleted file mode 100644
index 6ef084ec2..000000000
--- a/vendor/go.uber.org/multierr/glide.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-package: go.uber.org/multierr
-import:
-- package: go.uber.org/atomic
- version: ^1
-testImport:
-- package: github.com/stretchr/testify
- subpackages:
- - assert
diff --git a/vendor/golang.org/x/crypto/blowfish/cipher.go b/vendor/golang.org/x/crypto/blowfish/cipher.go
index 213bf204a..089895680 100644
--- a/vendor/golang.org/x/crypto/blowfish/cipher.go
+++ b/vendor/golang.org/x/crypto/blowfish/cipher.go
@@ -11,7 +11,7 @@
// Deprecated: any new system should use AES (from crypto/aes, if necessary in
// an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from
// golang.org/x/crypto/chacha20poly1305).
-package blowfish // import "golang.org/x/crypto/blowfish"
+package blowfish
// The code is a port of Bruce Schneier's C implementation.
// See https://www.schneier.com/blowfish.html.
diff --git a/vendor/golang.org/x/crypto/cast5/cast5.go b/vendor/golang.org/x/crypto/cast5/cast5.go
index 425e8eecb..016e90215 100644
--- a/vendor/golang.org/x/crypto/cast5/cast5.go
+++ b/vendor/golang.org/x/crypto/cast5/cast5.go
@@ -11,7 +11,7 @@
// Deprecated: any new system should use AES (from crypto/aes, if necessary in
// an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from
// golang.org/x/crypto/chacha20poly1305).
-package cast5 // import "golang.org/x/crypto/cast5"
+package cast5
import (
"errors"
diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519.go b/vendor/golang.org/x/crypto/curve25519/curve25519.go
index 00f963ea2..21ca3b2ee 100644
--- a/vendor/golang.org/x/crypto/curve25519/curve25519.go
+++ b/vendor/golang.org/x/crypto/curve25519/curve25519.go
@@ -6,9 +6,11 @@
// performs scalar multiplication on the elliptic curve known as Curve25519.
// See RFC 7748.
//
-// Starting in Go 1.20, this package is a wrapper for the X25519 implementation
+// This package is a wrapper for the X25519 implementation
// in the crypto/ecdh package.
-package curve25519 // import "golang.org/x/crypto/curve25519"
+package curve25519
+
+import "crypto/ecdh"
// ScalarMult sets dst to the product scalar * point.
//
@@ -16,7 +18,13 @@ package curve25519 // import "golang.org/x/crypto/curve25519"
// zeroes, irrespective of the scalar. Instead, use the X25519 function, which
// will return an error.
func ScalarMult(dst, scalar, point *[32]byte) {
- scalarMult(dst, scalar, point)
+ if _, err := x25519(dst, scalar[:], point[:]); err != nil {
+ // The only error condition for x25519 when the inputs are 32 bytes long
+ // is if the output would have been the all-zero value.
+ for i := range dst {
+ dst[i] = 0
+ }
+ }
}
// ScalarBaseMult sets dst to the product scalar * base where base is the
@@ -25,7 +33,12 @@ func ScalarMult(dst, scalar, point *[32]byte) {
// It is recommended to use the X25519 function with Basepoint instead, as
// copying into fixed size arrays can lead to unexpected bugs.
func ScalarBaseMult(dst, scalar *[32]byte) {
- scalarBaseMult(dst, scalar)
+ curve := ecdh.X25519()
+ priv, err := curve.NewPrivateKey(scalar[:])
+ if err != nil {
+ panic("curve25519: internal error: scalarBaseMult was not 32 bytes")
+ }
+ copy(dst[:], priv.PublicKey().Bytes())
}
const (
@@ -57,3 +70,21 @@ func X25519(scalar, point []byte) ([]byte, error) {
var dst [32]byte
return x25519(&dst, scalar, point)
}
+
+func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) {
+ curve := ecdh.X25519()
+ pub, err := curve.NewPublicKey(point)
+ if err != nil {
+ return nil, err
+ }
+ priv, err := curve.NewPrivateKey(scalar)
+ if err != nil {
+ return nil, err
+ }
+ out, err := priv.ECDH(pub)
+ if err != nil {
+ return nil, err
+ }
+ copy(dst[:], out)
+ return dst[:], nil
+}
diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go b/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go
deleted file mode 100644
index ba647e8d7..000000000
--- a/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build !go1.20
-
-package curve25519
-
-import (
- "crypto/subtle"
- "errors"
- "strconv"
-
- "golang.org/x/crypto/curve25519/internal/field"
-)
-
-func scalarMult(dst, scalar, point *[32]byte) {
- var e [32]byte
-
- copy(e[:], scalar[:])
- e[0] &= 248
- e[31] &= 127
- e[31] |= 64
-
- var x1, x2, z2, x3, z3, tmp0, tmp1 field.Element
- x1.SetBytes(point[:])
- x2.One()
- x3.Set(&x1)
- z3.One()
-
- swap := 0
- for pos := 254; pos >= 0; pos-- {
- b := e[pos/8] >> uint(pos&7)
- b &= 1
- swap ^= int(b)
- x2.Swap(&x3, swap)
- z2.Swap(&z3, swap)
- swap = int(b)
-
- tmp0.Subtract(&x3, &z3)
- tmp1.Subtract(&x2, &z2)
- x2.Add(&x2, &z2)
- z2.Add(&x3, &z3)
- z3.Multiply(&tmp0, &x2)
- z2.Multiply(&z2, &tmp1)
- tmp0.Square(&tmp1)
- tmp1.Square(&x2)
- x3.Add(&z3, &z2)
- z2.Subtract(&z3, &z2)
- x2.Multiply(&tmp1, &tmp0)
- tmp1.Subtract(&tmp1, &tmp0)
- z2.Square(&z2)
-
- z3.Mult32(&tmp1, 121666)
- x3.Square(&x3)
- tmp0.Add(&tmp0, &z3)
- z3.Multiply(&x1, &z2)
- z2.Multiply(&tmp1, &tmp0)
- }
-
- x2.Swap(&x3, swap)
- z2.Swap(&z3, swap)
-
- z2.Invert(&z2)
- x2.Multiply(&x2, &z2)
- copy(dst[:], x2.Bytes())
-}
-
-func scalarBaseMult(dst, scalar *[32]byte) {
- checkBasepoint()
- scalarMult(dst, scalar, &basePoint)
-}
-
-func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) {
- var in [32]byte
- if l := len(scalar); l != 32 {
- return nil, errors.New("bad scalar length: " + strconv.Itoa(l) + ", expected 32")
- }
- if l := len(point); l != 32 {
- return nil, errors.New("bad point length: " + strconv.Itoa(l) + ", expected 32")
- }
- copy(in[:], scalar)
- if &point[0] == &Basepoint[0] {
- scalarBaseMult(dst, &in)
- } else {
- var base, zero [32]byte
- copy(base[:], point)
- scalarMult(dst, &in, &base)
- if subtle.ConstantTimeCompare(dst[:], zero[:]) == 1 {
- return nil, errors.New("bad input point: low order point")
- }
- }
- return dst[:], nil
-}
-
-func checkBasepoint() {
- if subtle.ConstantTimeCompare(Basepoint, []byte{
- 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- }) != 1 {
- panic("curve25519: global Basepoint value was modified")
- }
-}
diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go b/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go
deleted file mode 100644
index 627df4972..000000000
--- a/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2022 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build go1.20
-
-package curve25519
-
-import "crypto/ecdh"
-
-func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) {
- curve := ecdh.X25519()
- pub, err := curve.NewPublicKey(point)
- if err != nil {
- return nil, err
- }
- priv, err := curve.NewPrivateKey(scalar)
- if err != nil {
- return nil, err
- }
- out, err := priv.ECDH(pub)
- if err != nil {
- return nil, err
- }
- copy(dst[:], out)
- return dst[:], nil
-}
-
-func scalarMult(dst, scalar, point *[32]byte) {
- if _, err := x25519(dst, scalar[:], point[:]); err != nil {
- // The only error condition for x25519 when the inputs are 32 bytes long
- // is if the output would have been the all-zero value.
- for i := range dst {
- dst[i] = 0
- }
- }
-}
-
-func scalarBaseMult(dst, scalar *[32]byte) {
- curve := ecdh.X25519()
- priv, err := curve.NewPrivateKey(scalar[:])
- if err != nil {
- panic("curve25519: internal error: scalarBaseMult was not 32 bytes")
- }
- copy(dst[:], priv.PublicKey().Bytes())
-}
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/README b/vendor/golang.org/x/crypto/curve25519/internal/field/README
deleted file mode 100644
index e25bca7dc..000000000
--- a/vendor/golang.org/x/crypto/curve25519/internal/field/README
+++ /dev/null
@@ -1,7 +0,0 @@
-This package is kept in sync with crypto/ed25519/internal/edwards25519/field in
-the standard library.
-
-If there are any changes in the standard library that need to be synced to this
-package, run sync.sh. It will not overwrite any local changes made since the
-previous sync, so it's ok to land changes in this package first, and then sync
-to the standard library later.
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go
deleted file mode 100644
index ca841ad99..000000000
--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go
+++ /dev/null
@@ -1,416 +0,0 @@
-// Copyright (c) 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package field implements fast arithmetic modulo 2^255-19.
-package field
-
-import (
- "crypto/subtle"
- "encoding/binary"
- "math/bits"
-)
-
-// Element represents an element of the field GF(2^255-19). Note that this
-// is not a cryptographically secure group, and should only be used to interact
-// with edwards25519.Point coordinates.
-//
-// This type works similarly to math/big.Int, and all arguments and receivers
-// are allowed to alias.
-//
-// The zero value is a valid zero element.
-type Element struct {
- // An element t represents the integer
- // t.l0 + t.l1*2^51 + t.l2*2^102 + t.l3*2^153 + t.l4*2^204
- //
- // Between operations, all limbs are expected to be lower than 2^52.
- l0 uint64
- l1 uint64
- l2 uint64
- l3 uint64
- l4 uint64
-}
-
-const maskLow51Bits uint64 = (1 << 51) - 1
-
-var feZero = &Element{0, 0, 0, 0, 0}
-
-// Zero sets v = 0, and returns v.
-func (v *Element) Zero() *Element {
- *v = *feZero
- return v
-}
-
-var feOne = &Element{1, 0, 0, 0, 0}
-
-// One sets v = 1, and returns v.
-func (v *Element) One() *Element {
- *v = *feOne
- return v
-}
-
-// reduce reduces v modulo 2^255 - 19 and returns it.
-func (v *Element) reduce() *Element {
- v.carryPropagate()
-
- // After the light reduction we now have a field element representation
- // v < 2^255 + 2^13 * 19, but need v < 2^255 - 19.
-
- // If v >= 2^255 - 19, then v + 19 >= 2^255, which would overflow 2^255 - 1,
- // generating a carry. That is, c will be 0 if v < 2^255 - 19, and 1 otherwise.
- c := (v.l0 + 19) >> 51
- c = (v.l1 + c) >> 51
- c = (v.l2 + c) >> 51
- c = (v.l3 + c) >> 51
- c = (v.l4 + c) >> 51
-
- // If v < 2^255 - 19 and c = 0, this will be a no-op. Otherwise, it's
- // effectively applying the reduction identity to the carry.
- v.l0 += 19 * c
-
- v.l1 += v.l0 >> 51
- v.l0 = v.l0 & maskLow51Bits
- v.l2 += v.l1 >> 51
- v.l1 = v.l1 & maskLow51Bits
- v.l3 += v.l2 >> 51
- v.l2 = v.l2 & maskLow51Bits
- v.l4 += v.l3 >> 51
- v.l3 = v.l3 & maskLow51Bits
- // no additional carry
- v.l4 = v.l4 & maskLow51Bits
-
- return v
-}
-
-// Add sets v = a + b, and returns v.
-func (v *Element) Add(a, b *Element) *Element {
- v.l0 = a.l0 + b.l0
- v.l1 = a.l1 + b.l1
- v.l2 = a.l2 + b.l2
- v.l3 = a.l3 + b.l3
- v.l4 = a.l4 + b.l4
- // Using the generic implementation here is actually faster than the
- // assembly. Probably because the body of this function is so simple that
- // the compiler can figure out better optimizations by inlining the carry
- // propagation. TODO
- return v.carryPropagateGeneric()
-}
-
-// Subtract sets v = a - b, and returns v.
-func (v *Element) Subtract(a, b *Element) *Element {
- // We first add 2 * p, to guarantee the subtraction won't underflow, and
- // then subtract b (which can be up to 2^255 + 2^13 * 19).
- v.l0 = (a.l0 + 0xFFFFFFFFFFFDA) - b.l0
- v.l1 = (a.l1 + 0xFFFFFFFFFFFFE) - b.l1
- v.l2 = (a.l2 + 0xFFFFFFFFFFFFE) - b.l2
- v.l3 = (a.l3 + 0xFFFFFFFFFFFFE) - b.l3
- v.l4 = (a.l4 + 0xFFFFFFFFFFFFE) - b.l4
- return v.carryPropagate()
-}
-
-// Negate sets v = -a, and returns v.
-func (v *Element) Negate(a *Element) *Element {
- return v.Subtract(feZero, a)
-}
-
-// Invert sets v = 1/z mod p, and returns v.
-//
-// If z == 0, Invert returns v = 0.
-func (v *Element) Invert(z *Element) *Element {
- // Inversion is implemented as exponentiation with exponent p − 2. It uses the
- // same sequence of 255 squarings and 11 multiplications as [Curve25519].
- var z2, z9, z11, z2_5_0, z2_10_0, z2_20_0, z2_50_0, z2_100_0, t Element
-
- z2.Square(z) // 2
- t.Square(&z2) // 4
- t.Square(&t) // 8
- z9.Multiply(&t, z) // 9
- z11.Multiply(&z9, &z2) // 11
- t.Square(&z11) // 22
- z2_5_0.Multiply(&t, &z9) // 31 = 2^5 - 2^0
-
- t.Square(&z2_5_0) // 2^6 - 2^1
- for i := 0; i < 4; i++ {
- t.Square(&t) // 2^10 - 2^5
- }
- z2_10_0.Multiply(&t, &z2_5_0) // 2^10 - 2^0
-
- t.Square(&z2_10_0) // 2^11 - 2^1
- for i := 0; i < 9; i++ {
- t.Square(&t) // 2^20 - 2^10
- }
- z2_20_0.Multiply(&t, &z2_10_0) // 2^20 - 2^0
-
- t.Square(&z2_20_0) // 2^21 - 2^1
- for i := 0; i < 19; i++ {
- t.Square(&t) // 2^40 - 2^20
- }
- t.Multiply(&t, &z2_20_0) // 2^40 - 2^0
-
- t.Square(&t) // 2^41 - 2^1
- for i := 0; i < 9; i++ {
- t.Square(&t) // 2^50 - 2^10
- }
- z2_50_0.Multiply(&t, &z2_10_0) // 2^50 - 2^0
-
- t.Square(&z2_50_0) // 2^51 - 2^1
- for i := 0; i < 49; i++ {
- t.Square(&t) // 2^100 - 2^50
- }
- z2_100_0.Multiply(&t, &z2_50_0) // 2^100 - 2^0
-
- t.Square(&z2_100_0) // 2^101 - 2^1
- for i := 0; i < 99; i++ {
- t.Square(&t) // 2^200 - 2^100
- }
- t.Multiply(&t, &z2_100_0) // 2^200 - 2^0
-
- t.Square(&t) // 2^201 - 2^1
- for i := 0; i < 49; i++ {
- t.Square(&t) // 2^250 - 2^50
- }
- t.Multiply(&t, &z2_50_0) // 2^250 - 2^0
-
- t.Square(&t) // 2^251 - 2^1
- t.Square(&t) // 2^252 - 2^2
- t.Square(&t) // 2^253 - 2^3
- t.Square(&t) // 2^254 - 2^4
- t.Square(&t) // 2^255 - 2^5
-
- return v.Multiply(&t, &z11) // 2^255 - 21
-}
-
-// Set sets v = a, and returns v.
-func (v *Element) Set(a *Element) *Element {
- *v = *a
- return v
-}
-
-// SetBytes sets v to x, which must be a 32-byte little-endian encoding.
-//
-// Consistent with RFC 7748, the most significant bit (the high bit of the
-// last byte) is ignored, and non-canonical values (2^255-19 through 2^255-1)
-// are accepted. Note that this is laxer than specified by RFC 8032.
-func (v *Element) SetBytes(x []byte) *Element {
- if len(x) != 32 {
- panic("edwards25519: invalid field element input size")
- }
-
- // Bits 0:51 (bytes 0:8, bits 0:64, shift 0, mask 51).
- v.l0 = binary.LittleEndian.Uint64(x[0:8])
- v.l0 &= maskLow51Bits
- // Bits 51:102 (bytes 6:14, bits 48:112, shift 3, mask 51).
- v.l1 = binary.LittleEndian.Uint64(x[6:14]) >> 3
- v.l1 &= maskLow51Bits
- // Bits 102:153 (bytes 12:20, bits 96:160, shift 6, mask 51).
- v.l2 = binary.LittleEndian.Uint64(x[12:20]) >> 6
- v.l2 &= maskLow51Bits
- // Bits 153:204 (bytes 19:27, bits 152:216, shift 1, mask 51).
- v.l3 = binary.LittleEndian.Uint64(x[19:27]) >> 1
- v.l3 &= maskLow51Bits
- // Bits 204:251 (bytes 24:32, bits 192:256, shift 12, mask 51).
- // Note: not bytes 25:33, shift 4, to avoid overread.
- v.l4 = binary.LittleEndian.Uint64(x[24:32]) >> 12
- v.l4 &= maskLow51Bits
-
- return v
-}
-
-// Bytes returns the canonical 32-byte little-endian encoding of v.
-func (v *Element) Bytes() []byte {
- // This function is outlined to make the allocations inline in the caller
- // rather than happen on the heap.
- var out [32]byte
- return v.bytes(&out)
-}
-
-func (v *Element) bytes(out *[32]byte) []byte {
- t := *v
- t.reduce()
-
- var buf [8]byte
- for i, l := range [5]uint64{t.l0, t.l1, t.l2, t.l3, t.l4} {
- bitsOffset := i * 51
- binary.LittleEndian.PutUint64(buf[:], l<= len(out) {
- break
- }
- out[off] |= bb
- }
- }
-
- return out[:]
-}
-
-// Equal returns 1 if v and u are equal, and 0 otherwise.
-func (v *Element) Equal(u *Element) int {
- sa, sv := u.Bytes(), v.Bytes()
- return subtle.ConstantTimeCompare(sa, sv)
-}
-
-// mask64Bits returns 0xffffffff if cond is 1, and 0 otherwise.
-func mask64Bits(cond int) uint64 { return ^(uint64(cond) - 1) }
-
-// Select sets v to a if cond == 1, and to b if cond == 0.
-func (v *Element) Select(a, b *Element, cond int) *Element {
- m := mask64Bits(cond)
- v.l0 = (m & a.l0) | (^m & b.l0)
- v.l1 = (m & a.l1) | (^m & b.l1)
- v.l2 = (m & a.l2) | (^m & b.l2)
- v.l3 = (m & a.l3) | (^m & b.l3)
- v.l4 = (m & a.l4) | (^m & b.l4)
- return v
-}
-
-// Swap swaps v and u if cond == 1 or leaves them unchanged if cond == 0, and returns v.
-func (v *Element) Swap(u *Element, cond int) {
- m := mask64Bits(cond)
- t := m & (v.l0 ^ u.l0)
- v.l0 ^= t
- u.l0 ^= t
- t = m & (v.l1 ^ u.l1)
- v.l1 ^= t
- u.l1 ^= t
- t = m & (v.l2 ^ u.l2)
- v.l2 ^= t
- u.l2 ^= t
- t = m & (v.l3 ^ u.l3)
- v.l3 ^= t
- u.l3 ^= t
- t = m & (v.l4 ^ u.l4)
- v.l4 ^= t
- u.l4 ^= t
-}
-
-// IsNegative returns 1 if v is negative, and 0 otherwise.
-func (v *Element) IsNegative() int {
- return int(v.Bytes()[0] & 1)
-}
-
-// Absolute sets v to |u|, and returns v.
-func (v *Element) Absolute(u *Element) *Element {
- return v.Select(new(Element).Negate(u), u, u.IsNegative())
-}
-
-// Multiply sets v = x * y, and returns v.
-func (v *Element) Multiply(x, y *Element) *Element {
- feMul(v, x, y)
- return v
-}
-
-// Square sets v = x * x, and returns v.
-func (v *Element) Square(x *Element) *Element {
- feSquare(v, x)
- return v
-}
-
-// Mult32 sets v = x * y, and returns v.
-func (v *Element) Mult32(x *Element, y uint32) *Element {
- x0lo, x0hi := mul51(x.l0, y)
- x1lo, x1hi := mul51(x.l1, y)
- x2lo, x2hi := mul51(x.l2, y)
- x3lo, x3hi := mul51(x.l3, y)
- x4lo, x4hi := mul51(x.l4, y)
- v.l0 = x0lo + 19*x4hi // carried over per the reduction identity
- v.l1 = x1lo + x0hi
- v.l2 = x2lo + x1hi
- v.l3 = x3lo + x2hi
- v.l4 = x4lo + x3hi
- // The hi portions are going to be only 32 bits, plus any previous excess,
- // so we can skip the carry propagation.
- return v
-}
-
-// mul51 returns lo + hi * 2⁵¹ = a * b.
-func mul51(a uint64, b uint32) (lo uint64, hi uint64) {
- mh, ml := bits.Mul64(a, uint64(b))
- lo = ml & maskLow51Bits
- hi = (mh << 13) | (ml >> 51)
- return
-}
-
-// Pow22523 set v = x^((p-5)/8), and returns v. (p-5)/8 is 2^252-3.
-func (v *Element) Pow22523(x *Element) *Element {
- var t0, t1, t2 Element
-
- t0.Square(x) // x^2
- t1.Square(&t0) // x^4
- t1.Square(&t1) // x^8
- t1.Multiply(x, &t1) // x^9
- t0.Multiply(&t0, &t1) // x^11
- t0.Square(&t0) // x^22
- t0.Multiply(&t1, &t0) // x^31
- t1.Square(&t0) // x^62
- for i := 1; i < 5; i++ { // x^992
- t1.Square(&t1)
- }
- t0.Multiply(&t1, &t0) // x^1023 -> 1023 = 2^10 - 1
- t1.Square(&t0) // 2^11 - 2
- for i := 1; i < 10; i++ { // 2^20 - 2^10
- t1.Square(&t1)
- }
- t1.Multiply(&t1, &t0) // 2^20 - 1
- t2.Square(&t1) // 2^21 - 2
- for i := 1; i < 20; i++ { // 2^40 - 2^20
- t2.Square(&t2)
- }
- t1.Multiply(&t2, &t1) // 2^40 - 1
- t1.Square(&t1) // 2^41 - 2
- for i := 1; i < 10; i++ { // 2^50 - 2^10
- t1.Square(&t1)
- }
- t0.Multiply(&t1, &t0) // 2^50 - 1
- t1.Square(&t0) // 2^51 - 2
- for i := 1; i < 50; i++ { // 2^100 - 2^50
- t1.Square(&t1)
- }
- t1.Multiply(&t1, &t0) // 2^100 - 1
- t2.Square(&t1) // 2^101 - 2
- for i := 1; i < 100; i++ { // 2^200 - 2^100
- t2.Square(&t2)
- }
- t1.Multiply(&t2, &t1) // 2^200 - 1
- t1.Square(&t1) // 2^201 - 2
- for i := 1; i < 50; i++ { // 2^250 - 2^50
- t1.Square(&t1)
- }
- t0.Multiply(&t1, &t0) // 2^250 - 1
- t0.Square(&t0) // 2^251 - 2
- t0.Square(&t0) // 2^252 - 4
- return v.Multiply(&t0, x) // 2^252 - 3 -> x^(2^252-3)
-}
-
-// sqrtM1 is 2^((p-1)/4), which squared is equal to -1 by Euler's Criterion.
-var sqrtM1 = &Element{1718705420411056, 234908883556509,
- 2233514472574048, 2117202627021982, 765476049583133}
-
-// SqrtRatio sets r to the non-negative square root of the ratio of u and v.
-//
-// If u/v is square, SqrtRatio returns r and 1. If u/v is not square, SqrtRatio
-// sets r according to Section 4.3 of draft-irtf-cfrg-ristretto255-decaf448-00,
-// and returns r and 0.
-func (r *Element) SqrtRatio(u, v *Element) (rr *Element, wasSquare int) {
- var a, b Element
-
- // r = (u * v3) * (u * v7)^((p-5)/8)
- v2 := a.Square(v)
- uv3 := b.Multiply(u, b.Multiply(v2, v))
- uv7 := a.Multiply(uv3, a.Square(v2))
- r.Multiply(uv3, r.Pow22523(uv7))
-
- check := a.Multiply(v, a.Square(r)) // check = v * r^2
-
- uNeg := b.Negate(u)
- correctSignSqrt := check.Equal(u)
- flippedSignSqrt := check.Equal(uNeg)
- flippedSignSqrtI := check.Equal(uNeg.Multiply(uNeg, sqrtM1))
-
- rPrime := b.Multiply(r, sqrtM1) // r_prime = SQRT_M1 * r
- // r = CT_SELECT(r_prime IF flipped_sign_sqrt | flipped_sign_sqrt_i ELSE r)
- r.Select(rPrime, r, flippedSignSqrt|flippedSignSqrtI)
-
- r.Absolute(r) // Choose the nonnegative square root.
- return r, correctSignSqrt | flippedSignSqrt
-}
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go
deleted file mode 100644
index 70c541692..000000000
--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT.
-
-//go:build amd64 && gc && !purego
-
-package field
-
-// feMul sets out = a * b. It works like feMulGeneric.
-//
-//go:noescape
-func feMul(out *Element, a *Element, b *Element)
-
-// feSquare sets out = a * a. It works like feSquareGeneric.
-//
-//go:noescape
-func feSquare(out *Element, a *Element)
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s
deleted file mode 100644
index 60817acc4..000000000
--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s
+++ /dev/null
@@ -1,378 +0,0 @@
-// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT.
-
-//go:build amd64 && gc && !purego
-
-#include "textflag.h"
-
-// func feMul(out *Element, a *Element, b *Element)
-TEXT ·feMul(SB), NOSPLIT, $0-24
- MOVQ a+8(FP), CX
- MOVQ b+16(FP), BX
-
- // r0 = a0×b0
- MOVQ (CX), AX
- MULQ (BX)
- MOVQ AX, DI
- MOVQ DX, SI
-
- // r0 += 19×a1×b4
- MOVQ 8(CX), AX
- IMUL3Q $0x13, AX, AX
- MULQ 32(BX)
- ADDQ AX, DI
- ADCQ DX, SI
-
- // r0 += 19×a2×b3
- MOVQ 16(CX), AX
- IMUL3Q $0x13, AX, AX
- MULQ 24(BX)
- ADDQ AX, DI
- ADCQ DX, SI
-
- // r0 += 19×a3×b2
- MOVQ 24(CX), AX
- IMUL3Q $0x13, AX, AX
- MULQ 16(BX)
- ADDQ AX, DI
- ADCQ DX, SI
-
- // r0 += 19×a4×b1
- MOVQ 32(CX), AX
- IMUL3Q $0x13, AX, AX
- MULQ 8(BX)
- ADDQ AX, DI
- ADCQ DX, SI
-
- // r1 = a0×b1
- MOVQ (CX), AX
- MULQ 8(BX)
- MOVQ AX, R9
- MOVQ DX, R8
-
- // r1 += a1×b0
- MOVQ 8(CX), AX
- MULQ (BX)
- ADDQ AX, R9
- ADCQ DX, R8
-
- // r1 += 19×a2×b4
- MOVQ 16(CX), AX
- IMUL3Q $0x13, AX, AX
- MULQ 32(BX)
- ADDQ AX, R9
- ADCQ DX, R8
-
- // r1 += 19×a3×b3
- MOVQ 24(CX), AX
- IMUL3Q $0x13, AX, AX
- MULQ 24(BX)
- ADDQ AX, R9
- ADCQ DX, R8
-
- // r1 += 19×a4×b2
- MOVQ 32(CX), AX
- IMUL3Q $0x13, AX, AX
- MULQ 16(BX)
- ADDQ AX, R9
- ADCQ DX, R8
-
- // r2 = a0×b2
- MOVQ (CX), AX
- MULQ 16(BX)
- MOVQ AX, R11
- MOVQ DX, R10
-
- // r2 += a1×b1
- MOVQ 8(CX), AX
- MULQ 8(BX)
- ADDQ AX, R11
- ADCQ DX, R10
-
- // r2 += a2×b0
- MOVQ 16(CX), AX
- MULQ (BX)
- ADDQ AX, R11
- ADCQ DX, R10
-
- // r2 += 19×a3×b4
- MOVQ 24(CX), AX
- IMUL3Q $0x13, AX, AX
- MULQ 32(BX)
- ADDQ AX, R11
- ADCQ DX, R10
-
- // r2 += 19×a4×b3
- MOVQ 32(CX), AX
- IMUL3Q $0x13, AX, AX
- MULQ 24(BX)
- ADDQ AX, R11
- ADCQ DX, R10
-
- // r3 = a0×b3
- MOVQ (CX), AX
- MULQ 24(BX)
- MOVQ AX, R13
- MOVQ DX, R12
-
- // r3 += a1×b2
- MOVQ 8(CX), AX
- MULQ 16(BX)
- ADDQ AX, R13
- ADCQ DX, R12
-
- // r3 += a2×b1
- MOVQ 16(CX), AX
- MULQ 8(BX)
- ADDQ AX, R13
- ADCQ DX, R12
-
- // r3 += a3×b0
- MOVQ 24(CX), AX
- MULQ (BX)
- ADDQ AX, R13
- ADCQ DX, R12
-
- // r3 += 19×a4×b4
- MOVQ 32(CX), AX
- IMUL3Q $0x13, AX, AX
- MULQ 32(BX)
- ADDQ AX, R13
- ADCQ DX, R12
-
- // r4 = a0×b4
- MOVQ (CX), AX
- MULQ 32(BX)
- MOVQ AX, R15
- MOVQ DX, R14
-
- // r4 += a1×b3
- MOVQ 8(CX), AX
- MULQ 24(BX)
- ADDQ AX, R15
- ADCQ DX, R14
-
- // r4 += a2×b2
- MOVQ 16(CX), AX
- MULQ 16(BX)
- ADDQ AX, R15
- ADCQ DX, R14
-
- // r4 += a3×b1
- MOVQ 24(CX), AX
- MULQ 8(BX)
- ADDQ AX, R15
- ADCQ DX, R14
-
- // r4 += a4×b0
- MOVQ 32(CX), AX
- MULQ (BX)
- ADDQ AX, R15
- ADCQ DX, R14
-
- // First reduction chain
- MOVQ $0x0007ffffffffffff, AX
- SHLQ $0x0d, DI, SI
- SHLQ $0x0d, R9, R8
- SHLQ $0x0d, R11, R10
- SHLQ $0x0d, R13, R12
- SHLQ $0x0d, R15, R14
- ANDQ AX, DI
- IMUL3Q $0x13, R14, R14
- ADDQ R14, DI
- ANDQ AX, R9
- ADDQ SI, R9
- ANDQ AX, R11
- ADDQ R8, R11
- ANDQ AX, R13
- ADDQ R10, R13
- ANDQ AX, R15
- ADDQ R12, R15
-
- // Second reduction chain (carryPropagate)
- MOVQ DI, SI
- SHRQ $0x33, SI
- MOVQ R9, R8
- SHRQ $0x33, R8
- MOVQ R11, R10
- SHRQ $0x33, R10
- MOVQ R13, R12
- SHRQ $0x33, R12
- MOVQ R15, R14
- SHRQ $0x33, R14
- ANDQ AX, DI
- IMUL3Q $0x13, R14, R14
- ADDQ R14, DI
- ANDQ AX, R9
- ADDQ SI, R9
- ANDQ AX, R11
- ADDQ R8, R11
- ANDQ AX, R13
- ADDQ R10, R13
- ANDQ AX, R15
- ADDQ R12, R15
-
- // Store output
- MOVQ out+0(FP), AX
- MOVQ DI, (AX)
- MOVQ R9, 8(AX)
- MOVQ R11, 16(AX)
- MOVQ R13, 24(AX)
- MOVQ R15, 32(AX)
- RET
-
-// func feSquare(out *Element, a *Element)
-TEXT ·feSquare(SB), NOSPLIT, $0-16
- MOVQ a+8(FP), CX
-
- // r0 = l0×l0
- MOVQ (CX), AX
- MULQ (CX)
- MOVQ AX, SI
- MOVQ DX, BX
-
- // r0 += 38×l1×l4
- MOVQ 8(CX), AX
- IMUL3Q $0x26, AX, AX
- MULQ 32(CX)
- ADDQ AX, SI
- ADCQ DX, BX
-
- // r0 += 38×l2×l3
- MOVQ 16(CX), AX
- IMUL3Q $0x26, AX, AX
- MULQ 24(CX)
- ADDQ AX, SI
- ADCQ DX, BX
-
- // r1 = 2×l0×l1
- MOVQ (CX), AX
- SHLQ $0x01, AX
- MULQ 8(CX)
- MOVQ AX, R8
- MOVQ DX, DI
-
- // r1 += 38×l2×l4
- MOVQ 16(CX), AX
- IMUL3Q $0x26, AX, AX
- MULQ 32(CX)
- ADDQ AX, R8
- ADCQ DX, DI
-
- // r1 += 19×l3×l3
- MOVQ 24(CX), AX
- IMUL3Q $0x13, AX, AX
- MULQ 24(CX)
- ADDQ AX, R8
- ADCQ DX, DI
-
- // r2 = 2×l0×l2
- MOVQ (CX), AX
- SHLQ $0x01, AX
- MULQ 16(CX)
- MOVQ AX, R10
- MOVQ DX, R9
-
- // r2 += l1×l1
- MOVQ 8(CX), AX
- MULQ 8(CX)
- ADDQ AX, R10
- ADCQ DX, R9
-
- // r2 += 38×l3×l4
- MOVQ 24(CX), AX
- IMUL3Q $0x26, AX, AX
- MULQ 32(CX)
- ADDQ AX, R10
- ADCQ DX, R9
-
- // r3 = 2×l0×l3
- MOVQ (CX), AX
- SHLQ $0x01, AX
- MULQ 24(CX)
- MOVQ AX, R12
- MOVQ DX, R11
-
- // r3 += 2×l1×l2
- MOVQ 8(CX), AX
- IMUL3Q $0x02, AX, AX
- MULQ 16(CX)
- ADDQ AX, R12
- ADCQ DX, R11
-
- // r3 += 19×l4×l4
- MOVQ 32(CX), AX
- IMUL3Q $0x13, AX, AX
- MULQ 32(CX)
- ADDQ AX, R12
- ADCQ DX, R11
-
- // r4 = 2×l0×l4
- MOVQ (CX), AX
- SHLQ $0x01, AX
- MULQ 32(CX)
- MOVQ AX, R14
- MOVQ DX, R13
-
- // r4 += 2×l1×l3
- MOVQ 8(CX), AX
- IMUL3Q $0x02, AX, AX
- MULQ 24(CX)
- ADDQ AX, R14
- ADCQ DX, R13
-
- // r4 += l2×l2
- MOVQ 16(CX), AX
- MULQ 16(CX)
- ADDQ AX, R14
- ADCQ DX, R13
-
- // First reduction chain
- MOVQ $0x0007ffffffffffff, AX
- SHLQ $0x0d, SI, BX
- SHLQ $0x0d, R8, DI
- SHLQ $0x0d, R10, R9
- SHLQ $0x0d, R12, R11
- SHLQ $0x0d, R14, R13
- ANDQ AX, SI
- IMUL3Q $0x13, R13, R13
- ADDQ R13, SI
- ANDQ AX, R8
- ADDQ BX, R8
- ANDQ AX, R10
- ADDQ DI, R10
- ANDQ AX, R12
- ADDQ R9, R12
- ANDQ AX, R14
- ADDQ R11, R14
-
- // Second reduction chain (carryPropagate)
- MOVQ SI, BX
- SHRQ $0x33, BX
- MOVQ R8, DI
- SHRQ $0x33, DI
- MOVQ R10, R9
- SHRQ $0x33, R9
- MOVQ R12, R11
- SHRQ $0x33, R11
- MOVQ R14, R13
- SHRQ $0x33, R13
- ANDQ AX, SI
- IMUL3Q $0x13, R13, R13
- ADDQ R13, SI
- ANDQ AX, R8
- ADDQ BX, R8
- ANDQ AX, R10
- ADDQ DI, R10
- ANDQ AX, R12
- ADDQ R9, R12
- ANDQ AX, R14
- ADDQ R11, R14
-
- // Store output
- MOVQ out+0(FP), AX
- MOVQ SI, (AX)
- MOVQ R8, 8(AX)
- MOVQ R10, 16(AX)
- MOVQ R12, 24(AX)
- MOVQ R14, 32(AX)
- RET
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go
deleted file mode 100644
index 9da280d1d..000000000
--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build !amd64 || !gc || purego
-
-package field
-
-func feMul(v, x, y *Element) { feMulGeneric(v, x, y) }
-
-func feSquare(v, x *Element) { feSquareGeneric(v, x) }
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go
deleted file mode 100644
index 075fe9b92..000000000
--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2020 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build arm64 && gc && !purego
-
-package field
-
-//go:noescape
-func carryPropagate(v *Element)
-
-func (v *Element) carryPropagate() *Element {
- carryPropagate(v)
- return v
-}
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s
deleted file mode 100644
index 3126a4341..000000000
--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2020 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build arm64 && gc && !purego
-
-#include "textflag.h"
-
-// carryPropagate works exactly like carryPropagateGeneric and uses the
-// same AND, ADD, and LSR+MADD instructions emitted by the compiler, but
-// avoids loading R0-R4 twice and uses LDP and STP.
-//
-// See https://golang.org/issues/43145 for the main compiler issue.
-//
-// func carryPropagate(v *Element)
-TEXT ·carryPropagate(SB),NOFRAME|NOSPLIT,$0-8
- MOVD v+0(FP), R20
-
- LDP 0(R20), (R0, R1)
- LDP 16(R20), (R2, R3)
- MOVD 32(R20), R4
-
- AND $0x7ffffffffffff, R0, R10
- AND $0x7ffffffffffff, R1, R11
- AND $0x7ffffffffffff, R2, R12
- AND $0x7ffffffffffff, R3, R13
- AND $0x7ffffffffffff, R4, R14
-
- ADD R0>>51, R11, R11
- ADD R1>>51, R12, R12
- ADD R2>>51, R13, R13
- ADD R3>>51, R14, R14
- // R4>>51 * 19 + R10 -> R10
- LSR $51, R4, R21
- MOVD $19, R22
- MADD R22, R10, R21, R10
-
- STP (R10, R11), 0(R20)
- STP (R12, R13), 16(R20)
- MOVD R14, 32(R20)
-
- RET
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go
deleted file mode 100644
index fc029ac12..000000000
--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) 2021 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build !arm64 || !gc || purego
-
-package field
-
-func (v *Element) carryPropagate() *Element {
- return v.carryPropagateGeneric()
-}
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go
deleted file mode 100644
index 2671217da..000000000
--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go
+++ /dev/null
@@ -1,264 +0,0 @@
-// Copyright (c) 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package field
-
-import "math/bits"
-
-// uint128 holds a 128-bit number as two 64-bit limbs, for use with the
-// bits.Mul64 and bits.Add64 intrinsics.
-type uint128 struct {
- lo, hi uint64
-}
-
-// mul64 returns a * b.
-func mul64(a, b uint64) uint128 {
- hi, lo := bits.Mul64(a, b)
- return uint128{lo, hi}
-}
-
-// addMul64 returns v + a * b.
-func addMul64(v uint128, a, b uint64) uint128 {
- hi, lo := bits.Mul64(a, b)
- lo, c := bits.Add64(lo, v.lo, 0)
- hi, _ = bits.Add64(hi, v.hi, c)
- return uint128{lo, hi}
-}
-
-// shiftRightBy51 returns a >> 51. a is assumed to be at most 115 bits.
-func shiftRightBy51(a uint128) uint64 {
- return (a.hi << (64 - 51)) | (a.lo >> 51)
-}
-
-func feMulGeneric(v, a, b *Element) {
- a0 := a.l0
- a1 := a.l1
- a2 := a.l2
- a3 := a.l3
- a4 := a.l4
-
- b0 := b.l0
- b1 := b.l1
- b2 := b.l2
- b3 := b.l3
- b4 := b.l4
-
- // Limb multiplication works like pen-and-paper columnar multiplication, but
- // with 51-bit limbs instead of digits.
- //
- // a4 a3 a2 a1 a0 x
- // b4 b3 b2 b1 b0 =
- // ------------------------
- // a4b0 a3b0 a2b0 a1b0 a0b0 +
- // a4b1 a3b1 a2b1 a1b1 a0b1 +
- // a4b2 a3b2 a2b2 a1b2 a0b2 +
- // a4b3 a3b3 a2b3 a1b3 a0b3 +
- // a4b4 a3b4 a2b4 a1b4 a0b4 =
- // ----------------------------------------------
- // r8 r7 r6 r5 r4 r3 r2 r1 r0
- //
- // We can then use the reduction identity (a * 2²⁵⁵ + b = a * 19 + b) to
- // reduce the limbs that would overflow 255 bits. r5 * 2²⁵⁵ becomes 19 * r5,
- // r6 * 2³⁰⁶ becomes 19 * r6 * 2⁵¹, etc.
- //
- // Reduction can be carried out simultaneously to multiplication. For
- // example, we do not compute r5: whenever the result of a multiplication
- // belongs to r5, like a1b4, we multiply it by 19 and add the result to r0.
- //
- // a4b0 a3b0 a2b0 a1b0 a0b0 +
- // a3b1 a2b1 a1b1 a0b1 19×a4b1 +
- // a2b2 a1b2 a0b2 19×a4b2 19×a3b2 +
- // a1b3 a0b3 19×a4b3 19×a3b3 19×a2b3 +
- // a0b4 19×a4b4 19×a3b4 19×a2b4 19×a1b4 =
- // --------------------------------------
- // r4 r3 r2 r1 r0
- //
- // Finally we add up the columns into wide, overlapping limbs.
-
- a1_19 := a1 * 19
- a2_19 := a2 * 19
- a3_19 := a3 * 19
- a4_19 := a4 * 19
-
- // r0 = a0×b0 + 19×(a1×b4 + a2×b3 + a3×b2 + a4×b1)
- r0 := mul64(a0, b0)
- r0 = addMul64(r0, a1_19, b4)
- r0 = addMul64(r0, a2_19, b3)
- r0 = addMul64(r0, a3_19, b2)
- r0 = addMul64(r0, a4_19, b1)
-
- // r1 = a0×b1 + a1×b0 + 19×(a2×b4 + a3×b3 + a4×b2)
- r1 := mul64(a0, b1)
- r1 = addMul64(r1, a1, b0)
- r1 = addMul64(r1, a2_19, b4)
- r1 = addMul64(r1, a3_19, b3)
- r1 = addMul64(r1, a4_19, b2)
-
- // r2 = a0×b2 + a1×b1 + a2×b0 + 19×(a3×b4 + a4×b3)
- r2 := mul64(a0, b2)
- r2 = addMul64(r2, a1, b1)
- r2 = addMul64(r2, a2, b0)
- r2 = addMul64(r2, a3_19, b4)
- r2 = addMul64(r2, a4_19, b3)
-
- // r3 = a0×b3 + a1×b2 + a2×b1 + a3×b0 + 19×a4×b4
- r3 := mul64(a0, b3)
- r3 = addMul64(r3, a1, b2)
- r3 = addMul64(r3, a2, b1)
- r3 = addMul64(r3, a3, b0)
- r3 = addMul64(r3, a4_19, b4)
-
- // r4 = a0×b4 + a1×b3 + a2×b2 + a3×b1 + a4×b0
- r4 := mul64(a0, b4)
- r4 = addMul64(r4, a1, b3)
- r4 = addMul64(r4, a2, b2)
- r4 = addMul64(r4, a3, b1)
- r4 = addMul64(r4, a4, b0)
-
- // After the multiplication, we need to reduce (carry) the five coefficients
- // to obtain a result with limbs that are at most slightly larger than 2⁵¹,
- // to respect the Element invariant.
- //
- // Overall, the reduction works the same as carryPropagate, except with
- // wider inputs: we take the carry for each coefficient by shifting it right
- // by 51, and add it to the limb above it. The top carry is multiplied by 19
- // according to the reduction identity and added to the lowest limb.
- //
- // The largest coefficient (r0) will be at most 111 bits, which guarantees
- // that all carries are at most 111 - 51 = 60 bits, which fits in a uint64.
- //
- // r0 = a0×b0 + 19×(a1×b4 + a2×b3 + a3×b2 + a4×b1)
- // r0 < 2⁵²×2⁵² + 19×(2⁵²×2⁵² + 2⁵²×2⁵² + 2⁵²×2⁵² + 2⁵²×2⁵²)
- // r0 < (1 + 19 × 4) × 2⁵² × 2⁵²
- // r0 < 2⁷ × 2⁵² × 2⁵²
- // r0 < 2¹¹¹
- //
- // Moreover, the top coefficient (r4) is at most 107 bits, so c4 is at most
- // 56 bits, and c4 * 19 is at most 61 bits, which again fits in a uint64 and
- // allows us to easily apply the reduction identity.
- //
- // r4 = a0×b4 + a1×b3 + a2×b2 + a3×b1 + a4×b0
- // r4 < 5 × 2⁵² × 2⁵²
- // r4 < 2¹⁰⁷
- //
-
- c0 := shiftRightBy51(r0)
- c1 := shiftRightBy51(r1)
- c2 := shiftRightBy51(r2)
- c3 := shiftRightBy51(r3)
- c4 := shiftRightBy51(r4)
-
- rr0 := r0.lo&maskLow51Bits + c4*19
- rr1 := r1.lo&maskLow51Bits + c0
- rr2 := r2.lo&maskLow51Bits + c1
- rr3 := r3.lo&maskLow51Bits + c2
- rr4 := r4.lo&maskLow51Bits + c3
-
- // Now all coefficients fit into 64-bit registers but are still too large to
- // be passed around as a Element. We therefore do one last carry chain,
- // where the carries will be small enough to fit in the wiggle room above 2⁵¹.
- *v = Element{rr0, rr1, rr2, rr3, rr4}
- v.carryPropagate()
-}
-
-func feSquareGeneric(v, a *Element) {
- l0 := a.l0
- l1 := a.l1
- l2 := a.l2
- l3 := a.l3
- l4 := a.l4
-
- // Squaring works precisely like multiplication above, but thanks to its
- // symmetry we get to group a few terms together.
- //
- // l4 l3 l2 l1 l0 x
- // l4 l3 l2 l1 l0 =
- // ------------------------
- // l4l0 l3l0 l2l0 l1l0 l0l0 +
- // l4l1 l3l1 l2l1 l1l1 l0l1 +
- // l4l2 l3l2 l2l2 l1l2 l0l2 +
- // l4l3 l3l3 l2l3 l1l3 l0l3 +
- // l4l4 l3l4 l2l4 l1l4 l0l4 =
- // ----------------------------------------------
- // r8 r7 r6 r5 r4 r3 r2 r1 r0
- //
- // l4l0 l3l0 l2l0 l1l0 l0l0 +
- // l3l1 l2l1 l1l1 l0l1 19×l4l1 +
- // l2l2 l1l2 l0l2 19×l4l2 19×l3l2 +
- // l1l3 l0l3 19×l4l3 19×l3l3 19×l2l3 +
- // l0l4 19×l4l4 19×l3l4 19×l2l4 19×l1l4 =
- // --------------------------------------
- // r4 r3 r2 r1 r0
- //
- // With precomputed 2×, 19×, and 2×19× terms, we can compute each limb with
- // only three Mul64 and four Add64, instead of five and eight.
-
- l0_2 := l0 * 2
- l1_2 := l1 * 2
-
- l1_38 := l1 * 38
- l2_38 := l2 * 38
- l3_38 := l3 * 38
-
- l3_19 := l3 * 19
- l4_19 := l4 * 19
-
- // r0 = l0×l0 + 19×(l1×l4 + l2×l3 + l3×l2 + l4×l1) = l0×l0 + 19×2×(l1×l4 + l2×l3)
- r0 := mul64(l0, l0)
- r0 = addMul64(r0, l1_38, l4)
- r0 = addMul64(r0, l2_38, l3)
-
- // r1 = l0×l1 + l1×l0 + 19×(l2×l4 + l3×l3 + l4×l2) = 2×l0×l1 + 19×2×l2×l4 + 19×l3×l3
- r1 := mul64(l0_2, l1)
- r1 = addMul64(r1, l2_38, l4)
- r1 = addMul64(r1, l3_19, l3)
-
- // r2 = l0×l2 + l1×l1 + l2×l0 + 19×(l3×l4 + l4×l3) = 2×l0×l2 + l1×l1 + 19×2×l3×l4
- r2 := mul64(l0_2, l2)
- r2 = addMul64(r2, l1, l1)
- r2 = addMul64(r2, l3_38, l4)
-
- // r3 = l0×l3 + l1×l2 + l2×l1 + l3×l0 + 19×l4×l4 = 2×l0×l3 + 2×l1×l2 + 19×l4×l4
- r3 := mul64(l0_2, l3)
- r3 = addMul64(r3, l1_2, l2)
- r3 = addMul64(r3, l4_19, l4)
-
- // r4 = l0×l4 + l1×l3 + l2×l2 + l3×l1 + l4×l0 = 2×l0×l4 + 2×l1×l3 + l2×l2
- r4 := mul64(l0_2, l4)
- r4 = addMul64(r4, l1_2, l3)
- r4 = addMul64(r4, l2, l2)
-
- c0 := shiftRightBy51(r0)
- c1 := shiftRightBy51(r1)
- c2 := shiftRightBy51(r2)
- c3 := shiftRightBy51(r3)
- c4 := shiftRightBy51(r4)
-
- rr0 := r0.lo&maskLow51Bits + c4*19
- rr1 := r1.lo&maskLow51Bits + c0
- rr2 := r2.lo&maskLow51Bits + c1
- rr3 := r3.lo&maskLow51Bits + c2
- rr4 := r4.lo&maskLow51Bits + c3
-
- *v = Element{rr0, rr1, rr2, rr3, rr4}
- v.carryPropagate()
-}
-
-// carryPropagateGeneric brings the limbs below 52 bits by applying the reduction
-// identity (a * 2²⁵⁵ + b = a * 19 + b) to the l4 carry. TODO inline
-func (v *Element) carryPropagateGeneric() *Element {
- c0 := v.l0 >> 51
- c1 := v.l1 >> 51
- c2 := v.l2 >> 51
- c3 := v.l3 >> 51
- c4 := v.l4 >> 51
-
- v.l0 = v.l0&maskLow51Bits + c4*19
- v.l1 = v.l1&maskLow51Bits + c0
- v.l2 = v.l2&maskLow51Bits + c1
- v.l3 = v.l3&maskLow51Bits + c2
- v.l4 = v.l4&maskLow51Bits + c3
-
- return v
-}
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint b/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint
deleted file mode 100644
index e3685f95c..000000000
--- a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint
+++ /dev/null
@@ -1 +0,0 @@
-b0c49ae9f59d233526f8934262c5bbbe14d4358d
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh b/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh
deleted file mode 100644
index 1ba22a8b4..000000000
--- a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/bash
-set -euo pipefail
-
-cd "$(git rev-parse --show-toplevel)"
-
-STD_PATH=src/crypto/ed25519/internal/edwards25519/field
-LOCAL_PATH=curve25519/internal/field
-LAST_SYNC_REF=$(cat $LOCAL_PATH/sync.checkpoint)
-
-git fetch https://go.googlesource.com/go master
-
-if git diff --quiet $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH; then
- echo "No changes."
-else
- NEW_REF=$(git rev-parse FETCH_HEAD | tee $LOCAL_PATH/sync.checkpoint)
- echo "Applying changes from $LAST_SYNC_REF to $NEW_REF..."
- git diff $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH | \
- git apply -3 --directory=$LOCAL_PATH
-fi
diff --git a/vendor/golang.org/x/crypto/hkdf/hkdf.go b/vendor/golang.org/x/crypto/hkdf/hkdf.go
index f4ded5fee..3bee66294 100644
--- a/vendor/golang.org/x/crypto/hkdf/hkdf.go
+++ b/vendor/golang.org/x/crypto/hkdf/hkdf.go
@@ -8,7 +8,7 @@
// HKDF is a cryptographic key derivation function (KDF) with the goal of
// expanding limited input keying material into one or more cryptographically
// strong secret keys.
-package hkdf // import "golang.org/x/crypto/hkdf"
+package hkdf
import (
"crypto/hmac"
diff --git a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
index 904b57e01..28cd99c7f 100644
--- a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
+++ b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
@@ -16,7 +16,7 @@ Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To
choose, you can pass the `New` functions from the different SHA packages to
pbkdf2.Key.
*/
-package pbkdf2 // import "golang.org/x/crypto/pbkdf2"
+package pbkdf2
import (
"crypto/hmac"
diff --git a/vendor/golang.org/x/crypto/sha3/doc.go b/vendor/golang.org/x/crypto/sha3/doc.go
index decd8cf9b..7e0230907 100644
--- a/vendor/golang.org/x/crypto/sha3/doc.go
+++ b/vendor/golang.org/x/crypto/sha3/doc.go
@@ -59,4 +59,4 @@
// They produce output of the same length, with the same security strengths
// against all attacks. This means, in particular, that SHA3-256 only has
// 128-bit collision resistance, because its output length is 32 bytes.
-package sha3 // import "golang.org/x/crypto/sha3"
+package sha3
diff --git a/vendor/golang.org/x/crypto/sha3/hashes.go b/vendor/golang.org/x/crypto/sha3/hashes.go
index 5eae6cb92..c544b29e5 100644
--- a/vendor/golang.org/x/crypto/sha3/hashes.go
+++ b/vendor/golang.org/x/crypto/sha3/hashes.go
@@ -9,6 +9,7 @@ package sha3
// bytes.
import (
+ "crypto"
"hash"
)
@@ -40,6 +41,13 @@ func New512() hash.Hash {
return new512()
}
+func init() {
+ crypto.RegisterHash(crypto.SHA3_224, New224)
+ crypto.RegisterHash(crypto.SHA3_256, New256)
+ crypto.RegisterHash(crypto.SHA3_384, New384)
+ crypto.RegisterHash(crypto.SHA3_512, New512)
+}
+
func new224Generic() *state {
return &state{rate: 144, outputLen: 28, dsbyte: 0x06}
}
diff --git a/vendor/golang.org/x/crypto/sha3/register.go b/vendor/golang.org/x/crypto/sha3/register.go
deleted file mode 100644
index addfd5049..000000000
--- a/vendor/golang.org/x/crypto/sha3/register.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build go1.4
-
-package sha3
-
-import (
- "crypto"
-)
-
-func init() {
- crypto.RegisterHash(crypto.SHA3_224, New224)
- crypto.RegisterHash(crypto.SHA3_256, New256)
- crypto.RegisterHash(crypto.SHA3_384, New384)
- crypto.RegisterHash(crypto.SHA3_512, New512)
-}
diff --git a/vendor/golang.org/x/crypto/ssh/agent/client.go b/vendor/golang.org/x/crypto/ssh/agent/client.go
index fecba8eb3..106708d28 100644
--- a/vendor/golang.org/x/crypto/ssh/agent/client.go
+++ b/vendor/golang.org/x/crypto/ssh/agent/client.go
@@ -10,7 +10,7 @@
// References:
//
// [PROTOCOL.agent]: https://tools.ietf.org/html/draft-miller-ssh-agent-00
-package agent // import "golang.org/x/crypto/ssh/agent"
+package agent
import (
"bytes"
diff --git a/vendor/golang.org/x/crypto/ssh/client_auth.go b/vendor/golang.org/x/crypto/ssh/client_auth.go
index 9486c5986..b93961010 100644
--- a/vendor/golang.org/x/crypto/ssh/client_auth.go
+++ b/vendor/golang.org/x/crypto/ssh/client_auth.go
@@ -71,6 +71,10 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error {
for auth := AuthMethod(new(noneAuth)); auth != nil; {
ok, methods, err := auth.auth(sessionID, config.User, c.transport, config.Rand, extensions)
if err != nil {
+ // On disconnect, return error immediately
+ if _, ok := err.(*disconnectMsg); ok {
+ return err
+ }
// We return the error later if there is no other method left to
// try.
ok = authFailure
diff --git a/vendor/golang.org/x/crypto/ssh/doc.go b/vendor/golang.org/x/crypto/ssh/doc.go
index edbe63340..f5d352fe3 100644
--- a/vendor/golang.org/x/crypto/ssh/doc.go
+++ b/vendor/golang.org/x/crypto/ssh/doc.go
@@ -20,4 +20,4 @@ References:
This package does not fall under the stability promise of the Go language itself,
so its API may be changed when pressing needs arise.
*/
-package ssh // import "golang.org/x/crypto/ssh"
+package ssh
diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go
index 98a49c6b6..61f511f97 100644
--- a/vendor/golang.org/x/net/http2/transport.go
+++ b/vendor/golang.org/x/net/http2/transport.go
@@ -827,10 +827,6 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
cc.henc.SetMaxDynamicTableSizeLimit(t.maxEncoderHeaderTableSize())
cc.peerMaxHeaderTableSize = initialHeaderTableSize
- if t.AllowHTTP {
- cc.nextStreamID = 3
- }
-
if cs, ok := c.(connectionStater); ok {
state := cs.ConnectionState()
cc.tlsState = &state
diff --git a/vendor/golang.org/x/sys/unix/mremap.go b/vendor/golang.org/x/sys/unix/mremap.go
index fd45fe529..3a5e776f8 100644
--- a/vendor/golang.org/x/sys/unix/mremap.go
+++ b/vendor/golang.org/x/sys/unix/mremap.go
@@ -50,3 +50,8 @@ func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data [
func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
return mapper.Mremap(oldData, newLength, flags)
}
+
+func MremapPtr(oldAddr unsafe.Pointer, oldSize uintptr, newAddr unsafe.Pointer, newSize uintptr, flags int) (ret unsafe.Pointer, err error) {
+ xaddr, err := mapper.mremap(uintptr(oldAddr), oldSize, newSize, flags, uintptr(newAddr))
+ return unsafe.Pointer(xaddr), err
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 59542a897..4cc7b0059 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -542,6 +542,18 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
}
}
+//sys pthread_chdir_np(path string) (err error)
+
+func PthreadChdir(path string) (err error) {
+ return pthread_chdir_np(path)
+}
+
+//sys pthread_fchdir_np(fd int) (err error)
+
+func PthreadFchdir(fd int) (err error) {
+ return pthread_fchdir_np(fd)
+}
+
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go
index 77081de8c..4e92e5aa4 100644
--- a/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_unix.go
@@ -154,6 +154,15 @@ func Munmap(b []byte) (err error) {
return mapper.Munmap(b)
}
+func MmapPtr(fd int, offset int64, addr unsafe.Pointer, length uintptr, prot int, flags int) (ret unsafe.Pointer, err error) {
+ xaddr, err := mapper.mmap(uintptr(addr), length, prot, flags, fd, offset)
+ return unsafe.Pointer(xaddr), err
+}
+
+func MunmapPtr(addr unsafe.Pointer, length uintptr) (err error) {
+ return mapper.munmap(uintptr(addr), length)
+}
+
func Read(fd int, p []byte) (n int, err error) {
n, err = read(fd, p)
if raceenabled {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index ccb02f240..07642c308 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
@@ -760,6 +760,39 @@ var libc_sysctl_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pthread_chdir_np(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pthread_chdir_np_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pthread_fchdir_np(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pthread_fchdir_np_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
index 8b8bb2840..923e08cb7 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
@@ -228,6 +228,16 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pthread_chdir_np(SB)
+GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB)
+
+TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pthread_fchdir_np(SB)
+GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB)
+
TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendfile(SB)
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index 1b40b997b..7d73dda64 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
@@ -760,6 +760,39 @@ var libc_sysctl_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pthread_chdir_np(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pthread_chdir_np_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pthread_fchdir_np(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pthread_fchdir_np_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
_, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
index 08362c1ab..057700111 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
@@ -228,6 +228,16 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pthread_chdir_np(SB)
+GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB)
+
+TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pthread_fchdir_np(SB)
+GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB)
+
TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_sendfile(SB)
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go
index 6f7d2ac70..97651b5bd 100644
--- a/vendor/golang.org/x/sys/windows/security_windows.go
+++ b/vendor/golang.org/x/sys/windows/security_windows.go
@@ -894,7 +894,7 @@ type ACL struct {
aclRevision byte
sbz1 byte
aclSize uint16
- aceCount uint16
+ AceCount uint16
sbz2 uint16
}
@@ -1087,6 +1087,27 @@ type EXPLICIT_ACCESS struct {
Trustee TRUSTEE
}
+// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header
+type ACE_HEADER struct {
+ AceType uint8
+ AceFlags uint8
+ AceSize uint16
+}
+
+// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-access_allowed_ace
+type ACCESS_ALLOWED_ACE struct {
+ Header ACE_HEADER
+ Mask ACCESS_MASK
+ SidStart uint32
+}
+
+const (
+ // Constants for AceType
+ // https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header
+ ACCESS_ALLOWED_ACE_TYPE = 0
+ ACCESS_DENIED_ACE_TYPE = 1
+)
+
// This type is the union inside of TRUSTEE and must be created using one of the TrusteeValueFrom* functions.
type TrusteeValue uintptr
@@ -1158,6 +1179,7 @@ type OBJECTS_AND_NAME struct {
//sys makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) = advapi32.MakeSelfRelativeSD
//sys setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) = advapi32.SetEntriesInAclW
+//sys GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (ret error) = advapi32.GetAce
// Control returns the security descriptor control bits.
func (sd *SECURITY_DESCRIPTOR) Control() (control SECURITY_DESCRIPTOR_CONTROL, revision uint32, err error) {
diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index 9f73df75b..eba761018 100644
--- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -91,6 +91,7 @@ var (
procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW")
procEqualSid = modadvapi32.NewProc("EqualSid")
procFreeSid = modadvapi32.NewProc("FreeSid")
+ procGetAce = modadvapi32.NewProc("GetAce")
procGetLengthSid = modadvapi32.NewProc("GetLengthSid")
procGetNamedSecurityInfoW = modadvapi32.NewProc("GetNamedSecurityInfoW")
procGetSecurityDescriptorControl = modadvapi32.NewProc("GetSecurityDescriptorControl")
@@ -1224,6 +1225,14 @@ func setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCE
return
}
+func GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (ret error) {
+ r0, _, _ := syscall.Syscall(procGetAce.Addr(), 3, uintptr(unsafe.Pointer(acl)), uintptr(aceIndex), uintptr(unsafe.Pointer(pAce)))
+ if r0 == 0 {
+ ret = GetLastError()
+ }
+ return
+}
+
func SetKernelObjectSecurity(handle Handle, securityInformation SECURITY_INFORMATION, securityDescriptor *SECURITY_DESCRIPTOR) (err error) {
r1, _, e1 := syscall.Syscall(procSetKernelObjectSecurity.Addr(), 3, uintptr(handle), uintptr(securityInformation), uintptr(unsafe.Pointer(securityDescriptor)))
if r1 == 0 {
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 60ad5ab22..b704de159 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1,7 +1,7 @@
# dario.cat/mergo v1.0.0
## explicit; go 1.13
dario.cat/mergo
-# github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0
+# github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0
## explicit; go 1.18
github.com/Azure/azure-sdk-for-go/sdk/azcore
github.com/Azure/azure-sdk-for-go/sdk/azcore/arm
@@ -24,11 +24,11 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime
github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming
github.com/Azure/azure-sdk-for-go/sdk/azcore/to
github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing
-# github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0
+# github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0
## explicit; go 1.18
github.com/Azure/azure-sdk-for-go/sdk/azidentity
github.com/Azure/azure-sdk-for-go/sdk/azidentity/internal
-# github.com/Azure/azure-sdk-for-go/sdk/internal v1.9.0
+# github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0
## explicit; go 1.18
github.com/Azure/azure-sdk-for-go/sdk/internal/diag
github.com/Azure/azure-sdk-for-go/sdk/internal/errorinfo
@@ -37,6 +37,9 @@ github.com/Azure/azure-sdk-for-go/sdk/internal/log
github.com/Azure/azure-sdk-for-go/sdk/internal/poller
github.com/Azure/azure-sdk-for-go/sdk/internal/temporal
github.com/Azure/azure-sdk-for-go/sdk/internal/uuid
+# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6 v6.0.0
+## explicit; go 1.18
+github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6
# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.9.0
## explicit; go 1.18
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph
@@ -105,6 +108,19 @@ github.com/apparentlymart/go-textseg/v15/textseg
# github.com/atotto/clipboard v0.1.4
## explicit
github.com/atotto/clipboard
+# github.com/aws/amazon-ec2-instance-selector/v2 v2.4.2-0.20231006140257-d989c5d76f0e
+## explicit; go 1.20
+github.com/aws/amazon-ec2-instance-selector/v2/pkg/awsapi
+github.com/aws/amazon-ec2-instance-selector/v2/pkg/bytequantity
+github.com/aws/amazon-ec2-instance-selector/v2/pkg/ec2pricing
+github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes
+github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector
+github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs
+github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter
+# github.com/aws/aws-sdk-go v1.45.6
+## explicit; go 1.11
+github.com/aws/aws-sdk-go/aws/awserr
+github.com/aws/aws-sdk-go/aws/endpoints
# github.com/aws/aws-sdk-go-v2 v1.27.2
## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/aws
@@ -169,6 +185,11 @@ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding
# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11
## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url
+# github.com/aws/aws-sdk-go-v2/service/pricing v1.21.6
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/service/pricing
+github.com/aws/aws-sdk-go-v2/service/pricing/internal/endpoints
+github.com/aws/aws-sdk-go-v2/service/pricing/types
# github.com/aws/aws-sdk-go-v2/service/sso v1.20.11
## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/service/sso
@@ -213,15 +234,23 @@ github.com/aymanbagabas/go-osc52/v2
# github.com/blang/semver v3.5.1+incompatible
## explicit
github.com/blang/semver
+# github.com/blang/semver/v4 v4.0.0
+## explicit; go 1.14
+github.com/blang/semver/v4
# github.com/cespare/xxhash/v2 v2.2.0
## explicit; go 1.11
github.com/cespare/xxhash/v2
# github.com/charmbracelet/bubbles v0.16.1
## explicit; go 1.17
github.com/charmbracelet/bubbles/cursor
+github.com/charmbracelet/bubbles/help
github.com/charmbracelet/bubbles/key
+github.com/charmbracelet/bubbles/list
+github.com/charmbracelet/bubbles/paginator
github.com/charmbracelet/bubbles/runeutil
+github.com/charmbracelet/bubbles/spinner
github.com/charmbracelet/bubbles/textinput
+github.com/charmbracelet/bubbles/viewport
# github.com/charmbracelet/bubbletea v0.25.0
## explicit; go 1.17
github.com/charmbracelet/bubbletea
@@ -265,6 +294,9 @@ github.com/emirpasic/gods/lists/arraylist
github.com/emirpasic/gods/trees
github.com/emirpasic/gods/trees/binaryheap
github.com/emirpasic/gods/utils
+# github.com/evertras/bubble-table v0.15.2
+## explicit; go 1.17
+github.com/evertras/bubble-table/table
# github.com/fsnotify/fsnotify v1.7.0
## explicit; go 1.17
github.com/fsnotify/fsnotify
@@ -372,6 +404,9 @@ github.com/hashicorp/hcl/json/token
# github.com/hashicorp/hcl/v2 v2.20.1
## explicit; go 1.18
github.com/hashicorp/hcl/v2
+# github.com/imdario/mergo v0.3.16
+## explicit; go 1.13
+github.com/imdario/mergo
# github.com/inconshreveable/mousetrap v1.1.0
## explicit; go 1.18
github.com/inconshreveable/mousetrap
@@ -403,6 +438,9 @@ github.com/mattn/go-localereader
# github.com/mattn/go-runewidth v0.0.15
## explicit; go 1.9
github.com/mattn/go-runewidth
+# github.com/mitchellh/go-homedir v1.1.0
+## explicit
+github.com/mitchellh/go-homedir
# github.com/mitchellh/go-ps v1.0.0
## explicit; go 1.13
github.com/mitchellh/go-ps
@@ -435,6 +473,9 @@ github.com/nxadm/tail/ratelimiter
github.com/nxadm/tail/util
github.com/nxadm/tail/watch
github.com/nxadm/tail/winfile
+# github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852
+## explicit
+github.com/oliveagle/jsonpath
# github.com/opentracing/basictracer-go v1.1.0
## explicit; go 1.14
github.com/opentracing/basictracer-go
@@ -444,6 +485,9 @@ github.com/opentracing/basictracer-go/wire
github.com/opentracing/opentracing-go
github.com/opentracing/opentracing-go/ext
github.com/opentracing/opentracing-go/log
+# github.com/patrickmn/go-cache v2.1.0+incompatible
+## explicit
+github.com/patrickmn/go-cache
# github.com/pelletier/go-toml/v2 v2.2.2
## explicit; go 1.16
github.com/pelletier/go-toml/v2
@@ -593,6 +637,9 @@ github.com/sagikazarmark/locafero
# github.com/sagikazarmark/slog-shim v0.1.0
## explicit; go 1.20
github.com/sagikazarmark/slog-shim
+# github.com/sahilm/fuzzy v0.1.0
+## explicit
+github.com/sahilm/fuzzy
# github.com/santhosh-tekuri/jsonschema/v5 v5.0.0
## explicit; go 1.15
github.com/santhosh-tekuri/jsonschema/v5
@@ -677,18 +724,17 @@ github.com/zclconf/go-cty/cty/set
# go.uber.org/atomic v1.9.0
## explicit; go 1.13
go.uber.org/atomic
-# go.uber.org/multierr v1.9.0
+# go.uber.org/multierr v1.11.0
## explicit; go 1.19
go.uber.org/multierr
-# golang.org/x/crypto v0.24.0
-## explicit; go 1.18
+# golang.org/x/crypto v0.25.0
+## explicit; go 1.20
golang.org/x/crypto/argon2
golang.org/x/crypto/blake2b
golang.org/x/crypto/blowfish
golang.org/x/crypto/cast5
golang.org/x/crypto/chacha20
golang.org/x/crypto/curve25519
-golang.org/x/crypto/curve25519/internal/field
golang.org/x/crypto/hkdf
golang.org/x/crypto/internal/alias
golang.org/x/crypto/internal/poly1305
@@ -711,7 +757,7 @@ golang.org/x/exp/slog/internal/buffer
# golang.org/x/mod v0.18.0
## explicit; go 1.18
golang.org/x/mod/semver
-# golang.org/x/net v0.26.0
+# golang.org/x/net v0.27.0
## explicit; go 1.18
golang.org/x/net/context
golang.org/x/net/http/httpguts
@@ -725,7 +771,7 @@ golang.org/x/net/trace
# golang.org/x/sync v0.7.0
## explicit; go 1.18
golang.org/x/sync/errgroup
-# golang.org/x/sys v0.21.0
+# golang.org/x/sys v0.22.0
## explicit; go 1.18
golang.org/x/sys/cpu
golang.org/x/sys/execabs
@@ -733,7 +779,7 @@ golang.org/x/sys/plan9
golang.org/x/sys/unix
golang.org/x/sys/windows
golang.org/x/sys/windows/registry
-# golang.org/x/term v0.21.0
+# golang.org/x/term v0.22.0
## explicit; go 1.18
golang.org/x/term
# golang.org/x/text v0.16.0