From 51d152e848a36199a3057b7b88fc36772cf12992 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Wed, 11 Oct 2023 13:45:24 +0000 Subject: [PATCH 01/11] test: adjust log print in e2e test disable error exit test: fix blob_log.sh --- test/utils/blob_log.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/test/utils/blob_log.sh b/test/utils/blob_log.sh index 3ba0039e05..bd0268b633 100755 --- a/test/utils/blob_log.sh +++ b/test/utils/blob_log.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -e +# set -e NS=kube-system CONTAINER=blob @@ -49,11 +49,6 @@ kubectl get pods -n${NS} -l${LABEL} \ | awk 'NR>1 {print $1}' \ | xargs -I {} kubectl logs {} --prefix -c${CONTAINER} -n${NS} -echo "print out cloudprovider_azure metrics ..." -echo "======================================================================================" -ip=`kubectl get svc csi-$DRIVER-controller -n kube-system | awk '{print $4}'` -curl http://$ip:29634/metrics - if [ -n "$ENABLE_BLOBFUSE_PROXY" ]; then echo "print out install-blobfuse-proxy logs ..." echo "======================================================================================" @@ -64,4 +59,12 @@ if [ -n "$ENABLE_BLOBFUSE_PROXY" ]; then | xargs -I {} kubectl logs {} --prefix -c${PROXY} -n${NS} fi - +echo "======================================================================================" +ip=`kubectl get svc csi-$DRIVER-controller -n kube-system | awk '{print $4}'` +if [ -n "$ip" ]; then + echo "print out cloudprovider_azure metrics ..." + curl http://$ip:29634/metrics +else + echo "csi-$DRIVER-controller service ip is empty" + kubectl get svc csi-$DRIVER-controller -n kube-system +fi From 9db3c7db85d271742fcbd0ba56d51837634d71fb Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Thu, 12 Oct 2023 11:17:41 +0000 Subject: [PATCH 02/11] test: fix external e2e test --- test/external-e2e/testdriver-blobfuse.yaml | 4 ++-- test/external-e2e/testdriver-nfs.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/external-e2e/testdriver-blobfuse.yaml b/test/external-e2e/testdriver-blobfuse.yaml index bd67c32469..d1ee6a0172 100644 --- a/test/external-e2e/testdriver-blobfuse.yaml +++ b/test/external-e2e/testdriver-blobfuse.yaml @@ -5,7 +5,7 @@ ShortName: blobfuse StorageClass: FromFile: /tmp/csi/storageclass.yaml DriverInfo: - Name: test.csi.azure.com + Name: blob.csi.azure.com Capabilities: persistence: true exec: true @@ -16,4 +16,4 @@ DriverInfo: controllerExpansion: true nodeExpansion: true volumeLimits: false - snapshotDataSource: false \ No newline at end of file + snapshotDataSource: false diff --git a/test/external-e2e/testdriver-nfs.yaml b/test/external-e2e/testdriver-nfs.yaml index a26a3d4325..2bbfa33b5f 100644 --- a/test/external-e2e/testdriver-nfs.yaml +++ b/test/external-e2e/testdriver-nfs.yaml @@ -5,7 +5,7 @@ ShortName: blobfuse StorageClass: FromFile: /tmp/csi/storageclass.yaml DriverInfo: - Name: test.csi.azure.com + Name: blob.csi.azure.com Capabilities: persistence: true exec: true From af21c755fd3b07618c935b9721817b081813aa00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:54:33 +0000 Subject: [PATCH 03/11] chore(deps): bump github.com/onsi/ginkgo/v2 from 2.11.0 to 2.13.0 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.11.0 to 2.13.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.11.0...v2.13.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 +- go.sum | 10 +- vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md | 29 ++++++ vendor/github.com/onsi/ginkgo/v2/README.md | 6 +- vendor/github.com/onsi/ginkgo/v2/core_dsl.go | 94 ++++++++++++++----- .../onsi/ginkgo/v2/ginkgo/outline/ginkgo.go | 4 +- .../onsi/ginkgo/v2/internal/global/init.go | 11 +++ .../onsi/ginkgo/v2/internal/group.go | 5 +- .../onsi/ginkgo/v2/internal/node.go | 10 +- .../onsi/ginkgo/v2/internal/suite.go | 24 +++++ .../onsi/ginkgo/v2/internal/writer.go | 6 +- .../github.com/onsi/ginkgo/v2/types/config.go | 1 + .../github.com/onsi/ginkgo/v2/types/errors.go | 4 +- .../github.com/onsi/ginkgo/v2/types/types.go | 4 +- .../onsi/ginkgo/v2/types/version.go | 2 +- .../x/tools/go/ast/inspector/inspector.go | 4 +- .../x/tools/internal/typeparams/common.go | 26 +++++ .../internal/typeparams/typeparams_go117.go | 2 +- .../internal/typeparams/typeparams_go118.go | 2 +- vendor/modules.txt | 4 +- 20 files changed, 198 insertions(+), 54 deletions(-) diff --git a/go.mod b/go.mod index 49e0798530..bce388c3b7 100644 --- a/go.mod +++ b/go.mod @@ -39,7 +39,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1 github.com/go-ini/ini v1.67.0 github.com/jongio/azidext/go/azidext v0.4.0 - github.com/onsi/ginkgo/v2 v2.11.0 + github.com/onsi/ginkgo/v2 v2.13.0 github.com/pkg/errors v0.9.1 github.com/satori/go.uuid v1.2.0 k8s.io/apiserver v0.28.1 @@ -133,7 +133,7 @@ require ( golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.9.3 // indirect + golang.org/x/tools v0.12.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect diff --git a/go.sum b/go.sum index ac2a1acc7b..72f6f2118c 100644 --- a/go.sum +++ b/go.sum @@ -295,8 +295,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -451,7 +451,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -612,8 +612,8 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md b/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md index cb72bd6f2b..fea67526e0 100644 --- a/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md +++ b/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md @@ -1,3 +1,32 @@ +## 2.13.0 + +### Features + +Add PreviewSpect() to enable programmatic preview access to the suite report (fixes #1225) + +## 2.12.1 + +### Fixes +- Print logr prefix if it exists (#1275) [90d4846] + +### Maintenance +- Bump actions/checkout from 3 to 4 (#1271) [555f543] +- Bump golang.org/x/sys from 0.11.0 to 0.12.0 (#1270) [d867b7d] + +## 2.12.0 + +### Features + +- feat: allow MustPassRepeatedly decorator to be set at suite level (#1266) [05de518] + +### Fixes + +- fix-errors-in-readme (#1244) [27c2f5d] + +### Maintenance + +Various chores/dependency bumps. + ## 2.11.0 In prior versions of Ginkgo specs the CLI filter flags (e.g. `--focus`, `--label-filter`) would _override_ any programmatic focus. This behavior has proved surprising and confusing in at least the following ways: diff --git a/vendor/github.com/onsi/ginkgo/v2/README.md b/vendor/github.com/onsi/ginkgo/v2/README.md index d0473a467c..cb23ffdf6a 100644 --- a/vendor/github.com/onsi/ginkgo/v2/README.md +++ b/vendor/github.com/onsi/ginkgo/v2/README.md @@ -15,7 +15,7 @@ import ( ... ) -Describe("Checking books out of the library", Label("library"), func() { +var _ = Describe("Checking books out of the library", Label("library"), func() { var library *libraries.Library var book *books.Book var valjean *users.User @@ -50,7 +50,7 @@ Describe("Checking books out of the library", Label("library"), func() { It("tells the user", func(ctx SpecContext) { err := valjean.Checkout(ctx, library, "Les Miserables") - Expect(error).To(MatchError("Les Miserables is currently checked out")) + Expect(err).To(MatchError("Les Miserables is currently checked out")) }, SpecTimeout(time.Second * 5)) It("lets the user place a hold and get notified later", func(ctx SpecContext) { @@ -74,7 +74,7 @@ Describe("Checking books out of the library", Label("library"), func() { When("the library does not have the book in question", func() { It("tells the reader the book is unavailable", func(ctx SpecContext) { err := valjean.Checkout(ctx, library, "Les Miserables") - Expect(error).To(MatchError("Les Miserables is not in the library catalog")) + Expect(err).To(MatchError("Les Miserables is not in the library catalog")) }, SpecTimeout(time.Second * 5)) }) }) diff --git a/vendor/github.com/onsi/ginkgo/v2/core_dsl.go b/vendor/github.com/onsi/ginkgo/v2/core_dsl.go index a244bdc180..2d7a70eccb 100644 --- a/vendor/github.com/onsi/ginkgo/v2/core_dsl.go +++ b/vendor/github.com/onsi/ginkgo/v2/core_dsl.go @@ -248,31 +248,13 @@ func RunSpecs(t GinkgoTestingT, description string, args ...interface{}) bool { exitIfErr(types.GinkgoErrors.RerunningSuite()) } suiteDidRun = true - - suiteLabels := Labels{} - configErrors := []error{} - for _, arg := range args { - switch arg := arg.(type) { - case types.SuiteConfig: - suiteConfig = arg - case types.ReporterConfig: - reporterConfig = arg - case Labels: - suiteLabels = append(suiteLabels, arg...) - default: - configErrors = append(configErrors, types.GinkgoErrors.UnknownTypePassedToRunSpecs(arg)) - } + err := global.PushClone() + if err != nil { + exitIfErr(err) } - exitIfErrors(configErrors) + defer global.PopClone() - configErrors = types.VetConfig(flagSet, suiteConfig, reporterConfig) - if len(configErrors) > 0 { - fmt.Fprintf(formatter.ColorableStdErr, formatter.F("{{red}}Ginkgo detected configuration issues:{{/}}\n")) - for _, err := range configErrors { - fmt.Fprintf(formatter.ColorableStdErr, err.Error()) - } - os.Exit(1) - } + suiteLabels := extractSuiteConfiguration(args) var reporter reporters.Reporter if suiteConfig.ParallelTotal == 1 { @@ -308,9 +290,8 @@ func RunSpecs(t GinkgoTestingT, description string, args ...interface{}) bool { registerReportAfterSuiteNodeForAutogeneratedReports(reporterConfig) } - err := global.Suite.BuildTree() + err = global.Suite.BuildTree() exitIfErr(err) - suitePath, err := os.Getwd() exitIfErr(err) suitePath, err = filepath.Abs(suitePath) @@ -335,6 +316,69 @@ func RunSpecs(t GinkgoTestingT, description string, args ...interface{}) bool { return passed } +func extractSuiteConfiguration(args []interface{}) Labels { + suiteLabels := Labels{} + configErrors := []error{} + for _, arg := range args { + switch arg := arg.(type) { + case types.SuiteConfig: + suiteConfig = arg + case types.ReporterConfig: + reporterConfig = arg + case Labels: + suiteLabels = append(suiteLabels, arg...) + default: + configErrors = append(configErrors, types.GinkgoErrors.UnknownTypePassedToRunSpecs(arg)) + } + } + exitIfErrors(configErrors) + + configErrors = types.VetConfig(flagSet, suiteConfig, reporterConfig) + if len(configErrors) > 0 { + fmt.Fprintf(formatter.ColorableStdErr, formatter.F("{{red}}Ginkgo detected configuration issues:{{/}}\n")) + for _, err := range configErrors { + fmt.Fprintf(formatter.ColorableStdErr, err.Error()) + } + os.Exit(1) + } + + return suiteLabels +} + +/* +PreviewSpecs walks the testing tree and produces a report without actually invoking the specs. +See http://onsi.github.io/ginkgo/#previewing-specs for more information. +*/ +func PreviewSpecs(description string, args ...any) Report { + err := global.PushClone() + if err != nil { + exitIfErr(err) + } + defer global.PopClone() + + suiteLabels := extractSuiteConfiguration(args) + priorDryRun, priorParallelTotal, priorParallelProcess := suiteConfig.DryRun, suiteConfig.ParallelTotal, suiteConfig.ParallelProcess + suiteConfig.DryRun, suiteConfig.ParallelTotal, suiteConfig.ParallelProcess = true, 1, 1 + defer func() { + suiteConfig.DryRun, suiteConfig.ParallelTotal, suiteConfig.ParallelProcess = priorDryRun, priorParallelTotal, priorParallelProcess + }() + reporter := reporters.NoopReporter{} + outputInterceptor = internal.NoopOutputInterceptor{} + client = nil + writer := GinkgoWriter.(*internal.Writer) + + err = global.Suite.BuildTree() + exitIfErr(err) + suitePath, err := os.Getwd() + exitIfErr(err) + suitePath, err = filepath.Abs(suitePath) + exitIfErr(err) + + global.Suite.Run(description, suiteLabels, suitePath, global.Failer, reporter, writer, outputInterceptor, interrupt_handler.NewInterruptHandler(client), client, internal.RegisterForProgressSignal, suiteConfig) + + return global.Suite.GetPreviewReport() +} + /* Skip instructs Ginkgo to skip the current spec diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go index 0b9b19fe74..958daccbfa 100644 --- a/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go @@ -244,9 +244,7 @@ func labelFromCallExpr(ce *ast.CallExpr) []string { } if id.Name == "Label" { ls := extractLabels(expr) - for _, label := range ls { - labels = append(labels, label) - } + labels = append(labels, ls...) } } } diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/global/init.go b/vendor/github.com/onsi/ginkgo/v2/internal/global/init.go index f2c0fd89c0..464e3c97ff 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/global/init.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/global/init.go @@ -6,6 +6,7 @@ import ( var Suite *internal.Suite var Failer *internal.Failer +var backupSuite *internal.Suite func init() { InitializeGlobals() @@ -15,3 +16,13 @@ func InitializeGlobals() { Failer = internal.NewFailer() Suite = internal.NewSuite() } + +func PushClone() error { + var err error + backupSuite, err = Suite.Clone() + return err +} + +func PopClone() { + Suite = backupSuite +} diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/group.go b/vendor/github.com/onsi/ginkgo/v2/internal/group.go index ae1b7b0112..02c9fe4fcd 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/group.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/group.go @@ -321,7 +321,10 @@ func (g *group) run(specs Specs) { if !skip { var maxAttempts = 1 - if g.suite.currentSpecReport.MaxMustPassRepeatedly > 0 { + if g.suite.config.MustPassRepeatedly > 0 { + maxAttempts = g.suite.config.MustPassRepeatedly + g.suite.currentSpecReport.MaxMustPassRepeatedly = maxAttempts + } else if g.suite.currentSpecReport.MaxMustPassRepeatedly > 0 { maxAttempts = max(1, spec.MustPassRepeatedly()) } else if g.suite.config.FlakeAttempts > 0 { maxAttempts = g.suite.config.FlakeAttempts diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/node.go b/vendor/github.com/onsi/ginkgo/v2/internal/node.go index 14c7cf54ed..16f0dc2278 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/node.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/node.go @@ -597,12 +597,16 @@ func (n Node) IsZero() bool { /* Nodes */ type Nodes []Node +func (n Nodes) Clone() Nodes { + nodes := make(Nodes, len(n)) + copy(nodes, n) + return nodes +} + func (n Nodes) CopyAppend(nodes ...Node) Nodes { numN := len(n) out := make(Nodes, numN+len(nodes)) - for i, node := range n { - out[i] = node - } + copy(out, n) for j, node := range nodes { out[numN+j] = node } diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/suite.go b/vendor/github.com/onsi/ginkgo/v2/internal/suite.go index ea0d259d92..fe6e8288ad 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/suite.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/suite.go @@ -77,6 +77,20 @@ func NewSuite() *Suite { } } +func (suite *Suite) Clone() (*Suite, error) { + if suite.phase != PhaseBuildTopLevel { + return nil, fmt.Errorf("cnanot clone suite after tree has been built") + } + return &Suite{ + tree: &TreeNode{}, + phase: PhaseBuildTopLevel, + ProgressReporterManager: NewProgressReporterManager(), + topLevelContainers: suite.topLevelContainers.Clone(), + suiteNodes: suite.suiteNodes.Clone(), + selectiveLock: &sync.Mutex{}, + }, nil +} + func (suite *Suite) BuildTree() error { // During PhaseBuildTopLevel, the top level containers are stored in suite.topLevelCotainers and entered // We now enter PhaseBuildTree where these top level containers are entered and added to the spec tree @@ -328,6 +342,16 @@ func (suite *Suite) CurrentSpecReport() types.SpecReport { return report } +// Only valid in the preview context. In general suite.report only includes +// the specs run by _this_ node - it is only at the end of the suite that +// the parallel reports are aggregated. However in the preview context we run +// in series and +func (suite *Suite) GetPreviewReport() types.Report { + suite.selectiveLock.Lock() + defer suite.selectiveLock.Unlock() + return suite.report +} + func (suite *Suite) AddReportEntry(entry ReportEntry) error { if suite.phase != PhaseRun { return types.GinkgoErrors.AddReportEntryNotDuringRunPhase(entry.Location) diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/writer.go b/vendor/github.com/onsi/ginkgo/v2/internal/writer.go index 574f172df3..aab42d5fb3 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/writer.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/writer.go @@ -135,6 +135,10 @@ func (w *Writer) Println(a ...interface{}) { func GinkgoLogrFunc(writer *Writer) logr.Logger { return funcr.New(func(prefix, args string) { - writer.Printf("%s\n", args) + if prefix == "" { + writer.Printf("%s\n", args) + } else { + writer.Printf("%s %s\n", prefix, args) + } }, funcr.Options{}) } diff --git a/vendor/github.com/onsi/ginkgo/v2/types/config.go b/vendor/github.com/onsi/ginkgo/v2/types/config.go index 1014c7b49f..c88fc85a75 100644 --- a/vendor/github.com/onsi/ginkgo/v2/types/config.go +++ b/vendor/github.com/onsi/ginkgo/v2/types/config.go @@ -27,6 +27,7 @@ type SuiteConfig struct { FailOnPending bool FailFast bool FlakeAttempts int + MustPassRepeatedly int DryRun bool PollProgressAfter time.Duration PollProgressInterval time.Duration diff --git a/vendor/github.com/onsi/ginkgo/v2/types/errors.go b/vendor/github.com/onsi/ginkgo/v2/types/errors.go index 1e0dbfd9df..4fbdc3e9b1 100644 --- a/vendor/github.com/onsi/ginkgo/v2/types/errors.go +++ b/vendor/github.com/onsi/ginkgo/v2/types/errors.go @@ -453,8 +453,8 @@ func (g ginkgoErrors) InvalidEntryDescription(cl CodeLocation) error { func (g ginkgoErrors) MissingParametersForTableFunction(cl CodeLocation) error { return GinkgoError{ - Heading: fmt.Sprintf("No parameters have been passed to the Table Function"), - Message: fmt.Sprintf("The Table Function expected at least 1 parameter"), + Heading: "No parameters have been passed to the Table Function", + Message: "The Table Function expected at least 1 parameter", CodeLocation: cl, DocLink: "table-specs", } diff --git a/vendor/github.com/onsi/ginkgo/v2/types/types.go b/vendor/github.com/onsi/ginkgo/v2/types/types.go index d048a8adab..aae69b04c9 100644 --- a/vendor/github.com/onsi/ginkgo/v2/types/types.go +++ b/vendor/github.com/onsi/ginkgo/v2/types/types.go @@ -97,9 +97,7 @@ func (report Report) Add(other Report) Report { report.RunTime = report.EndTime.Sub(report.StartTime) reports := make(SpecReports, len(report.SpecReports)+len(other.SpecReports)) - for i := range report.SpecReports { - reports[i] = report.SpecReports[i] - } + copy(reports, report.SpecReports) offset := len(report.SpecReports) for i := range other.SpecReports { reports[i+offset] = other.SpecReports[i] diff --git a/vendor/github.com/onsi/ginkgo/v2/types/version.go b/vendor/github.com/onsi/ginkgo/v2/types/version.go index f895739b83..a37f308286 100644 --- a/vendor/github.com/onsi/ginkgo/v2/types/version.go +++ b/vendor/github.com/onsi/ginkgo/v2/types/version.go @@ -1,3 +1,3 @@ package types -const VERSION = "2.11.0" +const VERSION = "2.13.0" diff --git a/vendor/golang.org/x/tools/go/ast/inspector/inspector.go b/vendor/golang.org/x/tools/go/ast/inspector/inspector.go index 3fbfebf369..1fc1de0bd1 100644 --- a/vendor/golang.org/x/tools/go/ast/inspector/inspector.go +++ b/vendor/golang.org/x/tools/go/ast/inspector/inspector.go @@ -64,8 +64,9 @@ type event struct { // depth-first order. It calls f(n) for each node n before it visits // n's children. // +// The complete traversal sequence is determined by ast.Inspect. // The types argument, if non-empty, enables type-based filtering of -// events. The function f if is called only for nodes whose type +// events. The function f is called only for nodes whose type // matches an element of the types slice. func (in *Inspector) Preorder(types []ast.Node, f func(ast.Node)) { // Because it avoids postorder calls to f, and the pruning @@ -97,6 +98,7 @@ func (in *Inspector) Preorder(types []ast.Node, f func(ast.Node)) { // of the non-nil children of the node, followed by a call of // f(n, false). // +// The complete traversal sequence is determined by ast.Inspect. // The types argument, if non-empty, enables type-based filtering of // events. The function f if is called only for nodes whose type // matches an element of the types slice. diff --git a/vendor/golang.org/x/tools/internal/typeparams/common.go b/vendor/golang.org/x/tools/internal/typeparams/common.go index cfba8189f1..d0d0649fe2 100644 --- a/vendor/golang.org/x/tools/internal/typeparams/common.go +++ b/vendor/golang.org/x/tools/internal/typeparams/common.go @@ -23,6 +23,7 @@ package typeparams import ( + "fmt" "go/ast" "go/token" "go/types" @@ -105,6 +106,31 @@ func OriginMethod(fn *types.Func) *types.Func { } orig := NamedTypeOrigin(named) gfn, _, _ := types.LookupFieldOrMethod(orig, true, fn.Pkg(), fn.Name()) + + // This is a fix for a gopls crash (#60628) due to a go/types bug (#60634). In: + // package p + // type T *int + // func (*T) f() {} + // LookupFieldOrMethod(T, true, p, f)=nil, but NewMethodSet(*T)={(*T).f}. + // Here we make them consistent by force. + // (The go/types bug is general, but this workaround is reached only + // for generic T thanks to the early return above.) + if gfn == nil { + mset := types.NewMethodSet(types.NewPointer(orig)) + for i := 0; i < mset.Len(); i++ { + m := mset.At(i) + if m.Obj().Id() == fn.Id() { + gfn = m.Obj() + break + } + } + } + + // In golang/go#61196, we observe another crash, this time inexplicable. + if gfn == nil { + panic(fmt.Sprintf("missing origin method for %s.%s; named == origin: %t, named.NumMethods(): %d, origin.NumMethods(): %d", named, fn, named == orig, named.NumMethods(), orig.NumMethods())) + } + return gfn.(*types.Func) } diff --git a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go b/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go index b4788978ff..7ed86e1711 100644 --- a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go +++ b/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go @@ -129,7 +129,7 @@ func NamedTypeArgs(*types.Named) *TypeList { } // NamedTypeOrigin is the identity method at this Go version. -func NamedTypeOrigin(named *types.Named) types.Type { +func NamedTypeOrigin(named *types.Named) *types.Named { return named } diff --git a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go b/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go index 114a36b866..cf301af1db 100644 --- a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go +++ b/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go @@ -103,7 +103,7 @@ func NamedTypeArgs(named *types.Named) *TypeList { } // NamedTypeOrigin returns named.Orig(). -func NamedTypeOrigin(named *types.Named) types.Type { +func NamedTypeOrigin(named *types.Named) *types.Named { return named.Origin() } diff --git a/vendor/modules.txt b/vendor/modules.txt index afeb119a52..8c7417a149 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -316,7 +316,7 @@ github.com/modern-go/reflect2 # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 ## explicit github.com/munnerz/goautoneg -# github.com/onsi/ginkgo/v2 v2.11.0 +# github.com/onsi/ginkgo/v2 v2.13.0 ## explicit; go 1.18 github.com/onsi/ginkgo/v2 github.com/onsi/ginkgo/v2/config @@ -595,7 +595,7 @@ golang.org/x/text/width # golang.org/x/time v0.3.0 ## explicit golang.org/x/time/rate -# golang.org/x/tools v0.9.3 +# golang.org/x/tools v0.12.0 ## explicit; go 1.18 golang.org/x/tools/go/ast/inspector golang.org/x/tools/internal/typeparams From b5f65f2ba2d1ad32b4c1ba4faa43136d8112a070 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Fri, 13 Oct 2023 03:11:57 +0000 Subject: [PATCH 04/11] test: fix test failures --- hack/verify-examples.sh | 3 --- test/utils/blob_log.sh | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/hack/verify-examples.sh b/hack/verify-examples.sh index 5174da8091..a84e059e79 100755 --- a/hack/verify-examples.sh +++ b/hack/verify-examples.sh @@ -42,9 +42,6 @@ EXAMPLES=(\ deploy/example/deployment.yaml \ deploy/example/statefulset.yaml \ deploy/example/statefulset-nonroot.yaml \ - deploy/example/deployment-nfs.yaml \ - deploy/example/statefulset-nfs.yaml \ - deploy/example/statefulset-nonroot-nfs.yaml \ ) for EXAMPLE in "${EXAMPLES[@]}"; do diff --git a/test/utils/blob_log.sh b/test/utils/blob_log.sh index bd0268b633..482220c8e8 100755 --- a/test/utils/blob_log.sh +++ b/test/utils/blob_log.sh @@ -61,7 +61,7 @@ fi echo "======================================================================================" ip=`kubectl get svc csi-$DRIVER-controller -n kube-system | awk '{print $4}'` -if [ -n "$ip" ]; then +if echo "$ip" | grep -q "\."; then echo "print out cloudprovider_azure metrics ..." curl http://$ip:29634/metrics else From 0049e363fa57631683d835c8793d2c288b185a2c Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Fri, 13 Oct 2023 14:33:13 +0000 Subject: [PATCH 05/11] cleanup: fix k8s.io/endpointslice dependency --- go.mod | 2 ++ hack/verify-gomod.sh | 2 ++ vendor/modules.txt | 2 ++ 3 files changed, 6 insertions(+) diff --git a/go.mod b/go.mod index 49e0798530..7857539536 100644 --- a/go.mod +++ b/go.mod @@ -172,6 +172,8 @@ replace ( k8s.io/controller-manager => k8s.io/controller-manager v0.28.1 k8s.io/cri-api => k8s.io/cri-api v0.28.1 k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.28.1 + k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.28.1 + k8s.io/endpointslice => k8s.io/endpointslice v0.28.1 k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.28.1 k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.28.1 k8s.io/kube-proxy => k8s.io/kube-proxy v0.28.1 diff --git a/hack/verify-gomod.sh b/hack/verify-gomod.sh index d45a265dfb..77f67ef7b2 100755 --- a/hack/verify-gomod.sh +++ b/hack/verify-gomod.sh @@ -30,3 +30,5 @@ if [[ -n "${diff}" ]]; then exit 1 fi echo "Done" + +go list -mod readonly -m all diff --git a/vendor/modules.txt b/vendor/modules.txt index afeb119a52..4bc8c2381b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1600,6 +1600,8 @@ sigs.k8s.io/yaml # k8s.io/controller-manager => k8s.io/controller-manager v0.28.1 # k8s.io/cri-api => k8s.io/cri-api v0.28.1 # k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.28.1 +# k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.28.1 +# k8s.io/endpointslice => k8s.io/endpointslice v0.28.1 # k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.28.1 # k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.28.1 # k8s.io/kube-proxy => k8s.io/kube-proxy v0.28.1 From 13aefefd16a8b8c9f94c3887226234897f82159e Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Mon, 16 Oct 2023 07:57:56 +0000 Subject: [PATCH 06/11] test: don't return error in blob_log.sh --- Makefile | 2 +- test/utils/blob_log.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 75f5239008..96e2f8c613 100644 --- a/Makefile +++ b/Makefile @@ -118,7 +118,7 @@ blob-darwin: .PHONY: container container: blob - docker build -t $(CSI_IMAGE_TAG) --output=type=docker -f ./pkg/blobplugin/Dockerfile . + docker build -t $(CSI_IMAGE_TAG) --build-arg ARCH=$(ARCH) --output=type=docker -f ./pkg/blobplugin/Dockerfile . .PHONY: container-linux container-linux: diff --git a/test/utils/blob_log.sh b/test/utils/blob_log.sh index 482220c8e8..493ee46c6d 100755 --- a/test/utils/blob_log.sh +++ b/test/utils/blob_log.sh @@ -23,6 +23,13 @@ if [[ "$#" -gt 0 ]]; then DRIVER=$1 fi +cleanup() { + echo "hit unexpected error during log print, exit 0" + exit 0 +} + +trap cleanup ERR + echo "print out all nodes status ..." kubectl get nodes -o wide echo "======================================================================================" From c8dc8b5bf81c1ff73282cd7ba1f4c5f5c9cdae15 Mon Sep 17 00:00:00 2001 From: weizhichen Date: Mon, 16 Oct 2023 08:43:26 +0000 Subject: [PATCH 07/11] support arm --- pkg/blobfuse-proxy/init.sh | 155 ++++++++++++++++++------------------- 1 file changed, 76 insertions(+), 79 deletions(-) diff --git a/pkg/blobfuse-proxy/init.sh b/pkg/blobfuse-proxy/init.sh index c0e2ff1c5c..380f2beca1 100755 --- a/pkg/blobfuse-proxy/init.sh +++ b/pkg/blobfuse-proxy/init.sh @@ -29,101 +29,98 @@ echo "Linux distribution: $DISTRIBUTION" ARCH=$($HOST_CMD uname -m) echo "Linux Arch is $(uname -m)" -if [ "${ARCH}" != "aarch64" ] +if [ "${DISTRIBUTION}" = "ubuntu" ] && { [ "${INSTALL_BLOBFUSE}" = "true" ] || [ "${INSTALL_BLOBFUSE2}" = "true" ]; } then - if [ "${DISTRIBUTION}" = "ubuntu" ] && { [ "${INSTALL_BLOBFUSE}" = "true" ] || [ "${INSTALL_BLOBFUSE2}" = "true" ]; } + release=$($HOST_CMD lsb_release -rs) + echo "Ubuntu release: $release" + + if [ "$(expr "$release" \< "22.04")" -eq 1 ] then - release=$($HOST_CMD lsb_release -rs) - echo "Ubuntu release: $release" - - if [ "$(expr "$release" \< "22.04")" -eq 1 ] - then - cp /blobfuse-proxy/packages-microsoft-prod-18.04.deb /host/etc/packages-microsoft-prod.deb + cp /blobfuse-proxy/packages-microsoft-prod-18.04.deb /host/etc/packages-microsoft-prod.deb + else + cp /blobfuse-proxy/packages-microsoft-prod-22.04.deb /host/etc/packages-microsoft-prod.deb + fi + + # when running dpkg -i /etc/packages-microsoft-prod.deb, need to enter y to continue. + # refer to https://stackoverflow.com/questions/45349571/how-to-install-deb-with-dpkg-non-interactively + yes | $HOST_CMD dpkg -i /etc/packages-microsoft-prod.deb && $HOST_CMD apt update + + pkg_list="" + if [ "${INSTALL_BLOBFUSE}" = "true" ] && [ "$(expr "$release" \< "22.04")" -eq 1 ] + then + pkg_list="${pkg_list} fuse" + # install blobfuse with latest version or specific version + if [ -z "${BLOBFUSE_VERSION}" ]; then + echo "install blobfuse with latest version" + pkg_list="${pkg_list} blobfuse" else - cp /blobfuse-proxy/packages-microsoft-prod-22.04.deb /host/etc/packages-microsoft-prod.deb + pkg_list="${pkg_list} blobfuse=${BLOBFUSE_VERSION}" fi - - # when running dpkg -i /etc/packages-microsoft-prod.deb, need to enter y to continue. - # refer to https://stackoverflow.com/questions/45349571/how-to-install-deb-with-dpkg-non-interactively - yes | $HOST_CMD dpkg -i /etc/packages-microsoft-prod.deb && $HOST_CMD apt update - - pkg_list="" - if [ "${INSTALL_BLOBFUSE}" = "true" ] && [ "$(expr "$release" \< "22.04")" -eq 1 ] - then + fi + + if [ "${INSTALL_BLOBFUSE2}" = "true" ] + then + if [ "$(expr "$release" \< "22.04")" -eq 1 ]; then + echo "install fuse for blobfuse2" pkg_list="${pkg_list} fuse" - # install blobfuse with latest version or specific version - if [ -z "${BLOBFUSE_VERSION}" ]; then - echo "install blobfuse with latest version" - pkg_list="${pkg_list} blobfuse" - else - pkg_list="${pkg_list} blobfuse=${BLOBFUSE_VERSION}" - fi + else + echo "install fuse3 for blobfuse2, current release is $release" + pkg_list="${pkg_list} fuse3" fi - if [ "${INSTALL_BLOBFUSE2}" = "true" ] - then - if [ "$(expr "$release" \< "22.04")" -eq 1 ]; then - echo "install fuse for blobfuse2" - pkg_list="${pkg_list} fuse" - else - echo "install fuse3 for blobfuse2, current release is $release" - pkg_list="${pkg_list} fuse3" - fi - - # install blobfuse2 with latest version or specific version - if [ -z "${BLOBFUSE2_VERSION}" ]; then - echo "install blobfuse2 with latest version" - pkg_list="${pkg_list} blobfuse2" - else - pkg_list="${pkg_list} blobfuse2=${BLOBFUSE2_VERSION}" - fi + # install blobfuse2 with latest version or specific version + if [ -z "${BLOBFUSE2_VERSION}" ]; then + echo "install blobfuse2 with latest version" + pkg_list="${pkg_list} blobfuse2" + else + pkg_list="${pkg_list} blobfuse2=${BLOBFUSE2_VERSION}" fi - echo "begin to install ${pkg_list}" - $HOST_CMD apt-get install -y $pkg_list - $HOST_CMD rm -f /etc/packages-microsoft-prod.deb fi + echo "begin to install ${pkg_list}" + $HOST_CMD apt-get install -y $pkg_list + $HOST_CMD rm -f /etc/packages-microsoft-prod.deb +fi - updateBlobfuseProxy="true" - if [ -f "/host/usr/bin/blobfuse-proxy" ];then - old=$(sha256sum /host/usr/bin/blobfuse-proxy | awk '{print $1}') - new=$(sha256sum /blobfuse-proxy/blobfuse-proxy | awk '{print $1}') - if [ "$old" = "$new" ];then - updateBlobfuseProxy="false" - echo "no need to update blobfuse-proxy" - fi +updateBlobfuseProxy="true" +if [ -f "/host/usr/bin/blobfuse-proxy" ];then + old=$(sha256sum /host/usr/bin/blobfuse-proxy | awk '{print $1}') + new=$(sha256sum /blobfuse-proxy/blobfuse-proxy | awk '{print $1}') + if [ "$old" = "$new" ];then + updateBlobfuseProxy="false" + echo "no need to update blobfuse-proxy" fi +fi - if [ "$updateBlobfuseProxy" = "true" ];then - echo "copy blobfuse-proxy...." - rm -rf /host/var/lib/kubelet/plugins/blob.csi.azure.com/blobfuse-proxy.sock - rm -rf /host/usr/bin/blobfuse-proxy - cp /blobfuse-proxy/blobfuse-proxy /host/usr/bin/blobfuse-proxy - chmod 755 /host/usr/bin/blobfuse-proxy - fi +if [ "$updateBlobfuseProxy" = "true" ];then + echo "copy blobfuse-proxy...." + rm -rf /host/var/lib/kubelet/plugins/blob.csi.azure.com/blobfuse-proxy.sock + rm -rf /host/usr/bin/blobfuse-proxy + cp /blobfuse-proxy/blobfuse-proxy /host/usr/bin/blobfuse-proxy + chmod 755 /host/usr/bin/blobfuse-proxy +fi - updateService="true" - if [ -f "/host/usr/lib/systemd/system/blobfuse-proxy.service" ];then - old=$(sha256sum /host/usr/lib/systemd/system/blobfuse-proxy.service | awk '{print $1}') - new=$(sha256sum /blobfuse-proxy/blobfuse-proxy.service | awk '{print $1}') - if [ "$old" = "$new" ];then - updateService="false" - echo "no need to update blobfuse-proxy.service" - fi +updateService="true" +if [ -f "/host/usr/lib/systemd/system/blobfuse-proxy.service" ];then + old=$(sha256sum /host/usr/lib/systemd/system/blobfuse-proxy.service | awk '{print $1}') + new=$(sha256sum /blobfuse-proxy/blobfuse-proxy.service | awk '{print $1}') + if [ "$old" = "$new" ];then + updateService="false" + echo "no need to update blobfuse-proxy.service" fi +fi - if [ "$updateService" = "true" ];then - echo "copy blobfuse-proxy.service...." - mkdir -p /host/usr/lib/systemd/system - cp /blobfuse-proxy/blobfuse-proxy.service /host/usr/lib/systemd/system/blobfuse-proxy.service - fi +if [ "$updateService" = "true" ];then + echo "copy blobfuse-proxy.service...." + mkdir -p /host/usr/lib/systemd/system + cp /blobfuse-proxy/blobfuse-proxy.service /host/usr/lib/systemd/system/blobfuse-proxy.service +fi - if [ "${INSTALL_BLOBFUSE_PROXY}" = "true" ];then - if [ "$updateBlobfuseProxy" = "true" ] || [ "$updateService" = "true" ];then - echo "start blobfuse-proxy...." - $HOST_CMD systemctl daemon-reload - $HOST_CMD systemctl enable blobfuse-proxy.service - $HOST_CMD systemctl restart blobfuse-proxy.service - fi +if [ "${INSTALL_BLOBFUSE_PROXY}" = "true" ];then + if [ "$updateBlobfuseProxy" = "true" ] || [ "$updateService" = "true" ];then + echo "start blobfuse-proxy...." + $HOST_CMD systemctl daemon-reload + $HOST_CMD systemctl enable blobfuse-proxy.service + $HOST_CMD systemctl restart blobfuse-proxy.service fi fi From 227395582dfe559c0c807f688dc3bde0bab66f26 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Mon, 16 Oct 2023 11:31:01 +0000 Subject: [PATCH 08/11] fix: nfs volume creation failure due to global storage ep enabled --- pkg/blob/azure.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/blob/azure.go b/pkg/blob/azure.go index 3d23ed04a1..2424ab6410 100644 --- a/pkg/blob/azure.go +++ b/pkg/blob/azure.go @@ -34,6 +34,7 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" "k8s.io/klog/v2" + "k8s.io/utils/pointer" azure "sigs.k8s.io/cloud-provider-azure/pkg/provider" providerconfig "sigs.k8s.io/cloud-provider-azure/pkg/provider/config" @@ -240,7 +241,7 @@ func (d *Driver) updateSubnetServiceEndpoints(ctx context.Context, vnetResourceG } serviceEndpoints := *subnet.SubnetPropertiesFormat.ServiceEndpoints for _, v := range serviceEndpoints { - if v.Service != nil && *v.Service == storageService { + if strings.HasPrefix(pointer.StringDeref(v.Service, ""), storageService) { storageServiceExists = true klog.V(4).Infof("serviceEndpoint(%s) is already in subnet(%s)", storageService, subnetName) break From cd5ab9e6069eb26c523cd662e71b6ee66faafd68 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 16:21:08 +0000 Subject: [PATCH 09/11] chore(deps): bump github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault Bumps [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault](https://github.com/Azure/azure-sdk-for-go) from 1.0.0 to 1.2.0. - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/v1.0...v1.2) --- updated-dependencies: - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 6 +- .../keyvault/armkeyvault/CHANGELOG.md | 1117 +---- .../keyvault/armkeyvault/README.md | 18 +- .../keyvault/armkeyvault/assets.json | 6 + .../keyvault/armkeyvault/autorest.md | 8 +- .../keyvault/armkeyvault/build.go | 2 +- .../keyvault/armkeyvault/client_factory.go | 95 + ...zz_generated_constants.go => constants.go} | 111 +- ...enerated_keys_client.go => keys_client.go} | 117 +- .../armkeyvault/managedhsmkeys_client.go | 394 ++ ...edhsms_client.go => managedhsms_client.go} | 246 +- ... mhsmprivateendpointconnections_client.go} | 110 +- ....go => mhsmprivatelinkresources_client.go} | 43 +- .../armkeyvault/mhsmregions_client.go | 116 + .../{zz_generated_models.go => models.go} | 357 +- .../keyvault/armkeyvault/models_serde.go | 3750 +++++++++++++++++ ...rations_client.go => operations_client.go} | 34 +- ...o => privateendpointconnections_client.go} | 110 +- ...ient.go => privatelinkresources_client.go} | 43 +- ...ed_response_types.go => response_types.go} | 78 +- ...ed_secrets_client.go => secrets_client.go} | 98 +- ...erated_time_rfc3339.go => time_rfc3339.go} | 3 +- ...zz_generated_time_unix.go => time_unix.go} | 3 +- ...ated_vaults_client.go => vaults_client.go} | 226 +- .../armkeyvault/zz_generated_models_serde.go | 581 --- vendor/modules.txt | 2 +- 27 files changed, 5433 insertions(+), 2243 deletions(-) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/assets.json create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go rename vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/{zz_generated_constants.go => constants.go} (81%) rename vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/{zz_generated_keys_client.go => keys_client.go} (80%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsmkeys_client.go rename vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/{zz_generated_managedhsms_client.go => managedhsms_client.go} (75%) rename vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/{zz_generated_mhsmprivateendpointconnections_client.go => mhsmprivateendpointconnections_client.go} (81%) rename vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/{zz_generated_mhsmprivatelinkresources_client.go => mhsmprivatelinkresources_client.go} (75%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmregions_client.go rename vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/{zz_generated_models.go => models.go} (80%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go rename vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/{zz_generated_operations_client.go => operations_client.go} (75%) rename vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/{zz_generated_privateendpointconnections_client.go => privateendpointconnections_client.go} (81%) rename vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/{zz_generated_privatelinkresources_client.go => privatelinkresources_client.go} (75%) rename vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/{zz_generated_response_types.go => response_types.go} (75%) rename vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/{zz_generated_secrets_client.go => secrets_client.go} (82%) rename vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/{zz_generated_time_rfc3339.go => time_rfc3339.go} (96%) rename vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/{zz_generated_time_unix.go => time_unix.go} (94%) rename vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/{zz_generated_vaults_client.go => vaults_client.go} (84%) delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_models_serde.go diff --git a/go.mod b/go.mod index 5a06988c2f..0d1aa1a475 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.0.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1 github.com/go-ini/ini v1.67.0 github.com/jongio/azidext/go/azidext v0.4.0 diff --git a/go.sum b/go.sum index 72f6f2118c..a1a86ae095 100644 --- a/go.sum +++ b/go.sum @@ -42,9 +42,9 @@ github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybI github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.0.0 h1:lMW1lD/17LUA5z1XTURo7LcVG2ICBPlyMHjIUrcFZNQ= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.0.0 h1:Jc2KcpCDMu7wJfkrzn7fs/53QMDXH78GuqnH4HOd7zs= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.0.0/go.mod h1:PFVgFsclKzPqYRT/BiwpfUN22cab0C7FlgXR3iWpwMo= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0 h1:8d4U82r7ItT1Es91x3eUcAQweih36KWvUha8AZ9X0Rs= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0/go.mod h1:/1bkGperHinQbAHMWivoec/Ucu6//iXo6jn5mhmqCVU= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1 h1:YvQv9Mz6T8oR5ypQOL6erY0Z5t71ak1uHV4QFokCOZk= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1/go.mod h1:c6WvOhtmjNUWbLfOG1qxM/q0SPvQNSVJvolm+C52dIU= diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md index f9a7861f20..f9cd65aaaa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md @@ -1,1074 +1,65 @@ # Release History -## 1.0.0 (2022-05-16) -### Breaking Changes - -- Function `*PrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)` to `(*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)` -- Function `*ManagedHsmsClient.BeginUpdate` return value(s) have been changed from `(*armruntime.Poller[ManagedHsmsClientUpdateResponse], error)` to `(*runtime.Poller[ManagedHsmsClientUpdateResponse], error)` -- Function `*ManagedHsmsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[ManagedHsmsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[ManagedHsmsClientCreateOrUpdateResponse], error)` -- Function `*MHSMPrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[MHSMPrivateEndpointConnectionsClientDeleteResponse], error)` to `(*runtime.Poller[MHSMPrivateEndpointConnectionsClientDeleteResponse], error)` -- Function `*VaultsClient.BeginCreateOrUpdate` return value(s) have been changed from `(*armruntime.Poller[VaultsClientCreateOrUpdateResponse], error)` to `(*runtime.Poller[VaultsClientCreateOrUpdateResponse], error)` -- Function `*VaultsClient.BeginPurgeDeleted` return value(s) have been changed from `(*armruntime.Poller[VaultsClientPurgeDeletedResponse], error)` to `(*runtime.Poller[VaultsClientPurgeDeletedResponse], error)` -- Function `*ManagedHsmsClient.BeginPurgeDeleted` return value(s) have been changed from `(*armruntime.Poller[ManagedHsmsClientPurgeDeletedResponse], error)` to `(*runtime.Poller[ManagedHsmsClientPurgeDeletedResponse], error)` -- Function `*ManagedHsmsClient.BeginDelete` return value(s) have been changed from `(*armruntime.Poller[ManagedHsmsClientDeleteResponse], error)` to `(*runtime.Poller[ManagedHsmsClientDeleteResponse], error)` -- Const `JSONWebKeyOperationRelease` has been removed -- Const `KeyPermissionsRotate` has been removed -- Const `KeyPermissionsRelease` has been removed -- Const `KeyRotationPolicyActionTypeRotate` has been removed -- Const `KeyPermissionsGetrotationpolicy` has been removed -- Const `KeyPermissionsSetrotationpolicy` has been removed -- Const `KeyRotationPolicyActionTypeNotify` has been removed -- Function `DeletedManagedHsmProperties.MarshalJSON` has been removed -- Function `RotationPolicy.MarshalJSON` has been removed -- Function `PrivateLinkResourceListResult.MarshalJSON` has been removed -- Function `ServiceSpecification.MarshalJSON` has been removed -- Function `MHSMPrivateLinkResourceListResult.MarshalJSON` has been removed -- Function `MHSMPrivateEndpointConnectionsListResult.MarshalJSON` has been removed -- Function `ResourceListResult.MarshalJSON` has been removed -- Function `DeletedVaultListResult.MarshalJSON` has been removed -- Function `SecretListResult.MarshalJSON` has been removed -- Function `PossibleKeyRotationPolicyActionTypeValues` has been removed -- Function `OperationListResult.MarshalJSON` has been removed -- Function `KeyReleasePolicy.MarshalJSON` has been removed -- Function `KeyListResult.MarshalJSON` has been removed -- Function `PrivateEndpointConnectionListResult.MarshalJSON` has been removed -- Function `VaultListResult.MarshalJSON` has been removed -- Function `DeletedVaultProperties.MarshalJSON` has been removed -- Function `MetricSpecification.MarshalJSON` has been removed -- Function `ManagedHsmListResult.MarshalJSON` has been removed -- Function `DeletedManagedHsmListResult.MarshalJSON` has been removed -- Function `Vault.MarshalJSON` has been removed -- Function `*KeyReleasePolicy.UnmarshalJSON` has been removed -- Struct `Action` has been removed -- Struct `KeyReleasePolicy` has been removed -- Struct `KeyRotationPolicyAttributes` has been removed -- Struct `LifetimeAction` has been removed -- Struct `RotationPolicy` has been removed -- Struct `Trigger` has been removed -- Field `ReleasePolicy` of struct `KeyProperties` has been removed -- Field `RotationPolicy` of struct `KeyProperties` has been removed - - -## 0.5.0 (2022-04-15) -### Breaking Changes - -- Function `*MHSMPrivateEndpointConnectionsClient.ListByResource` has been removed -- Function `*ManagedHsmsClient.ListDeleted` has been removed -- Function `*VaultsClient.ListDeleted` has been removed -- Function `*VaultsClient.ListByResourceGroup` has been removed -- Function `*PrivateEndpointConnectionsClient.ListByResource` has been removed -- Function `*VaultsClient.List` has been removed -- Function `*OperationsClient.List` has been removed -- Function `*SecretsClient.List` has been removed -- Function `*ManagedHsmsClient.ListByResourceGroup` has been removed -- Function `*KeysClient.List` has been removed -- Function `*ManagedHsmsClient.ListBySubscription` has been removed -- Function `*KeysClient.ListVersions` has been removed -- Function `*VaultsClient.ListBySubscription` has been removed - +## 1.2.0 (2023-04-28) ### Features Added -- New function `*OperationsClient.NewListPager(*OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]` -- New function `*VaultsClient.NewListDeletedPager(*VaultsClientListDeletedOptions) *runtime.Pager[VaultsClientListDeletedResponse]` -- New function `*VaultsClient.NewListPager(*VaultsClientListOptions) *runtime.Pager[VaultsClientListResponse]` -- New function `*SecretsClient.NewListPager(string, string, *SecretsClientListOptions) *runtime.Pager[SecretsClientListResponse]` -- New function `*KeysClient.NewListVersionsPager(string, string, string, *KeysClientListVersionsOptions) *runtime.Pager[KeysClientListVersionsResponse]` -- New function `*ManagedHsmsClient.NewListBySubscriptionPager(*ManagedHsmsClientListBySubscriptionOptions) *runtime.Pager[ManagedHsmsClientListBySubscriptionResponse]` -- New function `*ManagedHsmsClient.NewListByResourceGroupPager(string, *ManagedHsmsClientListByResourceGroupOptions) *runtime.Pager[ManagedHsmsClientListByResourceGroupResponse]` -- New function `*PrivateEndpointConnectionsClient.NewListByResourcePager(string, string, *PrivateEndpointConnectionsClientListByResourceOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByResourceResponse]` -- New function `*KeysClient.NewListPager(string, string, *KeysClientListOptions) *runtime.Pager[KeysClientListResponse]` -- New function `*MHSMPrivateEndpointConnectionsClient.NewListByResourcePager(string, string, *MHSMPrivateEndpointConnectionsClientListByResourceOptions) *runtime.Pager[MHSMPrivateEndpointConnectionsClientListByResourceResponse]` -- New function `*VaultsClient.NewListBySubscriptionPager(*VaultsClientListBySubscriptionOptions) *runtime.Pager[VaultsClientListBySubscriptionResponse]` -- New function `*ManagedHsmsClient.NewListDeletedPager(*ManagedHsmsClientListDeletedOptions) *runtime.Pager[ManagedHsmsClientListDeletedResponse]` -- New function `*VaultsClient.NewListByResourceGroupPager(string, *VaultsClientListByResourceGroupOptions) *runtime.Pager[VaultsClientListByResourceGroupResponse]` - - -## 0.4.0 (2022-04-14) -### Breaking Changes - -- Function `*MHSMPrivateEndpointConnectionsClient.ListByResource` return value(s) have been changed from `(*MHSMPrivateEndpointConnectionsClientListByResourcePager)` to `(*runtime.Pager[MHSMPrivateEndpointConnectionsClientListByResourceResponse])` -- Function `*PrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(PrivateEndpointConnectionsClientDeletePollerResponse, error)` to `(*armruntime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)` -- Function `*ManagedHsmsClient.BeginPurgeDeleted` return value(s) have been changed from `(ManagedHsmsClientPurgeDeletedPollerResponse, error)` to `(*armruntime.Poller[ManagedHsmsClientPurgeDeletedResponse], error)` -- Function `*MHSMPrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(MHSMPrivateEndpointConnectionsClientDeletePollerResponse, error)` to `(*armruntime.Poller[MHSMPrivateEndpointConnectionsClientDeleteResponse], error)` -- Function `*ManagedHsmsClient.ListDeleted` return value(s) have been changed from `(*ManagedHsmsClientListDeletedPager)` to `(*runtime.Pager[ManagedHsmsClientListDeletedResponse])` -- Function `NewOperationsClient` return value(s) have been changed from `(*OperationsClient)` to `(*OperationsClient, error)` -- Function `*KeysClient.ListVersions` return value(s) have been changed from `(*KeysClientListVersionsPager)` to `(*runtime.Pager[KeysClientListVersionsResponse])` -- Function `*VaultsClient.ListByResourceGroup` return value(s) have been changed from `(*VaultsClientListByResourceGroupPager)` to `(*runtime.Pager[VaultsClientListByResourceGroupResponse])` -- Function `*VaultsClient.BeginCreateOrUpdate` return value(s) have been changed from `(VaultsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VaultsClientCreateOrUpdateResponse], error)` -- Function `*VaultsClient.ListBySubscription` return value(s) have been changed from `(*VaultsClientListBySubscriptionPager)` to `(*runtime.Pager[VaultsClientListBySubscriptionResponse])` -- Function `*SecretsClient.List` return value(s) have been changed from `(*SecretsClientListPager)` to `(*runtime.Pager[SecretsClientListResponse])` -- Function `*VaultsClient.ListDeleted` return value(s) have been changed from `(*VaultsClientListDeletedPager)` to `(*runtime.Pager[VaultsClientListDeletedResponse])` -- Function `*ManagedHsmsClient.ListByResourceGroup` return value(s) have been changed from `(*ManagedHsmsClientListByResourceGroupPager)` to `(*runtime.Pager[ManagedHsmsClientListByResourceGroupResponse])` -- Function `*ManagedHsmsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ManagedHsmsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ManagedHsmsClientCreateOrUpdateResponse], error)` -- Function `*ManagedHsmsClient.ListBySubscription` return value(s) have been changed from `(*ManagedHsmsClientListBySubscriptionPager)` to `(*runtime.Pager[ManagedHsmsClientListBySubscriptionResponse])` -- Function `*ManagedHsmsClient.BeginDelete` return value(s) have been changed from `(ManagedHsmsClientDeletePollerResponse, error)` to `(*armruntime.Poller[ManagedHsmsClientDeleteResponse], error)` -- Function `NewSecretsClient` return value(s) have been changed from `(*SecretsClient)` to `(*SecretsClient, error)` -- Function `NewKeysClient` return value(s) have been changed from `(*KeysClient)` to `(*KeysClient, error)` -- Function `NewPrivateLinkResourcesClient` return value(s) have been changed from `(*PrivateLinkResourcesClient)` to `(*PrivateLinkResourcesClient, error)` -- Function `*ManagedHsmsClient.BeginUpdate` return value(s) have been changed from `(ManagedHsmsClientUpdatePollerResponse, error)` to `(*armruntime.Poller[ManagedHsmsClientUpdateResponse], error)` -- Function `*PrivateEndpointConnectionsClient.ListByResource` return value(s) have been changed from `(*PrivateEndpointConnectionsClientListByResourcePager)` to `(*runtime.Pager[PrivateEndpointConnectionsClientListByResourceResponse])` -- Function `NewManagedHsmsClient` return value(s) have been changed from `(*ManagedHsmsClient)` to `(*ManagedHsmsClient, error)` -- Function `NewPrivateEndpointConnectionsClient` return value(s) have been changed from `(*PrivateEndpointConnectionsClient)` to `(*PrivateEndpointConnectionsClient, error)` -- Function `NewMHSMPrivateLinkResourcesClient` return value(s) have been changed from `(*MHSMPrivateLinkResourcesClient)` to `(*MHSMPrivateLinkResourcesClient, error)` -- Function `NewMHSMPrivateEndpointConnectionsClient` return value(s) have been changed from `(*MHSMPrivateEndpointConnectionsClient)` to `(*MHSMPrivateEndpointConnectionsClient, error)` -- Function `*KeysClient.List` return value(s) have been changed from `(*KeysClientListPager)` to `(*runtime.Pager[KeysClientListResponse])` -- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsClientListPager)` to `(*runtime.Pager[OperationsClientListResponse])` -- Function `*VaultsClient.List` return value(s) have been changed from `(*VaultsClientListPager)` to `(*runtime.Pager[VaultsClientListResponse])` -- Function `NewVaultsClient` return value(s) have been changed from `(*VaultsClient)` to `(*VaultsClient, error)` -- Function `*VaultsClient.BeginPurgeDeleted` return value(s) have been changed from `(VaultsClientPurgeDeletedPollerResponse, error)` to `(*armruntime.Poller[VaultsClientPurgeDeletedResponse], error)` -- Function `PrivateEndpointConnectionsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*VaultsClientListDeletedPager.NextPage` has been removed -- Function `*VaultsClientListByResourceGroupPager.NextPage` has been removed -- Function `*ManagedHsmsClientListByResourceGroupPager.PageResponse` has been removed -- Function `SKUFamily.ToPtr` has been removed -- Function `ManagedHsmsClientUpdatePollerResponse.PollUntilDone` has been removed -- Function `*ManagedHsmsClientListByResourceGroupPager.Err` has been removed -- Function `JSONWebKeyType.ToPtr` has been removed -- Function `*PrivateEndpointConnectionsClientListByResourcePager.NextPage` has been removed -- Function `JSONWebKeyOperation.ToPtr` has been removed -- Function `JSONWebKeyCurveName.ToPtr` has been removed -- Function `*ManagedHsmsClientDeletePoller.ResumeToken` has been removed -- Function `*VaultsClientCreateOrUpdatePoller.Poll` has been removed -- Function `ManagedHsmsClientPurgeDeletedPollerResponse.PollUntilDone` has been removed -- Function `*OperationsClientListPager.PageResponse` has been removed -- Function `*ManagedHsmsClientDeletePoller.Done` has been removed -- Function `*ManagedHsmsClientPurgeDeletedPoller.Poll` has been removed -- Function `KeyPermissions.ToPtr` has been removed -- Function `*OperationsClientListPager.Err` has been removed -- Function `*OperationsClientListPager.NextPage` has been removed -- Function `*ManagedHsmsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `VaultsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*VaultsClientListByResourceGroupPager.Err` has been removed -- Function `*SecretsClientListPager.PageResponse` has been removed -- Function `ManagedHsmSKUFamily.ToPtr` has been removed -- Function `*ManagedHsmsClientDeletePoller.FinalResponse` has been removed -- Function `*ManagedHsmsClientListDeletedPager.Err` has been removed -- Function `*ManagedHsmsClientListByResourceGroupPager.NextPage` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientDeletePollerResponse.Resume` has been removed -- Function `*VaultsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `StoragePermissions.ToPtr` has been removed -- Function `MHSMPrivateEndpointConnectionsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*ManagedHsmsClientListDeletedPager.NextPage` has been removed -- Function `*VaultsClientPurgeDeletedPoller.ResumeToken` has been removed -- Function `PublicNetworkAccess.ToPtr` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePollerResponse.Resume` has been removed -- Function `*ManagedHsmsClientUpdatePollerResponse.Resume` has been removed -- Function `ManagedHsmSKUName.ToPtr` has been removed -- Function `*VaultsClientPurgeDeletedPoller.Poll` has been removed -- Function `NetworkRuleBypassOptions.ToPtr` has been removed -- Function `KeyRotationPolicyActionType.ToPtr` has been removed -- Function `Reason.ToPtr` has been removed -- Function `*PrivateEndpointConnectionsClientListByResourcePager.Err` has been removed -- Function `ActionsRequired.ToPtr` has been removed -- Function `*ManagedHsmsClientUpdatePoller.Poll` has been removed -- Function `*ManagedHsmsClientUpdatePoller.FinalResponse` has been removed -- Function `*ManagedHsmsClientCreateOrUpdatePoller.Done` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePoller.FinalResponse` has been removed -- Function `*SecretsClientListPager.NextPage` has been removed -- Function `*ManagedHsmsClientUpdatePoller.ResumeToken` has been removed -- Function `*ManagedHsmsClientUpdatePoller.Done` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientListByResourcePager.Err` has been removed -- Function `VaultProvisioningState.ToPtr` has been removed -- Function `*ManagedHsmsClientPurgeDeletedPoller.ResumeToken` has been removed -- Function `*VaultsClientListPager.Err` has been removed -- Function `*ManagedHsmsClientDeletePoller.Poll` has been removed -- Function `*ManagedHsmsClientPurgeDeletedPollerResponse.Resume` has been removed -- Function `CertificatePermissions.ToPtr` has been removed -- Function `*VaultsClientListPager.NextPage` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientDeletePoller.FinalResponse` has been removed -- Function `CreateMode.ToPtr` has been removed -- Function `ProvisioningState.ToPtr` has been removed -- Function `*ManagedHsmsClientDeletePollerResponse.Resume` has been removed -- Function `ManagedHsmsClientDeletePollerResponse.PollUntilDone` has been removed -- Function `*KeysClientListVersionsPager.Err` has been removed -- Function `*ManagedHsmsClientListBySubscriptionPager.NextPage` has been removed -- Function `*KeysClientListPager.NextPage` has been removed -- Function `*ManagedHsmsClientListBySubscriptionPager.Err` has been removed -- Function `*ManagedHsmsClientPurgeDeletedPoller.FinalResponse` has been removed -- Function `SKUName.ToPtr` has been removed -- Function `*VaultsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*ManagedHsmsClientCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*VaultsClientListBySubscriptionPager.NextPage` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientDeletePoller.Done` has been removed -- Function `*VaultsClientPurgeDeletedPollerResponse.Resume` has been removed -- Function `*VaultsClientListDeletedPager.Err` has been removed -- Function `PrivateEndpointServiceConnectionStatus.ToPtr` has been removed -- Function `*VaultsClientCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePoller.Poll` has been removed -- Function `*ManagedHsmsClientCreateOrUpdatePoller.Poll` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePoller.Done` has been removed -- Function `*VaultsClientPurgeDeletedPoller.Done` has been removed -- Function `*ManagedHsmsClientCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*ManagedHsmsClientListDeletedPager.PageResponse` has been removed -- Function `*PrivateEndpointConnectionsClientDeletePoller.ResumeToken` has been removed -- Function `NetworkRuleAction.ToPtr` has been removed -- Function `*KeysClientListVersionsPager.PageResponse` has been removed -- Function `*VaultsClientListByResourceGroupPager.PageResponse` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientListByResourcePager.NextPage` has been removed -- Function `AccessPolicyUpdateKind.ToPtr` has been removed -- Function `*VaultsClientCreateOrUpdatePoller.Done` has been removed -- Function `*KeysClientListPager.Err` has been removed -- Function `*VaultsClientListBySubscriptionPager.PageResponse` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientListByResourcePager.PageResponse` has been removed -- Function `*SecretsClientListPager.Err` has been removed -- Function `ManagedHsmsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*KeysClientListPager.PageResponse` has been removed -- Function `DeletionRecoveryLevel.ToPtr` has been removed -- Function `PrivateEndpointConnectionProvisioningState.ToPtr` has been removed -- Function `SecretPermissions.ToPtr` has been removed -- Function `*VaultsClientListBySubscriptionPager.Err` has been removed -- Function `IdentityType.ToPtr` has been removed -- Function `*ManagedHsmsClientListBySubscriptionPager.PageResponse` has been removed -- Function `*PrivateEndpointConnectionsClientListByResourcePager.PageResponse` has been removed -- Function `*VaultsClientPurgeDeletedPoller.FinalResponse` has been removed -- Function `VaultsClientPurgeDeletedPollerResponse.PollUntilDone` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientDeletePoller.ResumeToken` has been removed -- Function `*VaultsClientListDeletedPager.PageResponse` has been removed -- Function `*MHSMPrivateEndpointConnectionsClientDeletePoller.Poll` has been removed -- Function `*ManagedHsmsClientPurgeDeletedPoller.Done` has been removed -- Function `*KeysClientListVersionsPager.NextPage` has been removed -- Function `*VaultsClientListPager.PageResponse` has been removed -- Struct `KeysClientCreateIfNotExistResult` has been removed -- Struct `KeysClientGetResult` has been removed -- Struct `KeysClientGetVersionResult` has been removed -- Struct `KeysClientListPager` has been removed -- Struct `KeysClientListResult` has been removed -- Struct `KeysClientListVersionsPager` has been removed -- Struct `KeysClientListVersionsResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsClientDeletePoller` has been removed -- Struct `MHSMPrivateEndpointConnectionsClientDeletePollerResponse` has been removed -- Struct `MHSMPrivateEndpointConnectionsClientDeleteResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsClientGetResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsClientListByResourcePager` has been removed -- Struct `MHSMPrivateEndpointConnectionsClientListByResourceResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsClientPutResult` has been removed -- Struct `MHSMPrivateLinkResourcesClientListByMHSMResourceResult` has been removed -- Struct `ManagedHsmsClientCreateOrUpdatePoller` has been removed -- Struct `ManagedHsmsClientCreateOrUpdatePollerResponse` has been removed -- Struct `ManagedHsmsClientCreateOrUpdateResult` has been removed -- Struct `ManagedHsmsClientDeletePoller` has been removed -- Struct `ManagedHsmsClientDeletePollerResponse` has been removed -- Struct `ManagedHsmsClientGetDeletedResult` has been removed -- Struct `ManagedHsmsClientGetResult` has been removed -- Struct `ManagedHsmsClientListByResourceGroupPager` has been removed -- Struct `ManagedHsmsClientListByResourceGroupResult` has been removed -- Struct `ManagedHsmsClientListBySubscriptionPager` has been removed -- Struct `ManagedHsmsClientListBySubscriptionResult` has been removed -- Struct `ManagedHsmsClientListDeletedPager` has been removed -- Struct `ManagedHsmsClientListDeletedResult` has been removed -- Struct `ManagedHsmsClientPurgeDeletedPoller` has been removed -- Struct `ManagedHsmsClientPurgeDeletedPollerResponse` has been removed -- Struct `ManagedHsmsClientUpdatePoller` has been removed -- Struct `ManagedHsmsClientUpdatePollerResponse` has been removed -- Struct `ManagedHsmsClientUpdateResult` has been removed -- Struct `OperationsClientListPager` has been removed -- Struct `OperationsClientListResult` has been removed -- Struct `PrivateEndpointConnectionsClientDeletePoller` has been removed -- Struct `PrivateEndpointConnectionsClientDeletePollerResponse` has been removed -- Struct `PrivateEndpointConnectionsClientDeleteResult` has been removed -- Struct `PrivateEndpointConnectionsClientGetResult` has been removed -- Struct `PrivateEndpointConnectionsClientListByResourcePager` has been removed -- Struct `PrivateEndpointConnectionsClientListByResourceResult` has been removed -- Struct `PrivateEndpointConnectionsClientPutResult` has been removed -- Struct `PrivateLinkResourcesClientListByVaultResult` has been removed -- Struct `SecretsClientCreateOrUpdateResult` has been removed -- Struct `SecretsClientGetResult` has been removed -- Struct `SecretsClientListPager` has been removed -- Struct `SecretsClientListResult` has been removed -- Struct `SecretsClientUpdateResult` has been removed -- Struct `VaultsClientCheckNameAvailabilityResult` has been removed -- Struct `VaultsClientCreateOrUpdatePoller` has been removed -- Struct `VaultsClientCreateOrUpdatePollerResponse` has been removed -- Struct `VaultsClientCreateOrUpdateResult` has been removed -- Struct `VaultsClientGetDeletedResult` has been removed -- Struct `VaultsClientGetResult` has been removed -- Struct `VaultsClientListByResourceGroupPager` has been removed -- Struct `VaultsClientListByResourceGroupResult` has been removed -- Struct `VaultsClientListBySubscriptionPager` has been removed -- Struct `VaultsClientListBySubscriptionResult` has been removed -- Struct `VaultsClientListDeletedPager` has been removed -- Struct `VaultsClientListDeletedResult` has been removed -- Struct `VaultsClientListPager` has been removed -- Struct `VaultsClientListResult` has been removed -- Struct `VaultsClientPurgeDeletedPoller` has been removed -- Struct `VaultsClientPurgeDeletedPollerResponse` has been removed -- Struct `VaultsClientUpdateAccessPolicyResult` has been removed -- Struct `VaultsClientUpdateResult` has been removed -- Field `VaultsClientGetDeletedResult` of struct `VaultsClientGetDeletedResponse` has been removed -- Field `RawResponse` of struct `VaultsClientGetDeletedResponse` has been removed -- Field `KeysClientListVersionsResult` of struct `KeysClientListVersionsResponse` has been removed -- Field `RawResponse` of struct `KeysClientListVersionsResponse` has been removed -- Field `PrivateEndpointConnectionsClientListByResourceResult` of struct `PrivateEndpointConnectionsClientListByResourceResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientListByResourceResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientDeleteResponse` has been removed -- Field `VaultsClientCreateOrUpdateResult` of struct `VaultsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `VaultsClientCreateOrUpdateResponse` has been removed -- Field `PrivateEndpointConnectionsClientDeleteResult` of struct `PrivateEndpointConnectionsClientDeleteResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientDeleteResponse` has been removed -- Field `MHSMPrivateEndpointConnectionsClientGetResult` of struct `MHSMPrivateEndpointConnectionsClientGetResponse` has been removed -- Field `RawResponse` of struct `MHSMPrivateEndpointConnectionsClientGetResponse` has been removed -- Field `RawResponse` of struct `VaultsClientDeleteResponse` has been removed -- Field `VaultsClientCheckNameAvailabilityResult` of struct `VaultsClientCheckNameAvailabilityResponse` has been removed -- Field `RawResponse` of struct `VaultsClientCheckNameAvailabilityResponse` has been removed -- Field `PrivateLinkResourcesClientListByVaultResult` of struct `PrivateLinkResourcesClientListByVaultResponse` has been removed -- Field `RawResponse` of struct `PrivateLinkResourcesClientListByVaultResponse` has been removed -- Field `MHSMPrivateEndpointConnectionsClientDeleteResult` of struct `MHSMPrivateEndpointConnectionsClientDeleteResponse` has been removed -- Field `RawResponse` of struct `MHSMPrivateEndpointConnectionsClientDeleteResponse` has been removed -- Field `KeysClientListResult` of struct `KeysClientListResponse` has been removed -- Field `RawResponse` of struct `KeysClientListResponse` has been removed -- Field `VaultsClientListByResourceGroupResult` of struct `VaultsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `VaultsClientListByResourceGroupResponse` has been removed -- Field `MHSMPrivateEndpointConnectionsClientPutResult` of struct `MHSMPrivateEndpointConnectionsClientPutResponse` has been removed -- Field `RawResponse` of struct `MHSMPrivateEndpointConnectionsClientPutResponse` has been removed -- Field `RawResponse` of struct `VaultsClientPurgeDeletedResponse` has been removed -- Field `ManagedHsmsClientCreateOrUpdateResult` of struct `ManagedHsmsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientCreateOrUpdateResponse` has been removed -- Field `KeysClientGetVersionResult` of struct `KeysClientGetVersionResponse` has been removed -- Field `RawResponse` of struct `KeysClientGetVersionResponse` has been removed -- Field `SecretsClientListResult` of struct `SecretsClientListResponse` has been removed -- Field `RawResponse` of struct `SecretsClientListResponse` has been removed -- Field `VaultsClientListDeletedResult` of struct `VaultsClientListDeletedResponse` has been removed -- Field `RawResponse` of struct `VaultsClientListDeletedResponse` has been removed -- Field `VaultsClientUpdateResult` of struct `VaultsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `VaultsClientUpdateResponse` has been removed -- Field `ManagedHsmsClientListBySubscriptionResult` of struct `ManagedHsmsClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientListBySubscriptionResponse` has been removed -- Field `OperationsClientListResult` of struct `OperationsClientListResponse` has been removed -- Field `RawResponse` of struct `OperationsClientListResponse` has been removed -- Field `PrivateEndpointConnectionsClientGetResult` of struct `PrivateEndpointConnectionsClientGetResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientGetResponse` has been removed -- Field `MHSMPrivateLinkResourcesClientListByMHSMResourceResult` of struct `MHSMPrivateLinkResourcesClientListByMHSMResourceResponse` has been removed -- Field `RawResponse` of struct `MHSMPrivateLinkResourcesClientListByMHSMResourceResponse` has been removed -- Field `SecretsClientCreateOrUpdateResult` of struct `SecretsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `SecretsClientCreateOrUpdateResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientPurgeDeletedResponse` has been removed -- Field `ManagedHsmsClientGetResult` of struct `ManagedHsmsClientGetResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientGetResponse` has been removed -- Field `SecretsClientUpdateResult` of struct `SecretsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `SecretsClientUpdateResponse` has been removed -- Field `KeysClientGetResult` of struct `KeysClientGetResponse` has been removed -- Field `RawResponse` of struct `KeysClientGetResponse` has been removed -- Field `ManagedHsmsClientUpdateResult` of struct `ManagedHsmsClientUpdateResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientUpdateResponse` has been removed -- Field `ManagedHsmsClientListDeletedResult` of struct `ManagedHsmsClientListDeletedResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientListDeletedResponse` has been removed -- Field `KeysClientCreateIfNotExistResult` of struct `KeysClientCreateIfNotExistResponse` has been removed -- Field `RawResponse` of struct `KeysClientCreateIfNotExistResponse` has been removed -- Field `ManagedHsmsClientGetDeletedResult` of struct `ManagedHsmsClientGetDeletedResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientGetDeletedResponse` has been removed -- Field `MHSMPrivateEndpointConnectionsClientListByResourceResult` of struct `MHSMPrivateEndpointConnectionsClientListByResourceResponse` has been removed -- Field `RawResponse` of struct `MHSMPrivateEndpointConnectionsClientListByResourceResponse` has been removed -- Field `VaultsClientListBySubscriptionResult` of struct `VaultsClientListBySubscriptionResponse` has been removed -- Field `RawResponse` of struct `VaultsClientListBySubscriptionResponse` has been removed -- Field `PrivateEndpointConnectionsClientPutResult` of struct `PrivateEndpointConnectionsClientPutResponse` has been removed -- Field `RawResponse` of struct `PrivateEndpointConnectionsClientPutResponse` has been removed -- Field `SecretsClientGetResult` of struct `SecretsClientGetResponse` has been removed -- Field `RawResponse` of struct `SecretsClientGetResponse` has been removed -- Field `VaultsClientUpdateAccessPolicyResult` of struct `VaultsClientUpdateAccessPolicyResponse` has been removed -- Field `RawResponse` of struct `VaultsClientUpdateAccessPolicyResponse` has been removed -- Field `ManagedHsmsClientListByResourceGroupResult` of struct `ManagedHsmsClientListByResourceGroupResponse` has been removed -- Field `RawResponse` of struct `ManagedHsmsClientListByResourceGroupResponse` has been removed -- Field `VaultsClientListResult` of struct `VaultsClientListResponse` has been removed -- Field `RawResponse` of struct `VaultsClientListResponse` has been removed -- Field `VaultsClientGetResult` of struct `VaultsClientGetResponse` has been removed -- Field `RawResponse` of struct `VaultsClientGetResponse` has been removed - +- New value `JSONWebKeyOperationRelease` added to enum type `JSONWebKeyOperation` +- New value `KeyPermissionsGetrotationpolicy`, `KeyPermissionsRelease`, `KeyPermissionsRotate`, `KeyPermissionsSetrotationpolicy` added to enum type `KeyPermissions` +- New enum type `ActivationStatus` with values `ActivationStatusActive`, `ActivationStatusFailed`, `ActivationStatusNotActivated`, `ActivationStatusUnknown` +- New enum type `GeoReplicationRegionProvisioningState` with values `GeoReplicationRegionProvisioningStateCleanup`, `GeoReplicationRegionProvisioningStateDeleting`, `GeoReplicationRegionProvisioningStateFailed`, `GeoReplicationRegionProvisioningStatePreprovisioning`, `GeoReplicationRegionProvisioningStateProvisioning`, `GeoReplicationRegionProvisioningStateSucceeded` +- New enum type `KeyRotationPolicyActionType` with values `KeyRotationPolicyActionTypeNotify`, `KeyRotationPolicyActionTypeRotate` +- New function `*ClientFactory.NewMHSMRegionsClient() *MHSMRegionsClient` +- New function `*ClientFactory.NewManagedHsmKeysClient() *ManagedHsmKeysClient` +- New function `NewMHSMRegionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*MHSMRegionsClient, error)` +- New function `*MHSMRegionsClient.NewListByResourcePager(string, string, *MHSMRegionsClientListByResourceOptions) *runtime.Pager[MHSMRegionsClientListByResourceResponse]` +- New function `NewManagedHsmKeysClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedHsmKeysClient, error)` +- New function `*ManagedHsmKeysClient.CreateIfNotExist(context.Context, string, string, string, ManagedHsmKeyCreateParameters, *ManagedHsmKeysClientCreateIfNotExistOptions) (ManagedHsmKeysClientCreateIfNotExistResponse, error)` +- New function `*ManagedHsmKeysClient.Get(context.Context, string, string, string, *ManagedHsmKeysClientGetOptions) (ManagedHsmKeysClientGetResponse, error)` +- New function `*ManagedHsmKeysClient.GetVersion(context.Context, string, string, string, string, *ManagedHsmKeysClientGetVersionOptions) (ManagedHsmKeysClientGetVersionResponse, error)` +- New function `*ManagedHsmKeysClient.NewListPager(string, string, *ManagedHsmKeysClientListOptions) *runtime.Pager[ManagedHsmKeysClientListResponse]` +- New function `*ManagedHsmKeysClient.NewListVersionsPager(string, string, string, *ManagedHsmKeysClientListVersionsOptions) *runtime.Pager[ManagedHsmKeysClientListVersionsResponse]` +- New function `*ManagedHsmsClient.CheckMhsmNameAvailability(context.Context, CheckMhsmNameAvailabilityParameters, *ManagedHsmsClientCheckMhsmNameAvailabilityOptions) (ManagedHsmsClientCheckMhsmNameAvailabilityResponse, error)` +- New struct `Action` +- New struct `CheckMhsmNameAvailabilityParameters` +- New struct `CheckMhsmNameAvailabilityResult` +- New struct `KeyReleasePolicy` +- New struct `KeyRotationPolicyAttributes` +- New struct `LifetimeAction` +- New struct `MHSMGeoReplicatedRegion` +- New struct `MHSMRegionsListResult` +- New struct `ManagedHSMSecurityDomainProperties` +- New struct `ManagedHsmAction` +- New struct `ManagedHsmKey` +- New struct `ManagedHsmKeyAttributes` +- New struct `ManagedHsmKeyCreateParameters` +- New struct `ManagedHsmKeyListResult` +- New struct `ManagedHsmKeyProperties` +- New struct `ManagedHsmKeyReleasePolicy` +- New struct `ManagedHsmKeyRotationPolicyAttributes` +- New struct `ManagedHsmLifetimeAction` +- New struct `ManagedHsmRotationPolicy` +- New struct `ManagedHsmTrigger` +- New struct `ProxyResourceWithoutSystemData` +- New struct `RotationPolicy` +- New struct `Trigger` +- New field `ReleasePolicy` in struct `KeyProperties` +- New field `RotationPolicy` in struct `KeyProperties` +- New field `Etag` in struct `MHSMPrivateEndpointConnectionItem` +- New field `ID` in struct `MHSMPrivateEndpointConnectionItem` +- New field `Regions` in struct `ManagedHsmProperties` +- New field `SecurityDomainProperties` in struct `ManagedHsmProperties` + + +## 1.1.0 (2023-04-06) ### Features Added -- New field `ResumeToken` in struct `ManagedHsmsClientBeginDeleteOptions` -- New anonymous field `Key` in struct `KeysClientGetResponse` -- New anonymous field `MHSMPrivateLinkResourceListResult` in struct `MHSMPrivateLinkResourcesClientListByMHSMResourceResponse` -- New anonymous field `PrivateEndpointConnectionListResult` in struct `PrivateEndpointConnectionsClientListByResourceResponse` -- New anonymous field `Secret` in struct `SecretsClientUpdateResponse` -- New anonymous field `ManagedHsm` in struct `ManagedHsmsClientUpdateResponse` -- New field `ResumeToken` in struct `ManagedHsmsClientBeginUpdateOptions` -- New anonymous field `VaultListResult` in struct `VaultsClientListBySubscriptionResponse` -- New anonymous field `VaultAccessPolicyParameters` in struct `VaultsClientUpdateAccessPolicyResponse` -- New anonymous field `OperationListResult` in struct `OperationsClientListResponse` -- New anonymous field `MHSMPrivateEndpointConnection` in struct `MHSMPrivateEndpointConnectionsClientPutResponse` -- New field `AzureAsyncOperation` in struct `MHSMPrivateEndpointConnectionsClientPutResponse` -- New field `RetryAfter` in struct `MHSMPrivateEndpointConnectionsClientPutResponse` -- New anonymous field `Vault` in struct `VaultsClientCreateOrUpdateResponse` -- New anonymous field `Secret` in struct `SecretsClientGetResponse` -- New anonymous field `PrivateEndpointConnection` in struct `PrivateEndpointConnectionsClientPutResponse` -- New field `AzureAsyncOperation` in struct `PrivateEndpointConnectionsClientPutResponse` -- New field `RetryAfter` in struct `PrivateEndpointConnectionsClientPutResponse` -- New anonymous field `DeletedVault` in struct `VaultsClientGetDeletedResponse` -- New field `ResumeToken` in struct `MHSMPrivateEndpointConnectionsClientBeginDeleteOptions` -- New anonymous field `MHSMPrivateEndpointConnection` in struct `MHSMPrivateEndpointConnectionsClientGetResponse` -- New anonymous field `Vault` in struct `VaultsClientGetResponse` -- New anonymous field `PrivateEndpointConnection` in struct `PrivateEndpointConnectionsClientGetResponse` -- New field `ResumeToken` in struct `ManagedHsmsClientBeginPurgeDeletedOptions` -- New anonymous field `ResourceListResult` in struct `VaultsClientListResponse` -- New anonymous field `MHSMPrivateEndpointConnectionsListResult` in struct `MHSMPrivateEndpointConnectionsClientListByResourceResponse` -- New anonymous field `PrivateEndpointConnection` in struct `PrivateEndpointConnectionsClientDeleteResponse` -- New anonymous field `ManagedHsmListResult` in struct `ManagedHsmsClientListBySubscriptionResponse` -- New anonymous field `ManagedHsm` in struct `ManagedHsmsClientGetResponse` -- New anonymous field `DeletedManagedHsmListResult` in struct `ManagedHsmsClientListDeletedResponse` -- New anonymous field `ManagedHsm` in struct `ManagedHsmsClientCreateOrUpdateResponse` -- New anonymous field `SecretListResult` in struct `SecretsClientListResponse` -- New anonymous field `Vault` in struct `VaultsClientUpdateResponse` -- New field `ResumeToken` in struct `ManagedHsmsClientBeginCreateOrUpdateOptions` -- New anonymous field `DeletedVaultListResult` in struct `VaultsClientListDeletedResponse` -- New field `ResumeToken` in struct `VaultsClientBeginCreateOrUpdateOptions` -- New anonymous field `VaultListResult` in struct `VaultsClientListByResourceGroupResponse` -- New anonymous field `KeyListResult` in struct `KeysClientListVersionsResponse` -- New anonymous field `MHSMPrivateEndpointConnection` in struct `MHSMPrivateEndpointConnectionsClientDeleteResponse` -- New field `ResumeToken` in struct `VaultsClientBeginPurgeDeletedOptions` -- New anonymous field `ManagedHsmListResult` in struct `ManagedHsmsClientListByResourceGroupResponse` -- New anonymous field `KeyListResult` in struct `KeysClientListResponse` -- New anonymous field `Secret` in struct `SecretsClientCreateOrUpdateResponse` -- New field `ResumeToken` in struct `PrivateEndpointConnectionsClientBeginDeleteOptions` -- New anonymous field `Key` in struct `KeysClientCreateIfNotExistResponse` -- New anonymous field `Key` in struct `KeysClientGetVersionResponse` -- New anonymous field `DeletedManagedHsm` in struct `ManagedHsmsClientGetDeletedResponse` -- New anonymous field `CheckNameAvailabilityResult` in struct `VaultsClientCheckNameAvailabilityResponse` -- New anonymous field `PrivateLinkResourceListResult` in struct `PrivateLinkResourcesClientListByVaultResponse` - - -## 0.3.1 (2022-02-22) +- New struct `ClientFactory` which is a client factory used to create any client in this module -### Other Changes -- Remove the go_mod_tidy_hack.go file. - -## 0.3.0 (2022-01-13) -### Breaking Changes - -- Function `*MHSMPrivateEndpointConnectionsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *MHSMPrivateEndpointConnectionsGetOptions)` to `(context.Context, string, string, string, *MHSMPrivateEndpointConnectionsClientGetOptions)` -- Function `*MHSMPrivateEndpointConnectionsClient.Get` return value(s) have been changed from `(MHSMPrivateEndpointConnectionsGetResponse, error)` to `(MHSMPrivateEndpointConnectionsClientGetResponse, error)` -- Function `*KeysClient.List` parameter(s) have been changed from `(string, string, *KeysListOptions)` to `(string, string, *KeysClientListOptions)` -- Function `*KeysClient.List` return value(s) have been changed from `(*KeysListPager)` to `(*KeysClientListPager)` -- Function `*OperationsClient.List` parameter(s) have been changed from `(*OperationsListOptions)` to `(*OperationsClientListOptions)` -- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsListPager)` to `(*OperationsClientListPager)` -- Function `*ManagedHsmsClient.ListByResourceGroup` parameter(s) have been changed from `(string, *ManagedHsmsListByResourceGroupOptions)` to `(string, *ManagedHsmsClientListByResourceGroupOptions)` -- Function `*ManagedHsmsClient.ListByResourceGroup` return value(s) have been changed from `(*ManagedHsmsListByResourceGroupPager)` to `(*ManagedHsmsClientListByResourceGroupPager)` -- Function `*VaultsClient.ListBySubscription` parameter(s) have been changed from `(*VaultsListBySubscriptionOptions)` to `(*VaultsClientListBySubscriptionOptions)` -- Function `*VaultsClient.ListBySubscription` return value(s) have been changed from `(*VaultsListBySubscriptionPager)` to `(*VaultsClientListBySubscriptionPager)` -- Function `*MHSMPrivateEndpointConnectionsClient.Put` parameter(s) have been changed from `(context.Context, string, string, string, MHSMPrivateEndpointConnection, *MHSMPrivateEndpointConnectionsPutOptions)` to `(context.Context, string, string, string, MHSMPrivateEndpointConnection, *MHSMPrivateEndpointConnectionsClientPutOptions)` -- Function `*MHSMPrivateEndpointConnectionsClient.Put` return value(s) have been changed from `(MHSMPrivateEndpointConnectionsPutResponse, error)` to `(MHSMPrivateEndpointConnectionsClientPutResponse, error)` -- Function `*ManagedHsmsClient.ListDeleted` parameter(s) have been changed from `(*ManagedHsmsListDeletedOptions)` to `(*ManagedHsmsClientListDeletedOptions)` -- Function `*ManagedHsmsClient.ListDeleted` return value(s) have been changed from `(*ManagedHsmsListDeletedPager)` to `(*ManagedHsmsClientListDeletedPager)` -- Function `*VaultsClient.List` parameter(s) have been changed from `(*VaultsListOptions)` to `(*VaultsClientListOptions)` -- Function `*VaultsClient.List` return value(s) have been changed from `(*VaultsListPager)` to `(*VaultsClientListPager)` -- Function `*ManagedHsmsClient.BeginPurgeDeleted` parameter(s) have been changed from `(context.Context, string, string, *ManagedHsmsBeginPurgeDeletedOptions)` to `(context.Context, string, string, *ManagedHsmsClientBeginPurgeDeletedOptions)` -- Function `*ManagedHsmsClient.BeginPurgeDeleted` return value(s) have been changed from `(ManagedHsmsPurgeDeletedPollerResponse, error)` to `(ManagedHsmsClientPurgeDeletedPollerResponse, error)` -- Function `*SecretsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, SecretCreateOrUpdateParameters, *SecretsCreateOrUpdateOptions)` to `(context.Context, string, string, string, SecretCreateOrUpdateParameters, *SecretsClientCreateOrUpdateOptions)` -- Function `*SecretsClient.CreateOrUpdate` return value(s) have been changed from `(SecretsCreateOrUpdateResponse, error)` to `(SecretsClientCreateOrUpdateResponse, error)` -- Function `*MHSMPrivateEndpointConnectionsClient.ListByResource` parameter(s) have been changed from `(string, string, *MHSMPrivateEndpointConnectionsListByResourceOptions)` to `(string, string, *MHSMPrivateEndpointConnectionsClientListByResourceOptions)` -- Function `*MHSMPrivateEndpointConnectionsClient.ListByResource` return value(s) have been changed from `(*MHSMPrivateEndpointConnectionsListByResourcePager)` to `(*MHSMPrivateEndpointConnectionsClientListByResourcePager)` -- Function `*VaultsClient.Update` parameter(s) have been changed from `(context.Context, string, string, VaultPatchParameters, *VaultsUpdateOptions)` to `(context.Context, string, string, VaultPatchParameters, *VaultsClientUpdateOptions)` -- Function `*VaultsClient.Update` return value(s) have been changed from `(VaultsUpdateResponse, error)` to `(VaultsClientUpdateResponse, error)` -- Function `*PrivateEndpointConnectionsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateEndpointConnectionsBeginDeleteOptions)` to `(context.Context, string, string, string, *PrivateEndpointConnectionsClientBeginDeleteOptions)` -- Function `*PrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(PrivateEndpointConnectionsDeletePollerResponse, error)` to `(PrivateEndpointConnectionsClientDeletePollerResponse, error)` -- Function `*VaultsClient.ListDeleted` parameter(s) have been changed from `(*VaultsListDeletedOptions)` to `(*VaultsClientListDeletedOptions)` -- Function `*VaultsClient.ListDeleted` return value(s) have been changed from `(*VaultsListDeletedPager)` to `(*VaultsClientListDeletedPager)` -- Function `*ManagedHsmsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *ManagedHsmsGetOptions)` to `(context.Context, string, string, *ManagedHsmsClientGetOptions)` -- Function `*ManagedHsmsClient.Get` return value(s) have been changed from `(ManagedHsmsGetResponse, error)` to `(ManagedHsmsClientGetResponse, error)` -- Function `*KeysClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *KeysGetOptions)` to `(context.Context, string, string, string, *KeysClientGetOptions)` -- Function `*KeysClient.Get` return value(s) have been changed from `(KeysGetResponse, error)` to `(KeysClientGetResponse, error)` -- Function `*SecretsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *SecretsGetOptions)` to `(context.Context, string, string, string, *SecretsClientGetOptions)` -- Function `*SecretsClient.Get` return value(s) have been changed from `(SecretsGetResponse, error)` to `(SecretsClientGetResponse, error)` -- Function `*VaultsClient.ListByResourceGroup` parameter(s) have been changed from `(string, *VaultsListByResourceGroupOptions)` to `(string, *VaultsClientListByResourceGroupOptions)` -- Function `*VaultsClient.ListByResourceGroup` return value(s) have been changed from `(*VaultsListByResourceGroupPager)` to `(*VaultsClientListByResourceGroupPager)` -- Function `*KeysClient.GetVersion` parameter(s) have been changed from `(context.Context, string, string, string, string, *KeysGetVersionOptions)` to `(context.Context, string, string, string, string, *KeysClientGetVersionOptions)` -- Function `*KeysClient.GetVersion` return value(s) have been changed from `(KeysGetVersionResponse, error)` to `(KeysClientGetVersionResponse, error)` -- Function `*VaultsClient.Delete` parameter(s) have been changed from `(context.Context, string, string, *VaultsDeleteOptions)` to `(context.Context, string, string, *VaultsClientDeleteOptions)` -- Function `*VaultsClient.Delete` return value(s) have been changed from `(VaultsDeleteResponse, error)` to `(VaultsClientDeleteResponse, error)` -- Function `*ManagedHsmsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, ManagedHsm, *ManagedHsmsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, ManagedHsm, *ManagedHsmsClientBeginCreateOrUpdateOptions)` -- Function `*ManagedHsmsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ManagedHsmsCreateOrUpdatePollerResponse, error)` to `(ManagedHsmsClientCreateOrUpdatePollerResponse, error)` -- Function `*PrivateEndpointConnectionsClient.Put` parameter(s) have been changed from `(context.Context, string, string, string, PrivateEndpointConnection, *PrivateEndpointConnectionsPutOptions)` to `(context.Context, string, string, string, PrivateEndpointConnection, *PrivateEndpointConnectionsClientPutOptions)` -- Function `*PrivateEndpointConnectionsClient.Put` return value(s) have been changed from `(PrivateEndpointConnectionsPutResponse, error)` to `(PrivateEndpointConnectionsClientPutResponse, error)` -- Function `*SecretsClient.Update` parameter(s) have been changed from `(context.Context, string, string, string, SecretPatchParameters, *SecretsUpdateOptions)` to `(context.Context, string, string, string, SecretPatchParameters, *SecretsClientUpdateOptions)` -- Function `*SecretsClient.Update` return value(s) have been changed from `(SecretsUpdateResponse, error)` to `(SecretsClientUpdateResponse, error)` -- Function `*VaultsClient.Get` parameter(s) have been changed from `(context.Context, string, string, *VaultsGetOptions)` to `(context.Context, string, string, *VaultsClientGetOptions)` -- Function `*VaultsClient.Get` return value(s) have been changed from `(VaultsGetResponse, error)` to `(VaultsClientGetResponse, error)` -- Function `*PrivateEndpointConnectionsClient.Get` parameter(s) have been changed from `(context.Context, string, string, string, *PrivateEndpointConnectionsGetOptions)` to `(context.Context, string, string, string, *PrivateEndpointConnectionsClientGetOptions)` -- Function `*PrivateEndpointConnectionsClient.Get` return value(s) have been changed from `(PrivateEndpointConnectionsGetResponse, error)` to `(PrivateEndpointConnectionsClientGetResponse, error)` -- Function `*ManagedHsmsClient.GetDeleted` parameter(s) have been changed from `(context.Context, string, string, *ManagedHsmsGetDeletedOptions)` to `(context.Context, string, string, *ManagedHsmsClientGetDeletedOptions)` -- Function `*ManagedHsmsClient.GetDeleted` return value(s) have been changed from `(ManagedHsmsGetDeletedResponse, error)` to `(ManagedHsmsClientGetDeletedResponse, error)` -- Function `*VaultsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, VaultCreateOrUpdateParameters, *VaultsBeginCreateOrUpdateOptions)` to `(context.Context, string, string, VaultCreateOrUpdateParameters, *VaultsClientBeginCreateOrUpdateOptions)` -- Function `*VaultsClient.BeginCreateOrUpdate` return value(s) have been changed from `(VaultsCreateOrUpdatePollerResponse, error)` to `(VaultsClientCreateOrUpdatePollerResponse, error)` -- Function `*ManagedHsmsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, *ManagedHsmsBeginDeleteOptions)` to `(context.Context, string, string, *ManagedHsmsClientBeginDeleteOptions)` -- Function `*ManagedHsmsClient.BeginDelete` return value(s) have been changed from `(ManagedHsmsDeletePollerResponse, error)` to `(ManagedHsmsClientDeletePollerResponse, error)` -- Function `*VaultsClient.GetDeleted` parameter(s) have been changed from `(context.Context, string, string, *VaultsGetDeletedOptions)` to `(context.Context, string, string, *VaultsClientGetDeletedOptions)` -- Function `*VaultsClient.GetDeleted` return value(s) have been changed from `(VaultsGetDeletedResponse, error)` to `(VaultsClientGetDeletedResponse, error)` -- Function `*MHSMPrivateLinkResourcesClient.ListByMHSMResource` parameter(s) have been changed from `(context.Context, string, string, *MHSMPrivateLinkResourcesListByMHSMResourceOptions)` to `(context.Context, string, string, *MHSMPrivateLinkResourcesClientListByMHSMResourceOptions)` -- Function `*MHSMPrivateLinkResourcesClient.ListByMHSMResource` return value(s) have been changed from `(MHSMPrivateLinkResourcesListByMHSMResourceResponse, error)` to `(MHSMPrivateLinkResourcesClientListByMHSMResourceResponse, error)` -- Function `*MHSMPrivateEndpointConnectionsClient.BeginDelete` parameter(s) have been changed from `(context.Context, string, string, string, *MHSMPrivateEndpointConnectionsBeginDeleteOptions)` to `(context.Context, string, string, string, *MHSMPrivateEndpointConnectionsClientBeginDeleteOptions)` -- Function `*MHSMPrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(MHSMPrivateEndpointConnectionsDeletePollerResponse, error)` to `(MHSMPrivateEndpointConnectionsClientDeletePollerResponse, error)` -- Function `*PrivateLinkResourcesClient.ListByVault` parameter(s) have been changed from `(context.Context, string, string, *PrivateLinkResourcesListByVaultOptions)` to `(context.Context, string, string, *PrivateLinkResourcesClientListByVaultOptions)` -- Function `*PrivateLinkResourcesClient.ListByVault` return value(s) have been changed from `(PrivateLinkResourcesListByVaultResponse, error)` to `(PrivateLinkResourcesClientListByVaultResponse, error)` -- Function `*SecretsClient.List` parameter(s) have been changed from `(string, string, *SecretsListOptions)` to `(string, string, *SecretsClientListOptions)` -- Function `*SecretsClient.List` return value(s) have been changed from `(*SecretsListPager)` to `(*SecretsClientListPager)` -- Function `*VaultsClient.UpdateAccessPolicy` parameter(s) have been changed from `(context.Context, string, string, AccessPolicyUpdateKind, VaultAccessPolicyParameters, *VaultsUpdateAccessPolicyOptions)` to `(context.Context, string, string, AccessPolicyUpdateKind, VaultAccessPolicyParameters, *VaultsClientUpdateAccessPolicyOptions)` -- Function `*VaultsClient.UpdateAccessPolicy` return value(s) have been changed from `(VaultsUpdateAccessPolicyResponse, error)` to `(VaultsClientUpdateAccessPolicyResponse, error)` -- Function `*ManagedHsmsClient.ListBySubscription` parameter(s) have been changed from `(*ManagedHsmsListBySubscriptionOptions)` to `(*ManagedHsmsClientListBySubscriptionOptions)` -- Function `*ManagedHsmsClient.ListBySubscription` return value(s) have been changed from `(*ManagedHsmsListBySubscriptionPager)` to `(*ManagedHsmsClientListBySubscriptionPager)` -- Function `*KeysClient.CreateIfNotExist` parameter(s) have been changed from `(context.Context, string, string, string, KeyCreateParameters, *KeysCreateIfNotExistOptions)` to `(context.Context, string, string, string, KeyCreateParameters, *KeysClientCreateIfNotExistOptions)` -- Function `*KeysClient.CreateIfNotExist` return value(s) have been changed from `(KeysCreateIfNotExistResponse, error)` to `(KeysClientCreateIfNotExistResponse, error)` -- Function `*PrivateEndpointConnectionsClient.ListByResource` parameter(s) have been changed from `(string, string, *PrivateEndpointConnectionsListByResourceOptions)` to `(string, string, *PrivateEndpointConnectionsClientListByResourceOptions)` -- Function `*PrivateEndpointConnectionsClient.ListByResource` return value(s) have been changed from `(*PrivateEndpointConnectionsListByResourcePager)` to `(*PrivateEndpointConnectionsClientListByResourcePager)` -- Function `*VaultsClient.BeginPurgeDeleted` parameter(s) have been changed from `(context.Context, string, string, *VaultsBeginPurgeDeletedOptions)` to `(context.Context, string, string, *VaultsClientBeginPurgeDeletedOptions)` -- Function `*VaultsClient.BeginPurgeDeleted` return value(s) have been changed from `(VaultsPurgeDeletedPollerResponse, error)` to `(VaultsClientPurgeDeletedPollerResponse, error)` -- Function `*VaultsClient.CheckNameAvailability` parameter(s) have been changed from `(context.Context, VaultCheckNameAvailabilityParameters, *VaultsCheckNameAvailabilityOptions)` to `(context.Context, VaultCheckNameAvailabilityParameters, *VaultsClientCheckNameAvailabilityOptions)` -- Function `*VaultsClient.CheckNameAvailability` return value(s) have been changed from `(VaultsCheckNameAvailabilityResponse, error)` to `(VaultsClientCheckNameAvailabilityResponse, error)` -- Function `*ManagedHsmsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, ManagedHsm, *ManagedHsmsBeginUpdateOptions)` to `(context.Context, string, string, ManagedHsm, *ManagedHsmsClientBeginUpdateOptions)` -- Function `*ManagedHsmsClient.BeginUpdate` return value(s) have been changed from `(ManagedHsmsUpdatePollerResponse, error)` to `(ManagedHsmsClientUpdatePollerResponse, error)` -- Function `*KeysClient.ListVersions` parameter(s) have been changed from `(string, string, string, *KeysListVersionsOptions)` to `(string, string, string, *KeysClientListVersionsOptions)` -- Function `*KeysClient.ListVersions` return value(s) have been changed from `(*KeysListVersionsPager)` to `(*KeysClientListVersionsPager)` -- Function `*VaultsListPager.Err` has been removed -- Function `*ManagedHsmsListByResourceGroupPager.PageResponse` has been removed -- Function `*VaultsListBySubscriptionPager.PageResponse` has been removed -- Function `*SecretsListPager.PageResponse` has been removed -- Function `*VaultsListBySubscriptionPager.NextPage` has been removed -- Function `*MHSMPrivateEndpointConnectionsDeletePollerResponse.Resume` has been removed -- Function `*KeysListVersionsPager.NextPage` has been removed -- Function `*ManagedHsmsPurgeDeletedPoller.Poll` has been removed -- Function `*ManagedHsmsListBySubscriptionPager.PageResponse` has been removed -- Function `*VaultsListPager.PageResponse` has been removed -- Function `*ManagedHsmsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `CloudError.Error` has been removed -- Function `*ManagedHsmsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*VaultsListByResourceGroupPager.PageResponse` has been removed -- Function `*ManagedHsmsUpdatePoller.Poll` has been removed -- Function `*VaultsPurgeDeletedPoller.Done` has been removed -- Function `ManagedHsmsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*PrivateEndpointConnectionsDeletePoller.Poll` has been removed -- Function `*ManagedHsmsUpdatePoller.FinalResponse` has been removed -- Function `*PrivateEndpointConnectionsDeletePoller.Done` has been removed -- Function `ManagedHsmsDeletePollerResponse.PollUntilDone` has been removed -- Function `*ManagedHsmsDeletePoller.FinalResponse` has been removed -- Function `*KeysListPager.Err` has been removed -- Function `*ManagedHsmsListByResourceGroupPager.Err` has been removed -- Function `PrivateEndpointConnectionsDeletePollerResponse.PollUntilDone` has been removed -- Function `*VaultsListByResourceGroupPager.Err` has been removed -- Function `*ManagedHsmsListByResourceGroupPager.NextPage` has been removed -- Function `*ManagedHsmsListDeletedPager.PageResponse` has been removed -- Function `*KeysListPager.PageResponse` has been removed -- Function `*VaultsPurgeDeletedPollerResponse.Resume` has been removed -- Function `*VaultsListDeletedPager.NextPage` has been removed -- Function `*ManagedHsmsUpdatePollerResponse.Resume` has been removed -- Function `*KeysListVersionsPager.Err` has been removed -- Function `VaultsCreateOrUpdatePollerResponse.PollUntilDone` has been removed -- Function `*MHSMPrivateEndpointConnectionsListByResourcePager.Err` has been removed -- Function `*PrivateEndpointConnectionsDeletePoller.FinalResponse` has been removed -- Function `*VaultsCreateOrUpdatePoller.FinalResponse` has been removed -- Function `*MHSMPrivateEndpointConnectionsDeletePoller.FinalResponse` has been removed -- Function `*VaultsListByResourceGroupPager.NextPage` has been removed -- Function `*VaultsPurgeDeletedPoller.Poll` has been removed -- Function `*ManagedHsmsListBySubscriptionPager.Err` has been removed -- Function `*ManagedHsmsListDeletedPager.NextPage` has been removed -- Function `ManagedHsmsUpdatePollerResponse.PollUntilDone` has been removed -- Function `*VaultsListDeletedPager.PageResponse` has been removed -- Function `*MHSMPrivateEndpointConnectionsDeletePoller.Poll` has been removed -- Function `*ManagedHsmsCreateOrUpdatePoller.Poll` has been removed -- Function `*OperationsListPager.PageResponse` has been removed -- Function `ManagedHsmsPurgeDeletedPollerResponse.PollUntilDone` has been removed -- Function `*PrivateEndpointConnectionsDeletePollerResponse.Resume` has been removed -- Function `*VaultsCreateOrUpdatePoller.ResumeToken` has been removed -- Function `*ManagedHsmsPurgeDeletedPollerResponse.Resume` has been removed -- Function `*SecretsListPager.NextPage` has been removed -- Function `*KeysListPager.NextPage` has been removed -- Function `*PrivateEndpointConnectionsListByResourcePager.Err` has been removed -- Function `*ManagedHsmsListBySubscriptionPager.NextPage` has been removed -- Function `*PrivateEndpointConnectionsListByResourcePager.PageResponse` has been removed -- Function `MHSMPrivateEndpointConnectionsDeletePollerResponse.PollUntilDone` has been removed -- Function `*ManagedHsmsUpdatePoller.ResumeToken` has been removed -- Function `*ManagedHsmsCreateOrUpdatePoller.Done` has been removed -- Function `*ManagedHsmsPurgeDeletedPoller.ResumeToken` has been removed -- Function `*KeysListVersionsPager.PageResponse` has been removed -- Function `*VaultsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*VaultsCreateOrUpdatePoller.Poll` has been removed -- Function `*VaultsPurgeDeletedPoller.ResumeToken` has been removed -- Function `*ManagedHsmsListDeletedPager.Err` has been removed -- Function `*MHSMPrivateEndpointConnectionsDeletePoller.Done` has been removed -- Function `*ManagedHsmsDeletePoller.Poll` has been removed -- Function `*ManagedHsmsDeletePoller.ResumeToken` has been removed -- Function `*ManagedHsmsDeletePoller.Done` has been removed -- Function `*VaultsListBySubscriptionPager.Err` has been removed -- Function `*SecretsListPager.Err` has been removed -- Function `*VaultsListPager.NextPage` has been removed -- Function `*VaultsListDeletedPager.Err` has been removed -- Function `*ManagedHsmsPurgeDeletedPoller.FinalResponse` has been removed -- Function `ManagedHsmError.Error` has been removed -- Function `VaultsPurgeDeletedPollerResponse.PollUntilDone` has been removed -- Function `*PrivateEndpointConnectionsDeletePoller.ResumeToken` has been removed -- Function `*OperationsListPager.NextPage` has been removed -- Function `*ManagedHsmsDeletePollerResponse.Resume` has been removed -- Function `*ManagedHsmsPurgeDeletedPoller.Done` has been removed -- Function `*MHSMPrivateEndpointConnectionsListByResourcePager.NextPage` has been removed -- Function `*OperationsListPager.Err` has been removed -- Function `*VaultsPurgeDeletedPoller.FinalResponse` has been removed -- Function `*VaultsCreateOrUpdatePoller.Done` has been removed -- Function `*ManagedHsmsCreateOrUpdatePollerResponse.Resume` has been removed -- Function `*MHSMPrivateEndpointConnectionsDeletePoller.ResumeToken` has been removed -- Function `*ManagedHsmsUpdatePoller.Done` has been removed -- Function `*PrivateEndpointConnectionsListByResourcePager.NextPage` has been removed -- Function `*MHSMPrivateEndpointConnectionsListByResourcePager.PageResponse` has been removed -- Struct `KeysCreateIfNotExistOptions` has been removed -- Struct `KeysCreateIfNotExistResponse` has been removed -- Struct `KeysCreateIfNotExistResult` has been removed -- Struct `KeysGetOptions` has been removed -- Struct `KeysGetResponse` has been removed -- Struct `KeysGetResult` has been removed -- Struct `KeysGetVersionOptions` has been removed -- Struct `KeysGetVersionResponse` has been removed -- Struct `KeysGetVersionResult` has been removed -- Struct `KeysListOptions` has been removed -- Struct `KeysListPager` has been removed -- Struct `KeysListResponse` has been removed -- Struct `KeysListResult` has been removed -- Struct `KeysListVersionsOptions` has been removed -- Struct `KeysListVersionsPager` has been removed -- Struct `KeysListVersionsResponse` has been removed -- Struct `KeysListVersionsResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsBeginDeleteOptions` has been removed -- Struct `MHSMPrivateEndpointConnectionsDeletePoller` has been removed -- Struct `MHSMPrivateEndpointConnectionsDeletePollerResponse` has been removed -- Struct `MHSMPrivateEndpointConnectionsDeleteResponse` has been removed -- Struct `MHSMPrivateEndpointConnectionsDeleteResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsGetOptions` has been removed -- Struct `MHSMPrivateEndpointConnectionsGetResponse` has been removed -- Struct `MHSMPrivateEndpointConnectionsGetResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsListByResourceOptions` has been removed -- Struct `MHSMPrivateEndpointConnectionsListByResourcePager` has been removed -- Struct `MHSMPrivateEndpointConnectionsListByResourceResponse` has been removed -- Struct `MHSMPrivateEndpointConnectionsListByResourceResult` has been removed -- Struct `MHSMPrivateEndpointConnectionsPutOptions` has been removed -- Struct `MHSMPrivateEndpointConnectionsPutResponse` has been removed -- Struct `MHSMPrivateEndpointConnectionsPutResult` has been removed -- Struct `MHSMPrivateLinkResourcesListByMHSMResourceOptions` has been removed -- Struct `MHSMPrivateLinkResourcesListByMHSMResourceResponse` has been removed -- Struct `MHSMPrivateLinkResourcesListByMHSMResourceResult` has been removed -- Struct `ManagedHsmsBeginCreateOrUpdateOptions` has been removed -- Struct `ManagedHsmsBeginDeleteOptions` has been removed -- Struct `ManagedHsmsBeginPurgeDeletedOptions` has been removed -- Struct `ManagedHsmsBeginUpdateOptions` has been removed -- Struct `ManagedHsmsCreateOrUpdatePoller` has been removed -- Struct `ManagedHsmsCreateOrUpdatePollerResponse` has been removed -- Struct `ManagedHsmsCreateOrUpdateResponse` has been removed -- Struct `ManagedHsmsCreateOrUpdateResult` has been removed -- Struct `ManagedHsmsDeletePoller` has been removed -- Struct `ManagedHsmsDeletePollerResponse` has been removed -- Struct `ManagedHsmsDeleteResponse` has been removed -- Struct `ManagedHsmsGetDeletedOptions` has been removed -- Struct `ManagedHsmsGetDeletedResponse` has been removed -- Struct `ManagedHsmsGetDeletedResult` has been removed -- Struct `ManagedHsmsGetOptions` has been removed -- Struct `ManagedHsmsGetResponse` has been removed -- Struct `ManagedHsmsGetResult` has been removed -- Struct `ManagedHsmsListByResourceGroupOptions` has been removed -- Struct `ManagedHsmsListByResourceGroupPager` has been removed -- Struct `ManagedHsmsListByResourceGroupResponse` has been removed -- Struct `ManagedHsmsListByResourceGroupResult` has been removed -- Struct `ManagedHsmsListBySubscriptionOptions` has been removed -- Struct `ManagedHsmsListBySubscriptionPager` has been removed -- Struct `ManagedHsmsListBySubscriptionResponse` has been removed -- Struct `ManagedHsmsListBySubscriptionResult` has been removed -- Struct `ManagedHsmsListDeletedOptions` has been removed -- Struct `ManagedHsmsListDeletedPager` has been removed -- Struct `ManagedHsmsListDeletedResponse` has been removed -- Struct `ManagedHsmsListDeletedResult` has been removed -- Struct `ManagedHsmsPurgeDeletedPoller` has been removed -- Struct `ManagedHsmsPurgeDeletedPollerResponse` has been removed -- Struct `ManagedHsmsPurgeDeletedResponse` has been removed -- Struct `ManagedHsmsUpdatePoller` has been removed -- Struct `ManagedHsmsUpdatePollerResponse` has been removed -- Struct `ManagedHsmsUpdateResponse` has been removed -- Struct `ManagedHsmsUpdateResult` has been removed -- Struct `OperationsListOptions` has been removed -- Struct `OperationsListPager` has been removed -- Struct `OperationsListResponse` has been removed -- Struct `OperationsListResult` has been removed -- Struct `PrivateEndpointConnectionsBeginDeleteOptions` has been removed -- Struct `PrivateEndpointConnectionsDeletePoller` has been removed -- Struct `PrivateEndpointConnectionsDeletePollerResponse` has been removed -- Struct `PrivateEndpointConnectionsDeleteResponse` has been removed -- Struct `PrivateEndpointConnectionsDeleteResult` has been removed -- Struct `PrivateEndpointConnectionsGetOptions` has been removed -- Struct `PrivateEndpointConnectionsGetResponse` has been removed -- Struct `PrivateEndpointConnectionsGetResult` has been removed -- Struct `PrivateEndpointConnectionsListByResourceOptions` has been removed -- Struct `PrivateEndpointConnectionsListByResourcePager` has been removed -- Struct `PrivateEndpointConnectionsListByResourceResponse` has been removed -- Struct `PrivateEndpointConnectionsListByResourceResult` has been removed -- Struct `PrivateEndpointConnectionsPutOptions` has been removed -- Struct `PrivateEndpointConnectionsPutResponse` has been removed -- Struct `PrivateEndpointConnectionsPutResult` has been removed -- Struct `PrivateLinkResourcesListByVaultOptions` has been removed -- Struct `PrivateLinkResourcesListByVaultResponse` has been removed -- Struct `PrivateLinkResourcesListByVaultResult` has been removed -- Struct `SecretsCreateOrUpdateOptions` has been removed -- Struct `SecretsCreateOrUpdateResponse` has been removed -- Struct `SecretsCreateOrUpdateResult` has been removed -- Struct `SecretsGetOptions` has been removed -- Struct `SecretsGetResponse` has been removed -- Struct `SecretsGetResult` has been removed -- Struct `SecretsListOptions` has been removed -- Struct `SecretsListPager` has been removed -- Struct `SecretsListResponse` has been removed -- Struct `SecretsListResult` has been removed -- Struct `SecretsUpdateOptions` has been removed -- Struct `SecretsUpdateResponse` has been removed -- Struct `SecretsUpdateResult` has been removed -- Struct `VaultsBeginCreateOrUpdateOptions` has been removed -- Struct `VaultsBeginPurgeDeletedOptions` has been removed -- Struct `VaultsCheckNameAvailabilityOptions` has been removed -- Struct `VaultsCheckNameAvailabilityResponse` has been removed -- Struct `VaultsCheckNameAvailabilityResult` has been removed -- Struct `VaultsCreateOrUpdatePoller` has been removed -- Struct `VaultsCreateOrUpdatePollerResponse` has been removed -- Struct `VaultsCreateOrUpdateResponse` has been removed -- Struct `VaultsCreateOrUpdateResult` has been removed -- Struct `VaultsDeleteOptions` has been removed -- Struct `VaultsDeleteResponse` has been removed -- Struct `VaultsGetDeletedOptions` has been removed -- Struct `VaultsGetDeletedResponse` has been removed -- Struct `VaultsGetDeletedResult` has been removed -- Struct `VaultsGetOptions` has been removed -- Struct `VaultsGetResponse` has been removed -- Struct `VaultsGetResult` has been removed -- Struct `VaultsListByResourceGroupOptions` has been removed -- Struct `VaultsListByResourceGroupPager` has been removed -- Struct `VaultsListByResourceGroupResponse` has been removed -- Struct `VaultsListByResourceGroupResult` has been removed -- Struct `VaultsListBySubscriptionOptions` has been removed -- Struct `VaultsListBySubscriptionPager` has been removed -- Struct `VaultsListBySubscriptionResponse` has been removed -- Struct `VaultsListBySubscriptionResult` has been removed -- Struct `VaultsListDeletedOptions` has been removed -- Struct `VaultsListDeletedPager` has been removed -- Struct `VaultsListDeletedResponse` has been removed -- Struct `VaultsListDeletedResult` has been removed -- Struct `VaultsListOptions` has been removed -- Struct `VaultsListPager` has been removed -- Struct `VaultsListResponse` has been removed -- Struct `VaultsListResult` has been removed -- Struct `VaultsPurgeDeletedPoller` has been removed -- Struct `VaultsPurgeDeletedPollerResponse` has been removed -- Struct `VaultsPurgeDeletedResponse` has been removed -- Struct `VaultsUpdateAccessPolicyOptions` has been removed -- Struct `VaultsUpdateAccessPolicyResponse` has been removed -- Struct `VaultsUpdateAccessPolicyResult` has been removed -- Struct `VaultsUpdateOptions` has been removed -- Struct `VaultsUpdateResponse` has been removed -- Struct `VaultsUpdateResult` has been removed -- Field `ManagedHsmResource` of struct `MHSMPrivateLinkResource` has been removed -- Field `Resource` of struct `PrivateLinkResource` has been removed -- Field `Resource` of struct `Secret` has been removed -- Field `InnerError` of struct `CloudError` has been removed -- Field `ManagedHsmResource` of struct `ManagedHsm` has been removed -- Field `InnerError` of struct `ManagedHsmError` has been removed -- Field `Resource` of struct `PrivateEndpointConnection` has been removed -- Field `Resource` of struct `Key` has been removed -- Field `Attributes` of struct `SecretAttributes` has been removed -- Field `ManagedHsmResource` of struct `MHSMPrivateEndpointConnection` has been removed - -### Features Added - -- New const `KeyPermissionsGetrotationpolicy` -- New const `KeyPermissionsSetrotationpolicy` -- New const `JSONWebKeyOperationRelease` -- New function `*VaultsClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*ManagedHsmsClientPurgeDeletedPoller.Done() bool` -- New function `*MHSMPrivateEndpointConnectionsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `SecretAttributes.MarshalJSON() ([]byte, error)` -- New function `*VaultsClientPurgeDeletedPoller.Poll(context.Context) (*http.Response, error)` -- New function `*ManagedHsmsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*PrivateEndpointConnectionsClientListByResourcePager.PageResponse() PrivateEndpointConnectionsClientListByResourceResponse` -- New function `*KeysClientListVersionsPager.PageResponse() KeysClientListVersionsResponse` -- New function `*MHSMPrivateEndpointConnectionsClientDeletePollerResponse.Resume(context.Context, *MHSMPrivateEndpointConnectionsClient, string) error` -- New function `*ManagedHsmsClientUpdatePollerResponse.Resume(context.Context, *ManagedHsmsClient, string) error` -- New function `*MHSMPrivateEndpointConnectionsClientListByResourcePager.Err() error` -- New function `*MHSMPrivateEndpointConnectionsClientDeletePoller.Done() bool` -- New function `*KeysClientListPager.Err() error` -- New function `*VaultsClientPurgeDeletedPollerResponse.Resume(context.Context, *VaultsClient, string) error` -- New function `*VaultsClientPurgeDeletedPoller.FinalResponse(context.Context) (VaultsClientPurgeDeletedResponse, error)` -- New function `*ManagedHsmsClientListDeletedPager.PageResponse() ManagedHsmsClientListDeletedResponse` -- New function `*SecretsClientListPager.PageResponse() SecretsClientListResponse` -- New function `*ManagedHsmsClientCreateOrUpdatePollerResponse.Resume(context.Context, *ManagedHsmsClient, string) error` -- New function `*ManagedHsmsClientDeletePollerResponse.Resume(context.Context, *ManagedHsmsClient, string) error` -- New function `*PrivateEndpointConnectionsClientDeletePoller.FinalResponse(context.Context) (PrivateEndpointConnectionsClientDeleteResponse, error)` -- New function `*VaultsClientListPager.NextPage(context.Context) bool` -- New function `*ManagedHsmsClientCreateOrUpdatePoller.FinalResponse(context.Context) (ManagedHsmsClientCreateOrUpdateResponse, error)` -- New function `*OperationsClientListPager.PageResponse() OperationsClientListResponse` -- New function `ManagedHsmsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (ManagedHsmsClientCreateOrUpdateResponse, error)` -- New function `*ManagedHsmsClientListBySubscriptionPager.Err() error` -- New function `*PrivateEndpointConnectionsClientDeletePoller.ResumeToken() (string, error)` -- New function `*OperationsClientListPager.Err() error` -- New function `*ManagedHsmsClientUpdatePoller.FinalResponse(context.Context) (ManagedHsmsClientUpdateResponse, error)` -- New function `*VaultsClientCreateOrUpdatePoller.FinalResponse(context.Context) (VaultsClientCreateOrUpdateResponse, error)` -- New function `*ManagedHsmsClientCreateOrUpdatePoller.Done() bool` -- New function `*PrivateEndpointConnectionsClientDeletePollerResponse.Resume(context.Context, *PrivateEndpointConnectionsClient, string) error` -- New function `*ManagedHsmsClientDeletePoller.Done() bool` -- New function `*ManagedHsmsClientPurgeDeletedPoller.ResumeToken() (string, error)` -- New function `*VaultsClientListBySubscriptionPager.PageResponse() VaultsClientListBySubscriptionResponse` -- New function `*VaultsClientListDeletedPager.NextPage(context.Context) bool` -- New function `*VaultsClientCreateOrUpdatePollerResponse.Resume(context.Context, *VaultsClient, string) error` -- New function `*VaultsClientCreateOrUpdatePoller.Done() bool` -- New function `*MHSMPrivateEndpointConnectionsClientListByResourcePager.PageResponse() MHSMPrivateEndpointConnectionsClientListByResourceResponse` -- New function `*ManagedHsmsClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `*ManagedHsmsClientPurgeDeletedPoller.FinalResponse(context.Context) (ManagedHsmsClientPurgeDeletedResponse, error)` -- New function `*ManagedHsmsClientListBySubscriptionPager.PageResponse() ManagedHsmsClientListBySubscriptionResponse` -- New function `*VaultsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*VaultsClientListBySubscriptionPager.Err() error` -- New function `ManagedHsmsClientUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (ManagedHsmsClientUpdateResponse, error)` -- New function `*PrivateEndpointConnectionsClientDeletePoller.Done() bool` -- New function `*ManagedHsmsClientUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `VaultsClientPurgeDeletedPollerResponse.PollUntilDone(context.Context, time.Duration) (VaultsClientPurgeDeletedResponse, error)` -- New function `*SecretsClientListPager.NextPage(context.Context) bool` -- New function `*VaultsClientListByResourceGroupPager.PageResponse() VaultsClientListByResourceGroupResponse` -- New function `*VaultsClientPurgeDeletedPoller.ResumeToken() (string, error)` -- New function `*VaultsClientListDeletedPager.PageResponse() VaultsClientListDeletedResponse` -- New function `*ManagedHsmsClientDeletePoller.ResumeToken() (string, error)` -- New function `*ManagedHsmsClientListDeletedPager.NextPage(context.Context) bool` -- New function `*ManagedHsmsClientPurgeDeletedPollerResponse.Resume(context.Context, *ManagedHsmsClient, string) error` -- New function `*ManagedHsmsClientUpdatePoller.ResumeToken() (string, error)` -- New function `*VaultsClientListDeletedPager.Err() error` -- New function `*PrivateEndpointConnectionsClientDeletePoller.Poll(context.Context) (*http.Response, error)` -- New function `*ManagedHsmsClientUpdatePoller.Done() bool` -- New function `*ManagedHsmsClientListByResourceGroupPager.NextPage(context.Context) bool` -- New function `*KeysClientListPager.NextPage(context.Context) bool` -- New function `*VaultsClientListBySubscriptionPager.NextPage(context.Context) bool` -- New function `*MHSMPrivateEndpointConnectionsClientDeletePoller.FinalResponse(context.Context) (MHSMPrivateEndpointConnectionsClientDeleteResponse, error)` -- New function `*KeysClientListVersionsPager.Err() error` -- New function `*PrivateEndpointConnectionsClientListByResourcePager.Err() error` -- New function `ManagedHsmsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (ManagedHsmsClientDeleteResponse, error)` -- New function `*ManagedHsmsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `*PrivateEndpointConnectionsClientListByResourcePager.NextPage(context.Context) bool` -- New function `*SecretAttributes.UnmarshalJSON([]byte) error` -- New function `*VaultsClientListPager.PageResponse() VaultsClientListResponse` -- New function `*ManagedHsmsClientDeletePoller.FinalResponse(context.Context) (ManagedHsmsClientDeleteResponse, error)` -- New function `*ManagedHsmsClientListDeletedPager.Err() error` -- New function `*ManagedHsmsClientPurgeDeletedPoller.Poll(context.Context) (*http.Response, error)` -- New function `*KeysClientListVersionsPager.NextPage(context.Context) bool` -- New function `*MHSMPrivateEndpointConnectionsClientListByResourcePager.NextPage(context.Context) bool` -- New function `*ManagedHsmsClientListByResourceGroupPager.PageResponse() ManagedHsmsClientListByResourceGroupResponse` -- New function `*VaultsClientListPager.Err() error` -- New function `*MHSMPrivateEndpointConnectionsClientDeletePoller.ResumeToken() (string, error)` -- New function `*VaultsClientListByResourceGroupPager.Err() error` -- New function `*ManagedHsmsClientListByResourceGroupPager.Err() error` -- New function `*VaultsClientCreateOrUpdatePoller.Poll(context.Context) (*http.Response, error)` -- New function `ManagedHsmsClientPurgeDeletedPollerResponse.PollUntilDone(context.Context, time.Duration) (ManagedHsmsClientPurgeDeletedResponse, error)` -- New function `*KeysClientListPager.PageResponse() KeysClientListResponse` -- New function `MHSMPrivateEndpointConnectionsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (MHSMPrivateEndpointConnectionsClientDeleteResponse, error)` -- New function `*ManagedHsmsClientCreateOrUpdatePoller.ResumeToken() (string, error)` -- New function `*SecretsClientListPager.Err() error` -- New function `VaultsClientCreateOrUpdatePollerResponse.PollUntilDone(context.Context, time.Duration) (VaultsClientCreateOrUpdateResponse, error)` -- New function `*VaultsClientPurgeDeletedPoller.Done() bool` -- New function `*OperationsClientListPager.NextPage(context.Context) bool` -- New function `PrivateEndpointConnectionsClientDeletePollerResponse.PollUntilDone(context.Context, time.Duration) (PrivateEndpointConnectionsClientDeleteResponse, error)` -- New struct `KeysClientCreateIfNotExistOptions` -- New struct `KeysClientCreateIfNotExistResponse` -- New struct `KeysClientCreateIfNotExistResult` -- New struct `KeysClientGetOptions` -- New struct `KeysClientGetResponse` -- New struct `KeysClientGetResult` -- New struct `KeysClientGetVersionOptions` -- New struct `KeysClientGetVersionResponse` -- New struct `KeysClientGetVersionResult` -- New struct `KeysClientListOptions` -- New struct `KeysClientListPager` -- New struct `KeysClientListResponse` -- New struct `KeysClientListResult` -- New struct `KeysClientListVersionsOptions` -- New struct `KeysClientListVersionsPager` -- New struct `KeysClientListVersionsResponse` -- New struct `KeysClientListVersionsResult` -- New struct `MHSMPrivateEndpointConnectionsClientBeginDeleteOptions` -- New struct `MHSMPrivateEndpointConnectionsClientDeletePoller` -- New struct `MHSMPrivateEndpointConnectionsClientDeletePollerResponse` -- New struct `MHSMPrivateEndpointConnectionsClientDeleteResponse` -- New struct `MHSMPrivateEndpointConnectionsClientDeleteResult` -- New struct `MHSMPrivateEndpointConnectionsClientGetOptions` -- New struct `MHSMPrivateEndpointConnectionsClientGetResponse` -- New struct `MHSMPrivateEndpointConnectionsClientGetResult` -- New struct `MHSMPrivateEndpointConnectionsClientListByResourceOptions` -- New struct `MHSMPrivateEndpointConnectionsClientListByResourcePager` -- New struct `MHSMPrivateEndpointConnectionsClientListByResourceResponse` -- New struct `MHSMPrivateEndpointConnectionsClientListByResourceResult` -- New struct `MHSMPrivateEndpointConnectionsClientPutOptions` -- New struct `MHSMPrivateEndpointConnectionsClientPutResponse` -- New struct `MHSMPrivateEndpointConnectionsClientPutResult` -- New struct `MHSMPrivateLinkResourcesClientListByMHSMResourceOptions` -- New struct `MHSMPrivateLinkResourcesClientListByMHSMResourceResponse` -- New struct `MHSMPrivateLinkResourcesClientListByMHSMResourceResult` -- New struct `ManagedHsmsClientBeginCreateOrUpdateOptions` -- New struct `ManagedHsmsClientBeginDeleteOptions` -- New struct `ManagedHsmsClientBeginPurgeDeletedOptions` -- New struct `ManagedHsmsClientBeginUpdateOptions` -- New struct `ManagedHsmsClientCreateOrUpdatePoller` -- New struct `ManagedHsmsClientCreateOrUpdatePollerResponse` -- New struct `ManagedHsmsClientCreateOrUpdateResponse` -- New struct `ManagedHsmsClientCreateOrUpdateResult` -- New struct `ManagedHsmsClientDeletePoller` -- New struct `ManagedHsmsClientDeletePollerResponse` -- New struct `ManagedHsmsClientDeleteResponse` -- New struct `ManagedHsmsClientGetDeletedOptions` -- New struct `ManagedHsmsClientGetDeletedResponse` -- New struct `ManagedHsmsClientGetDeletedResult` -- New struct `ManagedHsmsClientGetOptions` -- New struct `ManagedHsmsClientGetResponse` -- New struct `ManagedHsmsClientGetResult` -- New struct `ManagedHsmsClientListByResourceGroupOptions` -- New struct `ManagedHsmsClientListByResourceGroupPager` -- New struct `ManagedHsmsClientListByResourceGroupResponse` -- New struct `ManagedHsmsClientListByResourceGroupResult` -- New struct `ManagedHsmsClientListBySubscriptionOptions` -- New struct `ManagedHsmsClientListBySubscriptionPager` -- New struct `ManagedHsmsClientListBySubscriptionResponse` -- New struct `ManagedHsmsClientListBySubscriptionResult` -- New struct `ManagedHsmsClientListDeletedOptions` -- New struct `ManagedHsmsClientListDeletedPager` -- New struct `ManagedHsmsClientListDeletedResponse` -- New struct `ManagedHsmsClientListDeletedResult` -- New struct `ManagedHsmsClientPurgeDeletedPoller` -- New struct `ManagedHsmsClientPurgeDeletedPollerResponse` -- New struct `ManagedHsmsClientPurgeDeletedResponse` -- New struct `ManagedHsmsClientUpdatePoller` -- New struct `ManagedHsmsClientUpdatePollerResponse` -- New struct `ManagedHsmsClientUpdateResponse` -- New struct `ManagedHsmsClientUpdateResult` -- New struct `OperationsClientListOptions` -- New struct `OperationsClientListPager` -- New struct `OperationsClientListResponse` -- New struct `OperationsClientListResult` -- New struct `PrivateEndpointConnectionsClientBeginDeleteOptions` -- New struct `PrivateEndpointConnectionsClientDeletePoller` -- New struct `PrivateEndpointConnectionsClientDeletePollerResponse` -- New struct `PrivateEndpointConnectionsClientDeleteResponse` -- New struct `PrivateEndpointConnectionsClientDeleteResult` -- New struct `PrivateEndpointConnectionsClientGetOptions` -- New struct `PrivateEndpointConnectionsClientGetResponse` -- New struct `PrivateEndpointConnectionsClientGetResult` -- New struct `PrivateEndpointConnectionsClientListByResourceOptions` -- New struct `PrivateEndpointConnectionsClientListByResourcePager` -- New struct `PrivateEndpointConnectionsClientListByResourceResponse` -- New struct `PrivateEndpointConnectionsClientListByResourceResult` -- New struct `PrivateEndpointConnectionsClientPutOptions` -- New struct `PrivateEndpointConnectionsClientPutResponse` -- New struct `PrivateEndpointConnectionsClientPutResult` -- New struct `PrivateLinkResourcesClientListByVaultOptions` -- New struct `PrivateLinkResourcesClientListByVaultResponse` -- New struct `PrivateLinkResourcesClientListByVaultResult` -- New struct `SecretsClientCreateOrUpdateOptions` -- New struct `SecretsClientCreateOrUpdateResponse` -- New struct `SecretsClientCreateOrUpdateResult` -- New struct `SecretsClientGetOptions` -- New struct `SecretsClientGetResponse` -- New struct `SecretsClientGetResult` -- New struct `SecretsClientListOptions` -- New struct `SecretsClientListPager` -- New struct `SecretsClientListResponse` -- New struct `SecretsClientListResult` -- New struct `SecretsClientUpdateOptions` -- New struct `SecretsClientUpdateResponse` -- New struct `SecretsClientUpdateResult` -- New struct `VaultsClientBeginCreateOrUpdateOptions` -- New struct `VaultsClientBeginPurgeDeletedOptions` -- New struct `VaultsClientCheckNameAvailabilityOptions` -- New struct `VaultsClientCheckNameAvailabilityResponse` -- New struct `VaultsClientCheckNameAvailabilityResult` -- New struct `VaultsClientCreateOrUpdatePoller` -- New struct `VaultsClientCreateOrUpdatePollerResponse` -- New struct `VaultsClientCreateOrUpdateResponse` -- New struct `VaultsClientCreateOrUpdateResult` -- New struct `VaultsClientDeleteOptions` -- New struct `VaultsClientDeleteResponse` -- New struct `VaultsClientGetDeletedOptions` -- New struct `VaultsClientGetDeletedResponse` -- New struct `VaultsClientGetDeletedResult` -- New struct `VaultsClientGetOptions` -- New struct `VaultsClientGetResponse` -- New struct `VaultsClientGetResult` -- New struct `VaultsClientListByResourceGroupOptions` -- New struct `VaultsClientListByResourceGroupPager` -- New struct `VaultsClientListByResourceGroupResponse` -- New struct `VaultsClientListByResourceGroupResult` -- New struct `VaultsClientListBySubscriptionOptions` -- New struct `VaultsClientListBySubscriptionPager` -- New struct `VaultsClientListBySubscriptionResponse` -- New struct `VaultsClientListBySubscriptionResult` -- New struct `VaultsClientListDeletedOptions` -- New struct `VaultsClientListDeletedPager` -- New struct `VaultsClientListDeletedResponse` -- New struct `VaultsClientListDeletedResult` -- New struct `VaultsClientListOptions` -- New struct `VaultsClientListPager` -- New struct `VaultsClientListResponse` -- New struct `VaultsClientListResult` -- New struct `VaultsClientPurgeDeletedPoller` -- New struct `VaultsClientPurgeDeletedPollerResponse` -- New struct `VaultsClientPurgeDeletedResponse` -- New struct `VaultsClientUpdateAccessPolicyOptions` -- New struct `VaultsClientUpdateAccessPolicyResponse` -- New struct `VaultsClientUpdateAccessPolicyResult` -- New struct `VaultsClientUpdateOptions` -- New struct `VaultsClientUpdateResponse` -- New struct `VaultsClientUpdateResult` -- New field `Name` in struct `MHSMPrivateLinkResource` -- New field `SystemData` in struct `MHSMPrivateLinkResource` -- New field `Type` in struct `MHSMPrivateLinkResource` -- New field `Location` in struct `MHSMPrivateLinkResource` -- New field `SKU` in struct `MHSMPrivateLinkResource` -- New field `Tags` in struct `MHSMPrivateLinkResource` -- New field `ID` in struct `MHSMPrivateLinkResource` -- New field `Tags` in struct `PrivateEndpointConnection` -- New field `Type` in struct `PrivateEndpointConnection` -- New field `ID` in struct `PrivateEndpointConnection` -- New field `Location` in struct `PrivateEndpointConnection` -- New field `Name` in struct `PrivateEndpointConnection` -- New field `ID` in struct `Secret` -- New field `Location` in struct `Secret` -- New field `Name` in struct `Secret` -- New field `Tags` in struct `Secret` -- New field `Type` in struct `Secret` -- New field `Expires` in struct `SecretAttributes` -- New field `NotBefore` in struct `SecretAttributes` -- New field `Created` in struct `SecretAttributes` -- New field `Updated` in struct `SecretAttributes` -- New field `Enabled` in struct `SecretAttributes` -- New field `Location` in struct `Key` -- New field `Name` in struct `Key` -- New field `Tags` in struct `Key` -- New field `Type` in struct `Key` -- New field `ID` in struct `Key` -- New field `Error` in struct `CloudError` -- New field `Error` in struct `ManagedHsmError` -- New field `SKU` in struct `MHSMPrivateEndpointConnection` -- New field `SystemData` in struct `MHSMPrivateEndpointConnection` -- New field `Type` in struct `MHSMPrivateEndpointConnection` -- New field `Location` in struct `MHSMPrivateEndpointConnection` -- New field `Tags` in struct `MHSMPrivateEndpointConnection` -- New field `ID` in struct `MHSMPrivateEndpointConnection` -- New field `Name` in struct `MHSMPrivateEndpointConnection` -- New field `ID` in struct `PrivateLinkResource` -- New field `Location` in struct `PrivateLinkResource` -- New field `Name` in struct `PrivateLinkResource` -- New field `Tags` in struct `PrivateLinkResource` -- New field `Type` in struct `PrivateLinkResource` -- New field `Name` in struct `ManagedHsm` -- New field `SystemData` in struct `ManagedHsm` -- New field `Type` in struct `ManagedHsm` -- New field `Location` in struct `ManagedHsm` -- New field `SKU` in struct `ManagedHsm` -- New field `Tags` in struct `ManagedHsm` -- New field `ID` in struct `ManagedHsm` - - -## 0.2.1 (2021-11-26) - -### Other Changes - -- Now use `github.com/Azure/azure-sdk-for-go/sdk/azidentity@v0.12.0` explicitly. - -## 0.2.0 (2021-10-29) +## 1.0.0 (2022-05-16) -### Breaking Changes +The package of `github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault` 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. -- `arm.Connection` has been removed in `github.com/Azure/azure-sdk-for-go/sdk/azcore/v0.20.0` -- The parameters of `NewXXXClient` has been changed from `(con *arm.Connection, subscriptionID string)` to `(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions)` +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/azsdk/go/mgmt/migration). -## 0.1.0 (2021-09-29) -- To better align with the Azure SDK guidelines (https://azure.github.io/azure-sdk/general_introduction.html), we have decided to change the module path to "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault". Therefore, we are deprecating the old module path (which is "github.com/Azure/azure-sdk-for-go/sdk/keyvault/armkeyvault") to avoid confusion. +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/go/mgmt). \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/README.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/README.md index ed0ac4504a..11dbffa467 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/README.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/README.md @@ -11,7 +11,7 @@ The `armkeyvault` module provides operations for working with Azure Key Vault. ## Prerequisites - an [Azure subscription](https://azure.microsoft.com/free/) -- Go 1.18 or above +- 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 @@ -33,12 +33,12 @@ 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). -## Clients +## Client Factory -Azure Key Vault modules consist of one or more clients. A client groups a set of related APIs, providing access to its functionality within the specified subscription. Create one or more clients to access the APIs you require using your credential. +Azure Key Vault module consists of one or more clients. We provide a client factory which could be used to create any client in this module. ```go -client, err := armkeyvault.NewKeysClient(, cred, nil) +clientFactory, err := armkeyvault.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). @@ -49,7 +49,15 @@ options := arm.ClientOptions { Cloud: cloud.AzureChina, }, } -client, err := armkeyvault.NewKeysClient(, cred, &options) +clientFactory, err := armkeyvault.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.NewVaultsClient() ``` ## More sample code diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/assets.json new file mode 100644 index 0000000000..9ae804c30f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "go", + "TagPrefix": "go/resourcemanager/keyvault/armkeyvault", + "Tag": "go/resourcemanager/keyvault/armkeyvault_283c3f03b2" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md index a930f8d5ad..4692f2f562 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md @@ -4,12 +4,12 @@ ``` yaml azure-arm: true -tag: package-2021-10 require: -- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/keyvault/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/keyvault/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/keyvault/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/keyvault/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.0.0 +module-version: 1.2.0 modelerfour: seal-single-value-enum-by-default: true +tag: package-2023-02 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go index 4e71bd3b4c..c3da538ed3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go @@ -2,6 +2,6 @@ // 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.exe ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/keyvault/armkeyvault +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/keyvault/armkeyvault package armkeyvault diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go new file mode 100644 index 0000000000..ff61f9101e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go @@ -0,0 +1,95 @@ +//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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armkeyvault + +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 + credential azcore.TokenCredential + options *arm.ClientOptions +} + +// 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) { + _, err := arm.NewClient(moduleName+".ClientFactory", moduleVersion, credential, options) + if err != nil { + return nil, err + } + return &ClientFactory{ + subscriptionID: subscriptionID, credential: credential, + options: options.Clone(), + }, nil +} + +func (c *ClientFactory) NewKeysClient() *KeysClient { + subClient, _ := NewKeysClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewManagedHsmKeysClient() *ManagedHsmKeysClient { + subClient, _ := NewManagedHsmKeysClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewVaultsClient() *VaultsClient { + subClient, _ := NewVaultsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewManagedHsmsClient() *ManagedHsmsClient { + subClient, _ := NewManagedHsmsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewMHSMPrivateEndpointConnectionsClient() *MHSMPrivateEndpointConnectionsClient { + subClient, _ := NewMHSMPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewMHSMPrivateLinkResourcesClient() *MHSMPrivateLinkResourcesClient { + subClient, _ := NewMHSMPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewMHSMRegionsClient() *MHSMRegionsClient { + subClient, _ := NewMHSMRegionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewSecretsClient() *SecretsClient { + subClient, _ := NewSecretsClient(c.subscriptionID, c.credential, c.options) + return subClient +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/constants.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_constants.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/constants.go index 7e995b84aa..d6415ed560 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/constants.go @@ -5,12 +5,13 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault const ( moduleName = "armkeyvault" - moduleVersion = "v1.0.0" + moduleVersion = "v1.2.0" ) type AccessPolicyUpdateKind string @@ -44,6 +45,30 @@ func PossibleActionsRequiredValues() []ActionsRequired { } } +// ActivationStatus - Activation Status +type ActivationStatus string + +const ( + // ActivationStatusActive - The managed HSM Pool is active. + ActivationStatusActive ActivationStatus = "Active" + // ActivationStatusFailed - Failed to activate managed hsm. + ActivationStatusFailed ActivationStatus = "Failed" + // ActivationStatusNotActivated - The managed HSM Pool is not yet activated. + ActivationStatusNotActivated ActivationStatus = "NotActivated" + // ActivationStatusUnknown - An unknown error occurred while activating managed hsm. + ActivationStatusUnknown ActivationStatus = "Unknown" +) + +// PossibleActivationStatusValues returns the possible values for the ActivationStatus const type. +func PossibleActivationStatusValues() []ActivationStatus { + return []ActivationStatus{ + ActivationStatusActive, + ActivationStatusFailed, + ActivationStatusNotActivated, + ActivationStatusUnknown, + } +} + type CertificatePermissions string const ( @@ -127,6 +152,30 @@ func PossibleDeletionRecoveryLevelValues() []DeletionRecoveryLevel { } } +// GeoReplicationRegionProvisioningState - The current provisioning state. +type GeoReplicationRegionProvisioningState string + +const ( + GeoReplicationRegionProvisioningStateCleanup GeoReplicationRegionProvisioningState = "Cleanup" + GeoReplicationRegionProvisioningStateDeleting GeoReplicationRegionProvisioningState = "Deleting" + GeoReplicationRegionProvisioningStateFailed GeoReplicationRegionProvisioningState = "Failed" + GeoReplicationRegionProvisioningStatePreprovisioning GeoReplicationRegionProvisioningState = "Preprovisioning" + GeoReplicationRegionProvisioningStateProvisioning GeoReplicationRegionProvisioningState = "Provisioning" + GeoReplicationRegionProvisioningStateSucceeded GeoReplicationRegionProvisioningState = "Succeeded" +) + +// PossibleGeoReplicationRegionProvisioningStateValues returns the possible values for the GeoReplicationRegionProvisioningState const type. +func PossibleGeoReplicationRegionProvisioningStateValues() []GeoReplicationRegionProvisioningState { + return []GeoReplicationRegionProvisioningState{ + GeoReplicationRegionProvisioningStateCleanup, + GeoReplicationRegionProvisioningStateDeleting, + GeoReplicationRegionProvisioningStateFailed, + GeoReplicationRegionProvisioningStatePreprovisioning, + GeoReplicationRegionProvisioningStateProvisioning, + GeoReplicationRegionProvisioningStateSucceeded, + } +} + // IdentityType - The type of identity. type IdentityType string @@ -174,6 +223,7 @@ const ( JSONWebKeyOperationDecrypt JSONWebKeyOperation = "decrypt" JSONWebKeyOperationEncrypt JSONWebKeyOperation = "encrypt" JSONWebKeyOperationImport JSONWebKeyOperation = "import" + JSONWebKeyOperationRelease JSONWebKeyOperation = "release" JSONWebKeyOperationSign JSONWebKeyOperation = "sign" JSONWebKeyOperationUnwrapKey JSONWebKeyOperation = "unwrapKey" JSONWebKeyOperationVerify JSONWebKeyOperation = "verify" @@ -186,6 +236,7 @@ func PossibleJSONWebKeyOperationValues() []JSONWebKeyOperation { JSONWebKeyOperationDecrypt, JSONWebKeyOperationEncrypt, JSONWebKeyOperationImport, + JSONWebKeyOperationRelease, JSONWebKeyOperationSign, JSONWebKeyOperationUnwrapKey, JSONWebKeyOperationVerify, @@ -216,23 +267,27 @@ func PossibleJSONWebKeyTypeValues() []JSONWebKeyType { type KeyPermissions string const ( - KeyPermissionsAll KeyPermissions = "all" - KeyPermissionsBackup KeyPermissions = "backup" - KeyPermissionsCreate KeyPermissions = "create" - KeyPermissionsDecrypt KeyPermissions = "decrypt" - KeyPermissionsDelete KeyPermissions = "delete" - KeyPermissionsEncrypt KeyPermissions = "encrypt" - KeyPermissionsGet KeyPermissions = "get" - KeyPermissionsImport KeyPermissions = "import" - KeyPermissionsList KeyPermissions = "list" - KeyPermissionsPurge KeyPermissions = "purge" - KeyPermissionsRecover KeyPermissions = "recover" - KeyPermissionsRestore KeyPermissions = "restore" - KeyPermissionsSign KeyPermissions = "sign" - KeyPermissionsUnwrapKey KeyPermissions = "unwrapKey" - KeyPermissionsUpdate KeyPermissions = "update" - KeyPermissionsVerify KeyPermissions = "verify" - KeyPermissionsWrapKey KeyPermissions = "wrapKey" + KeyPermissionsAll KeyPermissions = "all" + KeyPermissionsBackup KeyPermissions = "backup" + KeyPermissionsCreate KeyPermissions = "create" + KeyPermissionsDecrypt KeyPermissions = "decrypt" + KeyPermissionsDelete KeyPermissions = "delete" + KeyPermissionsEncrypt KeyPermissions = "encrypt" + KeyPermissionsGet KeyPermissions = "get" + KeyPermissionsGetrotationpolicy KeyPermissions = "getrotationpolicy" + KeyPermissionsImport KeyPermissions = "import" + KeyPermissionsList KeyPermissions = "list" + KeyPermissionsPurge KeyPermissions = "purge" + KeyPermissionsRecover KeyPermissions = "recover" + KeyPermissionsRelease KeyPermissions = "release" + KeyPermissionsRestore KeyPermissions = "restore" + KeyPermissionsRotate KeyPermissions = "rotate" + KeyPermissionsSetrotationpolicy KeyPermissions = "setrotationpolicy" + KeyPermissionsSign KeyPermissions = "sign" + KeyPermissionsUnwrapKey KeyPermissions = "unwrapKey" + KeyPermissionsUpdate KeyPermissions = "update" + KeyPermissionsVerify KeyPermissions = "verify" + KeyPermissionsWrapKey KeyPermissions = "wrapKey" ) // PossibleKeyPermissionsValues returns the possible values for the KeyPermissions const type. @@ -245,11 +300,15 @@ func PossibleKeyPermissionsValues() []KeyPermissions { KeyPermissionsDelete, KeyPermissionsEncrypt, KeyPermissionsGet, + KeyPermissionsGetrotationpolicy, KeyPermissionsImport, KeyPermissionsList, KeyPermissionsPurge, KeyPermissionsRecover, + KeyPermissionsRelease, KeyPermissionsRestore, + KeyPermissionsRotate, + KeyPermissionsSetrotationpolicy, KeyPermissionsSign, KeyPermissionsUnwrapKey, KeyPermissionsUpdate, @@ -258,6 +317,22 @@ func PossibleKeyPermissionsValues() []KeyPermissions { } } +// KeyRotationPolicyActionType - The type of action. +type KeyRotationPolicyActionType string + +const ( + KeyRotationPolicyActionTypeRotate KeyRotationPolicyActionType = "rotate" + KeyRotationPolicyActionTypeNotify KeyRotationPolicyActionType = "notify" +) + +// PossibleKeyRotationPolicyActionTypeValues returns the possible values for the KeyRotationPolicyActionType const type. +func PossibleKeyRotationPolicyActionTypeValues() []KeyRotationPolicyActionType { + return []KeyRotationPolicyActionType{ + KeyRotationPolicyActionTypeRotate, + KeyRotationPolicyActionTypeNotify, + } +} + // ManagedHsmSKUFamily - SKU Family of the managed HSM Pool type ManagedHsmSKUFamily string diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_keys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/keys_client.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_keys_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/keys_client.go index f9f68548bd..bd55b5b7cc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_keys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/keys_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -25,32 +24,23 @@ import ( // KeysClient contains the methods for the Keys group. // Don't use this type directly, use NewKeysClient() instead. type KeysClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewKeysClient creates a new instance of KeysClient 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. +// - 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 NewKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KeysClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".KeysClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &KeysClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } @@ -59,18 +49,21 @@ func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, opt // key is returned without any write operations being performed. This API does not create subsequent // versions, and does not update existing keys. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group which contains the specified key vault. -// vaultName - The name of the key vault which contains the key to be created. -// keyName - The name of the key to be created. -// parameters - The parameters used to create the specified key. -// options - KeysClientCreateIfNotExistOptions contains the optional parameters for the KeysClient.CreateIfNotExist method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group which contains the specified key vault. +// - vaultName - The name of the key vault which contains the key to be created. +// - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the +// service. The value provided should not include personally identifiable or sensitive +// information. +// - parameters - The parameters used to create the specified key. +// - options - KeysClientCreateIfNotExistOptions contains the optional parameters for the KeysClient.CreateIfNotExist method. func (client *KeysClient) CreateIfNotExist(ctx context.Context, resourceGroupName string, vaultName string, keyName string, parameters KeyCreateParameters, options *KeysClientCreateIfNotExistOptions) (KeysClientCreateIfNotExistResponse, error) { req, err := client.createIfNotExistCreateRequest(ctx, resourceGroupName, vaultName, keyName, parameters, options) if err != nil { return KeysClientCreateIfNotExistResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientCreateIfNotExistResponse{}, err } @@ -99,12 +92,12 @@ func (client *KeysClient) createIfNotExistCreateRequest(ctx context.Context, res return nil, errors.New("parameter keyName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -121,17 +114,18 @@ func (client *KeysClient) createIfNotExistHandleResponse(resp *http.Response) (K // Get - Gets the current version of the specified key from the specified key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group which contains the specified key vault. -// vaultName - The name of the vault which contains the key to be retrieved. -// keyName - The name of the key to be retrieved. -// options - KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group which contains the specified key vault. +// - vaultName - The name of the vault which contains the key to be retrieved. +// - keyName - The name of the key to be retrieved. +// - options - KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. func (client *KeysClient) Get(ctx context.Context, resourceGroupName string, vaultName string, keyName string, options *KeysClientGetOptions) (KeysClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, keyName, options) if err != nil { return KeysClientGetResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientGetResponse{}, err } @@ -160,12 +154,12 @@ func (client *KeysClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, errors.New("parameter keyName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,18 +176,19 @@ func (client *KeysClient) getHandleResponse(resp *http.Response) (KeysClientGetR // GetVersion - Gets the specified version of the specified key in the specified key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group which contains the specified key vault. -// vaultName - The name of the vault which contains the key version to be retrieved. -// keyName - The name of the key version to be retrieved. -// keyVersion - The version of the key to be retrieved. -// options - KeysClientGetVersionOptions contains the optional parameters for the KeysClient.GetVersion method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group which contains the specified key vault. +// - vaultName - The name of the vault which contains the key version to be retrieved. +// - keyName - The name of the key version to be retrieved. +// - keyVersion - The version of the key to be retrieved. +// - options - KeysClientGetVersionOptions contains the optional parameters for the KeysClient.GetVersion method. func (client *KeysClient) GetVersion(ctx context.Context, resourceGroupName string, vaultName string, keyName string, keyVersion string, options *KeysClientGetVersionOptions) (KeysClientGetVersionResponse, error) { req, err := client.getVersionCreateRequest(ctx, resourceGroupName, vaultName, keyName, keyVersion, options) if err != nil { return KeysClientGetVersionResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientGetVersionResponse{}, err } @@ -226,12 +221,12 @@ func (client *KeysClient) getVersionCreateRequest(ctx context.Context, resourceG return nil, errors.New("parameter keyVersion cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{keyVersion}", url.PathEscape(keyVersion)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,11 +242,11 @@ func (client *KeysClient) getVersionHandleResponse(resp *http.Response) (KeysCli } // NewListPager - Lists the keys in the specified key vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group which contains the specified key vault. -// vaultName - The name of the vault which contains the keys to be retrieved. -// options - KeysClientListOptions contains the optional parameters for the KeysClient.List method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group which contains the specified key vault. +// - vaultName - The name of the vault which contains the keys to be retrieved. +// - options - KeysClientListOptions contains the optional parameters for the KeysClient.NewListPager method. func (client *KeysClient) NewListPager(resourceGroupName string, vaultName string, options *KeysClientListOptions) *runtime.Pager[KeysClientListResponse] { return runtime.NewPager(runtime.PagingHandler[KeysClientListResponse]{ More: func(page KeysClientListResponse) bool { @@ -268,7 +263,7 @@ func (client *KeysClient) NewListPager(resourceGroupName string, vaultName strin if err != nil { return KeysClientListResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientListResponse{}, err } @@ -295,12 +290,12 @@ func (client *KeysClient) listCreateRequest(ctx context.Context, resourceGroupNa return nil, errors.New("parameter vaultName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -316,12 +311,12 @@ func (client *KeysClient) listHandleResponse(resp *http.Response) (KeysClientLis } // NewListVersionsPager - Lists the versions of the specified key in the specified key vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the resource group which contains the specified key vault. -// vaultName - The name of the vault which contains the key versions to be retrieved. -// keyName - The name of the key versions to be retrieved. -// options - KeysClientListVersionsOptions contains the optional parameters for the KeysClient.ListVersions method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group which contains the specified key vault. +// - vaultName - The name of the vault which contains the key versions to be retrieved. +// - keyName - The name of the key versions to be retrieved. +// - options - KeysClientListVersionsOptions contains the optional parameters for the KeysClient.NewListVersionsPager method. func (client *KeysClient) NewListVersionsPager(resourceGroupName string, vaultName string, keyName string, options *KeysClientListVersionsOptions) *runtime.Pager[KeysClientListVersionsResponse] { return runtime.NewPager(runtime.PagingHandler[KeysClientListVersionsResponse]{ More: func(page KeysClientListVersionsResponse) bool { @@ -338,7 +333,7 @@ func (client *KeysClient) NewListVersionsPager(resourceGroupName string, vaultNa if err != nil { return KeysClientListVersionsResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientListVersionsResponse{}, err } @@ -369,12 +364,12 @@ func (client *KeysClient) listVersionsCreateRequest(ctx context.Context, resourc return nil, errors.New("parameter keyName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-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/keyvault/armkeyvault/managedhsmkeys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsmkeys_client.go new file mode 100644 index 0000000000..3288eefd3f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsmkeys_client.go @@ -0,0 +1,394 @@ +//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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armkeyvault + +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" +) + +// ManagedHsmKeysClient contains the methods for the ManagedHsmKeys group. +// Don't use this type directly, use NewManagedHsmKeysClient() instead. +type ManagedHsmKeysClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedHsmKeysClient creates a new instance of ManagedHsmKeysClient 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 NewManagedHsmKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedHsmKeysClient, error) { + cl, err := arm.NewClient(moduleName+".ManagedHsmKeysClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedHsmKeysClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateIfNotExist - Creates the first version of a new key if it does not exist. If it already exists, then the existing +// key is returned without any write operations being performed. This API does not create subsequent +// versions, and does not update existing keys. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - name - The name of the Managed HSM Pool within the specified resource group. +// - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the +// service. The value provided should not include personally identifiable or sensitive +// information. +// - parameters - The parameters used to create the specified key. +// - options - ManagedHsmKeysClientCreateIfNotExistOptions contains the optional parameters for the ManagedHsmKeysClient.CreateIfNotExist +// method. +func (client *ManagedHsmKeysClient) CreateIfNotExist(ctx context.Context, resourceGroupName string, name string, keyName string, parameters ManagedHsmKeyCreateParameters, options *ManagedHsmKeysClientCreateIfNotExistOptions) (ManagedHsmKeysClientCreateIfNotExistResponse, error) { + req, err := client.createIfNotExistCreateRequest(ctx, resourceGroupName, name, keyName, parameters, options) + if err != nil { + return ManagedHsmKeysClientCreateIfNotExistResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedHsmKeysClientCreateIfNotExistResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedHsmKeysClientCreateIfNotExistResponse{}, runtime.NewResponseError(resp) + } + return client.createIfNotExistHandleResponse(resp) +} + +// createIfNotExistCreateRequest creates the CreateIfNotExist request. +func (client *ManagedHsmKeysClient) createIfNotExistCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, parameters ManagedHsmKeyCreateParameters, options *ManagedHsmKeysClientCreateIfNotExistOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}" + 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 name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + 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-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, parameters) +} + +// createIfNotExistHandleResponse handles the CreateIfNotExist response. +func (client *ManagedHsmKeysClient) createIfNotExistHandleResponse(resp *http.Response) (ManagedHsmKeysClientCreateIfNotExistResponse, error) { + result := ManagedHsmKeysClientCreateIfNotExistResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedHsmKey); err != nil { + return ManagedHsmKeysClientCreateIfNotExistResponse{}, err + } + return result, nil +} + +// Get - Gets the current version of the specified key from the specified managed HSM. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - name - The name of the Managed HSM Pool within the specified resource group. +// - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the +// service. The value provided should not include personally identifiable or sensitive +// information. +// - options - ManagedHsmKeysClientGetOptions contains the optional parameters for the ManagedHsmKeysClient.Get method. +func (client *ManagedHsmKeysClient) Get(ctx context.Context, resourceGroupName string, name string, keyName string, options *ManagedHsmKeysClientGetOptions) (ManagedHsmKeysClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, name, keyName, options) + if err != nil { + return ManagedHsmKeysClientGetResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedHsmKeysClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedHsmKeysClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *ManagedHsmKeysClient) getCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, options *ManagedHsmKeysClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}" + 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 name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + 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-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedHsmKeysClient) getHandleResponse(resp *http.Response) (ManagedHsmKeysClientGetResponse, error) { + result := ManagedHsmKeysClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedHsmKey); err != nil { + return ManagedHsmKeysClientGetResponse{}, err + } + return result, nil +} + +// GetVersion - Gets the specified version of the specified key in the specified managed HSM. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - name - The name of the Managed HSM Pool within the specified resource group. +// - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the +// service. The value provided should not include personally identifiable or sensitive +// information. +// - keyVersion - The version of the key to be retrieved. +// - options - ManagedHsmKeysClientGetVersionOptions contains the optional parameters for the ManagedHsmKeysClient.GetVersion +// method. +func (client *ManagedHsmKeysClient) GetVersion(ctx context.Context, resourceGroupName string, name string, keyName string, keyVersion string, options *ManagedHsmKeysClientGetVersionOptions) (ManagedHsmKeysClientGetVersionResponse, error) { + req, err := client.getVersionCreateRequest(ctx, resourceGroupName, name, keyName, keyVersion, options) + if err != nil { + return ManagedHsmKeysClientGetVersionResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedHsmKeysClientGetVersionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedHsmKeysClientGetVersionResponse{}, runtime.NewResponseError(resp) + } + return client.getVersionHandleResponse(resp) +} + +// getVersionCreateRequest creates the GetVersion request. +func (client *ManagedHsmKeysClient) getVersionCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, keyVersion string, options *ManagedHsmKeysClientGetVersionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}/versions/{keyVersion}" + 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 name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + if keyVersion == "" { + return nil, errors.New("parameter keyVersion cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyVersion}", url.PathEscape(keyVersion)) + 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-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getVersionHandleResponse handles the GetVersion response. +func (client *ManagedHsmKeysClient) getVersionHandleResponse(resp *http.Response) (ManagedHsmKeysClientGetVersionResponse, error) { + result := ManagedHsmKeysClientGetVersionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedHsmKey); err != nil { + return ManagedHsmKeysClientGetVersionResponse{}, err + } + return result, nil +} + +// NewListPager - Lists the keys in the specified managed HSM. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - name - The name of the Managed HSM Pool within the specified resource group. +// - options - ManagedHsmKeysClientListOptions contains the optional parameters for the ManagedHsmKeysClient.NewListPager method. +func (client *ManagedHsmKeysClient) NewListPager(resourceGroupName string, name string, options *ManagedHsmKeysClientListOptions) *runtime.Pager[ManagedHsmKeysClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedHsmKeysClientListResponse]{ + More: func(page ManagedHsmKeysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedHsmKeysClientListResponse) (ManagedHsmKeysClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, name, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ManagedHsmKeysClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedHsmKeysClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedHsmKeysClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *ManagedHsmKeysClient) listCreateRequest(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmKeysClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys" + 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 name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + 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-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ManagedHsmKeysClient) listHandleResponse(resp *http.Response) (ManagedHsmKeysClientListResponse, error) { + result := ManagedHsmKeysClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedHsmKeyListResult); err != nil { + return ManagedHsmKeysClientListResponse{}, err + } + return result, nil +} + +// NewListVersionsPager - Lists the versions of the specified key in the specified managed HSM. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - name - The name of the Managed HSM Pool within the specified resource group. +// - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the +// service. The value provided should not include personally identifiable or sensitive +// information. +// - options - ManagedHsmKeysClientListVersionsOptions contains the optional parameters for the ManagedHsmKeysClient.NewListVersionsPager +// method. +func (client *ManagedHsmKeysClient) NewListVersionsPager(resourceGroupName string, name string, keyName string, options *ManagedHsmKeysClientListVersionsOptions) *runtime.Pager[ManagedHsmKeysClientListVersionsResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedHsmKeysClientListVersionsResponse]{ + More: func(page ManagedHsmKeysClientListVersionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedHsmKeysClientListVersionsResponse) (ManagedHsmKeysClientListVersionsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listVersionsCreateRequest(ctx, resourceGroupName, name, keyName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ManagedHsmKeysClientListVersionsResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedHsmKeysClientListVersionsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedHsmKeysClientListVersionsResponse{}, runtime.NewResponseError(resp) + } + return client.listVersionsHandleResponse(resp) + }, + }) +} + +// listVersionsCreateRequest creates the ListVersions request. +func (client *ManagedHsmKeysClient) listVersionsCreateRequest(ctx context.Context, resourceGroupName string, name string, keyName string, options *ManagedHsmKeysClientListVersionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}/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 name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if keyName == "" { + return nil, errors.New("parameter keyName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{keyName}", url.PathEscape(keyName)) + 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-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listVersionsHandleResponse handles the ListVersions response. +func (client *ManagedHsmKeysClient) listVersionsHandleResponse(resp *http.Response) (ManagedHsmKeysClientListVersionsResponse, error) { + result := ManagedHsmKeysClientListVersionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedHsmKeyListResult); err != nil { + return ManagedHsmKeysClientListVersionsResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_managedhsms_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsms_client.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_managedhsms_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsms_client.go index 46eaa4b4ee..21d87f4e5c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_managedhsms_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsms_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -26,65 +25,107 @@ import ( // ManagedHsmsClient contains the methods for the ManagedHsms group. // Don't use this type directly, use NewManagedHsmsClient() instead. type ManagedHsmsClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewManagedHsmsClient creates a new instance of ManagedHsmsClient 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. +// - 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 NewManagedHsmsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedHsmsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".ManagedHsmsClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &ManagedHsmsClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } +// CheckMhsmNameAvailability - Checks that the managed hsm name is valid and is not already in use. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01 +// - mhsmName - The name of the managed hsm. +// - options - ManagedHsmsClientCheckMhsmNameAvailabilityOptions contains the optional parameters for the ManagedHsmsClient.CheckMhsmNameAvailability +// method. +func (client *ManagedHsmsClient) CheckMhsmNameAvailability(ctx context.Context, mhsmName CheckMhsmNameAvailabilityParameters, options *ManagedHsmsClientCheckMhsmNameAvailabilityOptions) (ManagedHsmsClientCheckMhsmNameAvailabilityResponse, error) { + req, err := client.checkMhsmNameAvailabilityCreateRequest(ctx, mhsmName, options) + if err != nil { + return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, runtime.NewResponseError(resp) + } + return client.checkMhsmNameAvailabilityHandleResponse(resp) +} + +// checkMhsmNameAvailabilityCreateRequest creates the CheckMhsmNameAvailability request. +func (client *ManagedHsmsClient) checkMhsmNameAvailabilityCreateRequest(ctx context.Context, mhsmName CheckMhsmNameAvailabilityParameters, options *ManagedHsmsClientCheckMhsmNameAvailabilityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkMhsmNameAvailability" + 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", "2023-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, mhsmName) +} + +// checkMhsmNameAvailabilityHandleResponse handles the CheckMhsmNameAvailability response. +func (client *ManagedHsmsClient) checkMhsmNameAvailabilityHandleResponse(resp *http.Response) (ManagedHsmsClientCheckMhsmNameAvailabilityResponse, error) { + result := ManagedHsmsClientCheckMhsmNameAvailabilityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CheckMhsmNameAvailabilityResult); err != nil { + return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, err + } + return result, nil +} + // BeginCreateOrUpdate - Create or update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - Name of the managed HSM Pool -// parameters - Parameters to create or update the managed HSM Pool -// options - ManagedHsmsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - parameters - Parameters to create or update the managed HSM Pool +// - options - ManagedHsmsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginCreateOrUpdate +// method. func (client *ManagedHsmsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, options *ManagedHsmsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedHsmsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, name, parameters, options) if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[ManagedHsmsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[ManagedHsmsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ManagedHsmsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // CreateOrUpdate - Create or update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *ManagedHsmsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, options *ManagedHsmsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, parameters, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -109,12 +150,12 @@ func (client *ManagedHsmsClient) createOrUpdateCreateRequest(ctx context.Context 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -122,31 +163,33 @@ func (client *ManagedHsmsClient) createOrUpdateCreateRequest(ctx context.Context // BeginDelete - Deletes the specified managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - The name of the managed HSM Pool to delete -// options - ManagedHsmsClientBeginDeleteOptions contains the optional parameters for the ManagedHsmsClient.BeginDelete method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - The name of the managed HSM Pool to delete +// - options - ManagedHsmsClientBeginDeleteOptions contains the optional parameters for the ManagedHsmsClient.BeginDelete method. func (client *ManagedHsmsClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmsClientBeginDeleteOptions) (*runtime.Poller[ManagedHsmsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[ManagedHsmsClientDeleteResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[ManagedHsmsClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ManagedHsmsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // Delete - Deletes the specified managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *ManagedHsmsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -171,12 +214,12 @@ func (client *ManagedHsmsClient) deleteCreateRequest(ctx context.Context, resour 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -184,20 +227,21 @@ func (client *ManagedHsmsClient) deleteCreateRequest(ctx context.Context, resour // Get - Gets the specified managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - The name of the managed HSM Pool. -// options - ManagedHsmsClientGetOptions contains the optional parameters for the ManagedHsmsClient.Get method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - The name of the managed HSM Pool. +// - options - ManagedHsmsClientGetOptions contains the optional parameters for the ManagedHsmsClient.Get method. func (client *ManagedHsmsClient) Get(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmsClientGetOptions) (ManagedHsmsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return ManagedHsmsClientGetResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { return ManagedHsmsClientGetResponse{}, runtime.NewResponseError(resp) } return client.getHandleResponse(resp) @@ -218,12 +262,12 @@ func (client *ManagedHsmsClient) getCreateRequest(ctx context.Context, resourceG 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -240,16 +284,17 @@ func (client *ManagedHsmsClient) getHandleResponse(resp *http.Response) (Managed // GetDeleted - Gets the specified deleted managed HSM. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// name - The name of the deleted managed HSM. -// location - The location of the deleted managed HSM. -// options - ManagedHsmsClientGetDeletedOptions contains the optional parameters for the ManagedHsmsClient.GetDeleted method. +// +// Generated from API version 2023-02-01 +// - name - The name of the deleted managed HSM. +// - location - The location of the deleted managed HSM. +// - options - ManagedHsmsClientGetDeletedOptions contains the optional parameters for the ManagedHsmsClient.GetDeleted method. func (client *ManagedHsmsClient) GetDeleted(ctx context.Context, name string, location string, options *ManagedHsmsClientGetDeletedOptions) (ManagedHsmsClientGetDeletedResponse, error) { req, err := client.getDeletedCreateRequest(ctx, name, location, options) if err != nil { return ManagedHsmsClientGetDeletedResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientGetDeletedResponse{}, err } @@ -274,12 +319,12 @@ func (client *ManagedHsmsClient) getDeletedCreateRequest(ctx context.Context, na 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -296,11 +341,11 @@ func (client *ManagedHsmsClient) getDeletedHandleResponse(resp *http.Response) ( // NewListByResourceGroupPager - The List operation gets information about the managed HSM Pools associated with the subscription // and within the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// options - ManagedHsmsClientListByResourceGroupOptions contains the optional parameters for the ManagedHsmsClient.ListByResourceGroup -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - options - ManagedHsmsClientListByResourceGroupOptions contains the optional parameters for the ManagedHsmsClient.NewListByResourceGroupPager +// method. func (client *ManagedHsmsClient) NewListByResourceGroupPager(resourceGroupName string, options *ManagedHsmsClientListByResourceGroupOptions) *runtime.Pager[ManagedHsmsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[ManagedHsmsClientListByResourceGroupResponse]{ More: func(page ManagedHsmsClientListByResourceGroupResponse) bool { @@ -317,7 +362,7 @@ func (client *ManagedHsmsClient) NewListByResourceGroupPager(resourceGroupName s if err != nil { return ManagedHsmsClientListByResourceGroupResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientListByResourceGroupResponse{}, err } @@ -340,7 +385,7 @@ func (client *ManagedHsmsClient) listByResourceGroupCreateRequest(ctx context.Co 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.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -348,7 +393,7 @@ func (client *ManagedHsmsClient) listByResourceGroupCreateRequest(ctx context.Co if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -364,10 +409,10 @@ func (client *ManagedHsmsClient) listByResourceGroupHandleResponse(resp *http.Re } // NewListBySubscriptionPager - The List operation gets information about the managed HSM Pools associated with the subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// options - ManagedHsmsClientListBySubscriptionOptions contains the optional parameters for the ManagedHsmsClient.ListBySubscription -// method. +// +// Generated from API version 2023-02-01 +// - options - ManagedHsmsClientListBySubscriptionOptions contains the optional parameters for the ManagedHsmsClient.NewListBySubscriptionPager +// method. func (client *ManagedHsmsClient) NewListBySubscriptionPager(options *ManagedHsmsClientListBySubscriptionOptions) *runtime.Pager[ManagedHsmsClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[ManagedHsmsClientListBySubscriptionResponse]{ More: func(page ManagedHsmsClientListBySubscriptionResponse) bool { @@ -384,7 +429,7 @@ func (client *ManagedHsmsClient) NewListBySubscriptionPager(options *ManagedHsms if err != nil { return ManagedHsmsClientListBySubscriptionResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientListBySubscriptionResponse{}, err } @@ -403,7 +448,7 @@ func (client *ManagedHsmsClient) listBySubscriptionCreateRequest(ctx context.Con 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.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -411,7 +456,7 @@ func (client *ManagedHsmsClient) listBySubscriptionCreateRequest(ctx context.Con if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -427,9 +472,10 @@ func (client *ManagedHsmsClient) listBySubscriptionHandleResponse(resp *http.Res } // NewListDeletedPager - The List operation gets information about the deleted managed HSMs associated with the subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// options - ManagedHsmsClientListDeletedOptions contains the optional parameters for the ManagedHsmsClient.ListDeleted method. +// +// Generated from API version 2023-02-01 +// - options - ManagedHsmsClientListDeletedOptions contains the optional parameters for the ManagedHsmsClient.NewListDeletedPager +// method. func (client *ManagedHsmsClient) NewListDeletedPager(options *ManagedHsmsClientListDeletedOptions) *runtime.Pager[ManagedHsmsClientListDeletedResponse] { return runtime.NewPager(runtime.PagingHandler[ManagedHsmsClientListDeletedResponse]{ More: func(page ManagedHsmsClientListDeletedResponse) bool { @@ -446,7 +492,7 @@ func (client *ManagedHsmsClient) NewListDeletedPager(options *ManagedHsmsClientL if err != nil { return ManagedHsmsClientListDeletedResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientListDeletedResponse{}, err } @@ -465,12 +511,12 @@ func (client *ManagedHsmsClient) listDeletedCreateRequest(ctx context.Context, o 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -487,32 +533,34 @@ func (client *ManagedHsmsClient) listDeletedHandleResponse(resp *http.Response) // BeginPurgeDeleted - Permanently deletes the specified managed HSM. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// name - The name of the soft-deleted managed HSM. -// location - The location of the soft-deleted managed HSM. -// options - ManagedHsmsClientBeginPurgeDeletedOptions contains the optional parameters for the ManagedHsmsClient.BeginPurgeDeleted -// method. +// +// Generated from API version 2023-02-01 +// - name - The name of the soft-deleted managed HSM. +// - location - The location of the soft-deleted managed HSM. +// - options - ManagedHsmsClientBeginPurgeDeletedOptions contains the optional parameters for the ManagedHsmsClient.BeginPurgeDeleted +// method. func (client *ManagedHsmsClient) BeginPurgeDeleted(ctx context.Context, name string, location string, options *ManagedHsmsClientBeginPurgeDeletedOptions) (*runtime.Poller[ManagedHsmsClientPurgeDeletedResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.purgeDeleted(ctx, name, location, options) if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientPurgeDeletedResponse](resp, client.pl, nil) + return runtime.NewPoller[ManagedHsmsClientPurgeDeletedResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[ManagedHsmsClientPurgeDeletedResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ManagedHsmsClientPurgeDeletedResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // PurgeDeleted - Permanently deletes the specified managed HSM. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *ManagedHsmsClient) purgeDeleted(ctx context.Context, name string, location string, options *ManagedHsmsClientBeginPurgeDeletedOptions) (*http.Response, error) { req, err := client.purgeDeletedCreateRequest(ctx, name, location, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -537,12 +585,12 @@ func (client *ManagedHsmsClient) purgeDeletedCreateRequest(ctx context.Context, 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -550,32 +598,34 @@ func (client *ManagedHsmsClient) purgeDeletedCreateRequest(ctx context.Context, // BeginUpdate - Update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - Name of the managed HSM Pool -// parameters - Parameters to patch the managed HSM Pool -// options - ManagedHsmsClientBeginUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginUpdate method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - parameters - Parameters to patch the managed HSM Pool +// - options - ManagedHsmsClientBeginUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginUpdate method. func (client *ManagedHsmsClient) BeginUpdate(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, options *ManagedHsmsClientBeginUpdateOptions) (*runtime.Poller[ManagedHsmsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, name, parameters, options) if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[ManagedHsmsClientUpdateResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[ManagedHsmsClientUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[ManagedHsmsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // Update - Update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *ManagedHsmsClient) update(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, options *ManagedHsmsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, name, parameters, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -600,12 +650,12 @@ func (client *ManagedHsmsClient) updateCreateRequest(ctx context.Context, resour 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_mhsmprivateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivateendpointconnections_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_mhsmprivateendpointconnections_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivateendpointconnections_client.go index e7ab858439..b8b66a4944 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_mhsmprivateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivateendpointconnections_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -26,65 +25,58 @@ import ( // MHSMPrivateEndpointConnectionsClient contains the methods for the MHSMPrivateEndpointConnections group. // Don't use this type directly, use NewMHSMPrivateEndpointConnectionsClient() instead. type MHSMPrivateEndpointConnectionsClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewMHSMPrivateEndpointConnectionsClient creates a new instance of MHSMPrivateEndpointConnectionsClient 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. +// - 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 NewMHSMPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MHSMPrivateEndpointConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".MHSMPrivateEndpointConnectionsClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &MHSMPrivateEndpointConnectionsClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } // BeginDelete - Deletes the specified private endpoint connection associated with the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - Name of the managed HSM Pool -// privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. -// options - MHSMPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.BeginDelete -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. +// - options - MHSMPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.BeginDelete +// method. func (client *MHSMPrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *MHSMPrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[MHSMPrivateEndpointConnectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { return nil, err } - return runtime.NewPoller[MHSMPrivateEndpointConnectionsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[MHSMPrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[MHSMPrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[MHSMPrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // Delete - Deletes the specified private endpoint connection associated with the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *MHSMPrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *MHSMPrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -113,12 +105,12 @@ func (client *MHSMPrivateEndpointConnectionsClient) deleteCreateRequest(ctx cont 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -126,18 +118,19 @@ func (client *MHSMPrivateEndpointConnectionsClient) deleteCreateRequest(ctx cont // Get - Gets the specified private endpoint connection associated with the managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - Name of the managed HSM Pool -// privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. -// options - MHSMPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Get -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. +// - options - MHSMPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Get +// method. func (client *MHSMPrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *MHSMPrivateEndpointConnectionsClientGetOptions) (MHSMPrivateEndpointConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { return MHSMPrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return MHSMPrivateEndpointConnectionsClientGetResponse{}, err } @@ -166,12 +159,12 @@ func (client *MHSMPrivateEndpointConnectionsClient) getCreateRequest(ctx context 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,12 +181,12 @@ func (client *MHSMPrivateEndpointConnectionsClient) getHandleResponse(resp *http // NewListByResourcePager - The List operation gets information about the private endpoint connections associated with the // managed HSM Pool. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - Name of the managed HSM Pool -// options - MHSMPrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.ListByResource -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - options - MHSMPrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.NewListByResourcePager +// method. func (client *MHSMPrivateEndpointConnectionsClient) NewListByResourcePager(resourceGroupName string, name string, options *MHSMPrivateEndpointConnectionsClientListByResourceOptions) *runtime.Pager[MHSMPrivateEndpointConnectionsClientListByResourceResponse] { return runtime.NewPager(runtime.PagingHandler[MHSMPrivateEndpointConnectionsClientListByResourceResponse]{ More: func(page MHSMPrivateEndpointConnectionsClientListByResourceResponse) bool { @@ -210,7 +203,7 @@ func (client *MHSMPrivateEndpointConnectionsClient) NewListByResourcePager(resou if err != nil { return MHSMPrivateEndpointConnectionsClientListByResourceResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return MHSMPrivateEndpointConnectionsClientListByResourceResponse{}, err } @@ -237,12 +230,12 @@ func (client *MHSMPrivateEndpointConnectionsClient) listByResourceCreateRequest( return nil, errors.New("parameter name cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,19 +252,20 @@ func (client *MHSMPrivateEndpointConnectionsClient) listByResourceHandleResponse // Put - Updates the specified private endpoint connection associated with the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - Name of the managed HSM Pool -// privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. -// properties - The intended state of private endpoint connection. -// options - MHSMPrivateEndpointConnectionsClientPutOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Put -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. +// - properties - The intended state of private endpoint connection. +// - options - MHSMPrivateEndpointConnectionsClientPutOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Put +// method. func (client *MHSMPrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, properties MHSMPrivateEndpointConnection, options *MHSMPrivateEndpointConnectionsClientPutOptions) (MHSMPrivateEndpointConnectionsClientPutResponse, error) { req, err := client.putCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, properties, options) if err != nil { return MHSMPrivateEndpointConnectionsClientPutResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return MHSMPrivateEndpointConnectionsClientPutResponse{}, err } @@ -300,12 +294,12 @@ func (client *MHSMPrivateEndpointConnectionsClient) putCreateRequest(ctx context 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, properties) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_mhsmprivatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivatelinkresources_client.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_mhsmprivatelinkresources_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivatelinkresources_client.go index e6579929a0..4bff50b0f7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_mhsmprivatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivatelinkresources_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -25,49 +24,41 @@ import ( // MHSMPrivateLinkResourcesClient contains the methods for the MHSMPrivateLinkResources group. // Don't use this type directly, use NewMHSMPrivateLinkResourcesClient() instead. type MHSMPrivateLinkResourcesClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewMHSMPrivateLinkResourcesClient creates a new instance of MHSMPrivateLinkResourcesClient 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. +// - 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 NewMHSMPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MHSMPrivateLinkResourcesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".MHSMPrivateLinkResourcesClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &MHSMPrivateLinkResourcesClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } // ListByMHSMResource - Gets the private link resources supported for the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the managed HSM pool. -// name - Name of the managed HSM Pool -// options - MHSMPrivateLinkResourcesClientListByMHSMResourceOptions contains the optional parameters for the MHSMPrivateLinkResourcesClient.ListByMHSMResource -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - options - MHSMPrivateLinkResourcesClientListByMHSMResourceOptions contains the optional parameters for the MHSMPrivateLinkResourcesClient.ListByMHSMResource +// method. func (client *MHSMPrivateLinkResourcesClient) ListByMHSMResource(ctx context.Context, resourceGroupName string, name string, options *MHSMPrivateLinkResourcesClientListByMHSMResourceOptions) (MHSMPrivateLinkResourcesClientListByMHSMResourceResponse, error) { req, err := client.listByMHSMResourceCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return MHSMPrivateLinkResourcesClientListByMHSMResourceResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return MHSMPrivateLinkResourcesClientListByMHSMResourceResponse{}, err } @@ -92,12 +83,12 @@ func (client *MHSMPrivateLinkResourcesClient) listByMHSMResourceCreateRequest(ct return nil, errors.New("parameter name cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-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/keyvault/armkeyvault/mhsmregions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmregions_client.go new file mode 100644 index 0000000000..64692ec103 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmregions_client.go @@ -0,0 +1,116 @@ +//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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armkeyvault + +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" +) + +// MHSMRegionsClient contains the methods for the MHSMRegions group. +// Don't use this type directly, use NewMHSMRegionsClient() instead. +type MHSMRegionsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewMHSMRegionsClient creates a new instance of MHSMRegionsClient 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 NewMHSMRegionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MHSMRegionsClient, error) { + cl, err := arm.NewClient(moduleName+".MHSMRegionsClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &MHSMRegionsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByResourcePager - The List operation gets information about the regions associated with the managed HSM Pool. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the managed HSM pool. +// - name - Name of the managed HSM Pool +// - options - MHSMRegionsClientListByResourceOptions contains the optional parameters for the MHSMRegionsClient.NewListByResourcePager +// method. +func (client *MHSMRegionsClient) NewListByResourcePager(resourceGroupName string, name string, options *MHSMRegionsClientListByResourceOptions) *runtime.Pager[MHSMRegionsClientListByResourceResponse] { + return runtime.NewPager(runtime.PagingHandler[MHSMRegionsClientListByResourceResponse]{ + More: func(page MHSMRegionsClientListByResourceResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *MHSMRegionsClientListByResourceResponse) (MHSMRegionsClientListByResourceResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceCreateRequest(ctx, resourceGroupName, name, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return MHSMRegionsClientListByResourceResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return MHSMRegionsClientListByResourceResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return MHSMRegionsClientListByResourceResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceHandleResponse(resp) + }, + }) +} + +// listByResourceCreateRequest creates the ListByResource request. +func (client *MHSMRegionsClient) listByResourceCreateRequest(ctx context.Context, resourceGroupName string, name string, options *MHSMRegionsClientListByResourceOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/regions" + 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 name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + 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-02-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceHandleResponse handles the ListByResource response. +func (client *MHSMRegionsClient) listByResourceHandleResponse(resp *http.Response) (MHSMRegionsClientListByResourceResponse, error) { + result := MHSMRegionsClientListByResourceResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MHSMRegionsListResult); err != nil { + return MHSMRegionsClientListByResourceResponse{}, err + } + return result, nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_models.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models.go index 6b63115931..27413da2a2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -27,6 +28,11 @@ type AccessPolicyEntry struct { ApplicationID *string `json:"applicationId,omitempty"` } +type Action struct { + // The type of action. + Type *KeyRotationPolicyActionType `json:"type,omitempty"` +} + // Attributes - The object attributes managed by the KeyVault service. type Attributes struct { // Determines whether the object is enabled. @@ -45,8 +51,14 @@ type Attributes struct { Updated *time.Time `json:"updated,omitempty" azure:"ro"` } -// CheckNameAvailabilityResult - The CheckNameAvailability operation response. -type CheckNameAvailabilityResult struct { +// CheckMhsmNameAvailabilityParameters - The parameters used to check the availability of the managed hsm name. +type CheckMhsmNameAvailabilityParameters struct { + // REQUIRED; The managed hsm name. + Name *string `json:"name,omitempty"` +} + +// CheckMhsmNameAvailabilityResult - The CheckMhsmNameAvailability operation response. +type CheckMhsmNameAvailabilityResult struct { // READ-ONLY; An error message explaining the Reason value in more detail. Message *string `json:"message,omitempty" azure:"ro"` @@ -54,23 +66,22 @@ type CheckNameAvailabilityResult struct { // If false, the name has already been taken or is invalid and cannot be used. NameAvailable *bool `json:"nameAvailable,omitempty" azure:"ro"` - // READ-ONLY; The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false. + // READ-ONLY; The reason that a managed hsm name could not be used. The reason element is only returned if NameAvailable is + // false. Reason *Reason `json:"reason,omitempty" azure:"ro"` } -// CloudError - An error response from Key Vault resource provider -type CloudError struct { - // An error response from Key Vault resource provider - Error *CloudErrorBody `json:"error,omitempty"` -} +// CheckNameAvailabilityResult - The CheckNameAvailability operation response. +type CheckNameAvailabilityResult struct { + // READ-ONLY; An error message explaining the Reason value in more detail. + Message *string `json:"message,omitempty" azure:"ro"` -// CloudErrorBody - An error response from Key Vault resource provider -type CloudErrorBody struct { - // Error code. This is a mnemonic that can be consumed programmatically. - Code *string `json:"code,omitempty"` + // READ-ONLY; A boolean value that indicates whether the name is available for you to use. If true, the name is available. + // If false, the name has already been taken or is invalid and cannot be used. + NameAvailable *bool `json:"nameAvailable,omitempty" azure:"ro"` - // User friendly error message. The message is typically localized and may vary with service version. - Message *string `json:"message,omitempty"` + // READ-ONLY; The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false. + Reason *Reason `json:"reason,omitempty" azure:"ro"` } type DeletedManagedHsm struct { @@ -273,6 +284,12 @@ type KeyProperties struct { // The type of the key. For valid values, see JsonWebKeyType. Kty *JSONWebKeyType `json:"kty,omitempty"` + // Key release policy in response. It will be used for both output and input. Omitted if empty + ReleasePolicy *KeyReleasePolicy `json:"release_policy,omitempty"` + + // Key rotation policy in response. It will be used for both output and input. Omitted if empty + RotationPolicy *RotationPolicy `json:"rotationPolicy,omitempty"` + // READ-ONLY; The URI to retrieve the current version of the key. KeyURI *string `json:"keyUri,omitempty" azure:"ro"` @@ -280,6 +297,25 @@ type KeyProperties struct { KeyURIWithVersion *string `json:"keyUriWithVersion,omitempty" azure:"ro"` } +type KeyReleasePolicy struct { + // Content type and version of key release policy + ContentType *string `json:"contentType,omitempty"` + + // Blob encoding the policy rules under which the key can be released. + Data []byte `json:"data,omitempty"` +} + +type KeyRotationPolicyAttributes struct { + // The expiration time for the new key version. It should be in ISO8601 format. Eg: 'P90D', 'P1Y'. + ExpiryTime *string `json:"expiryTime,omitempty"` + + // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. + Created *int64 `json:"created,omitempty" azure:"ro"` + + // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. + Updated *int64 `json:"updated,omitempty" azure:"ro"` +} + // KeysClientCreateIfNotExistOptions contains the optional parameters for the KeysClient.CreateIfNotExist method. type KeysClientCreateIfNotExistOptions struct { // placeholder for future optional parameters @@ -295,16 +331,24 @@ type KeysClientGetVersionOptions struct { // placeholder for future optional parameters } -// KeysClientListOptions contains the optional parameters for the KeysClient.List method. +// KeysClientListOptions contains the optional parameters for the KeysClient.NewListPager method. type KeysClientListOptions struct { // placeholder for future optional parameters } -// KeysClientListVersionsOptions contains the optional parameters for the KeysClient.ListVersions method. +// KeysClientListVersionsOptions contains the optional parameters for the KeysClient.NewListVersionsPager method. type KeysClientListVersionsOptions struct { // placeholder for future optional parameters } +type LifetimeAction struct { + // The action of key rotation policy lifetimeAction. + Action *Action `json:"action,omitempty"` + + // The trigger of key rotation policy lifetimeAction. + Trigger *Trigger `json:"trigger,omitempty"` +} + // LogSpecification - Log specification of operation. type LogSpecification struct { // Blob duration of specification. @@ -317,7 +361,19 @@ type LogSpecification struct { Name *string `json:"name,omitempty"` } -// MHSMIPRule - A rule governing the accessibility of a managed hsm pool from a specific ip address or ip range. +// MHSMGeoReplicatedRegion - A region that this managed HSM Pool has been extended to. +type MHSMGeoReplicatedRegion struct { + // A boolean value that indicates whether the region is the primary region or a secondary region. + IsPrimary *bool `json:"isPrimary,omitempty"` + + // Name of the geo replicated region. + Name *string `json:"name,omitempty"` + + // READ-ONLY; Provisioning state of the geo replicated region. + ProvisioningState *GeoReplicationRegionProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} + +// MHSMIPRule - A rule governing the accessibility of a managed HSM pool from a specific IP address or IP range. type MHSMIPRule struct { // REQUIRED; An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses // that start with 124.56.78). @@ -378,6 +434,12 @@ type MHSMPrivateEndpointConnection struct { // MHSMPrivateEndpointConnectionItem - Private endpoint connection item. type MHSMPrivateEndpointConnectionItem struct { + // Modified whenever there is a change in the state of private endpoint connection. + Etag *string `json:"etag,omitempty"` + + // Id of private endpoint connection. + ID *string `json:"id,omitempty"` + // Private endpoint connection properties. Properties *MHSMPrivateEndpointConnectionProperties `json:"properties,omitempty"` } @@ -407,7 +469,7 @@ type MHSMPrivateEndpointConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// MHSMPrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.ListByResource +// MHSMPrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.NewListByResourcePager // method. type MHSMPrivateEndpointConnectionsClientListByResourceOptions struct { // placeholder for future optional parameters @@ -491,12 +553,36 @@ type MHSMPrivateLinkServiceConnectionState struct { Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` } +// MHSMRegionsClientListByResourceOptions contains the optional parameters for the MHSMRegionsClient.NewListByResourcePager +// method. +type MHSMRegionsClientListByResourceOptions struct { + // placeholder for future optional parameters +} + +// MHSMRegionsListResult - List of regions associated with a managed HSM Pools +type MHSMRegionsListResult struct { + // The URL to get the next set of managed HSM Pools. + NextLink *string `json:"nextLink,omitempty"` + + // The region associated with a managed HSM Pools. + Value []*MHSMGeoReplicatedRegion `json:"value,omitempty"` +} + // MHSMVirtualNetworkRule - A rule governing the accessibility of a managed hsm pool from a specific virtual network. type MHSMVirtualNetworkRule struct { // REQUIRED; Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. ID *string `json:"id,omitempty"` } +// ManagedHSMSecurityDomainProperties - The security domain properties of the managed hsm. +type ManagedHSMSecurityDomainProperties struct { + // READ-ONLY; Activation Status + ActivationStatus *ActivationStatus `json:"activationStatus,omitempty" azure:"ro"` + + // READ-ONLY; Activation Status Message. + ActivationStatusMessage *string `json:"activationStatusMessage,omitempty" azure:"ro"` +} + // ManagedHsm - Resource information with extended details. type ManagedHsm struct { // The supported Azure location where the managed HSM Pool should be created. @@ -524,12 +610,161 @@ type ManagedHsm struct { Type *string `json:"type,omitempty" azure:"ro"` } +type ManagedHsmAction struct { + // The type of action. + Type *KeyRotationPolicyActionType `json:"type,omitempty"` +} + // ManagedHsmError - The error exception. type ManagedHsmError struct { // READ-ONLY; The server error. Error *Error `json:"error,omitempty" azure:"ro"` } +// ManagedHsmKey - The key resource. +type ManagedHsmKey struct { + // REQUIRED; The properties of the key. + Properties *ManagedHsmKeyProperties `json:"properties,omitempty"` + + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + +// ManagedHsmKeyAttributes - The object attributes managed by the Azure Key Vault service. +type ManagedHsmKeyAttributes struct { + // Determines whether or not the object is enabled. + Enabled *bool `json:"enabled,omitempty"` + + // Expiry date in seconds since 1970-01-01T00:00:00Z. + Expires *int64 `json:"exp,omitempty"` + + // Indicates if the private key can be exported. + Exportable *bool `json:"exportable,omitempty"` + + // Not before date in seconds since 1970-01-01T00:00:00Z. + NotBefore *int64 `json:"nbf,omitempty"` + + // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. + Created *int64 `json:"created,omitempty" azure:"ro"` + + // READ-ONLY; The deletion recovery level currently in effect for the object. If it contains 'Purgeable', then the object + // can be permanently deleted by a privileged user; otherwise, only the system can purge the + // object at the end of the retention interval. + RecoveryLevel *DeletionRecoveryLevel `json:"recoveryLevel,omitempty" azure:"ro"` + + // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. + Updated *int64 `json:"updated,omitempty" azure:"ro"` +} + +// ManagedHsmKeyCreateParameters - The parameters used to create a key. +type ManagedHsmKeyCreateParameters struct { + // REQUIRED; The properties of the key to be created. + Properties *ManagedHsmKeyProperties `json:"properties,omitempty"` + + // The tags that will be assigned to the key. + Tags map[string]*string `json:"tags,omitempty"` +} + +// ManagedHsmKeyListResult - The page of keys. +type ManagedHsmKeyListResult struct { + // The URL to get the next page of keys. + NextLink *string `json:"nextLink,omitempty"` + + // The key resources. + Value []*ManagedHsmKey `json:"value,omitempty"` +} + +// ManagedHsmKeyProperties - The properties of the key. +type ManagedHsmKeyProperties struct { + // The attributes of the key. + Attributes *ManagedHsmKeyAttributes `json:"attributes,omitempty"` + + // The elliptic curve name. For valid values, see JsonWebKeyCurveName. + CurveName *JSONWebKeyCurveName `json:"curveName,omitempty"` + KeyOps []*JSONWebKeyOperation `json:"keyOps,omitempty"` + + // The key size in bits. For example: 2048, 3072, or 4096 for RSA. + KeySize *int32 `json:"keySize,omitempty"` + + // The type of the key. For valid values, see JsonWebKeyType. + Kty *JSONWebKeyType `json:"kty,omitempty"` + + // Key release policy in response. It will be used for both output and input. Omitted if empty + ReleasePolicy *ManagedHsmKeyReleasePolicy `json:"release_policy,omitempty"` + + // Key rotation policy in response. It will be used for both output and input. Omitted if empty + RotationPolicy *ManagedHsmRotationPolicy `json:"rotationPolicy,omitempty"` + + // READ-ONLY; The URI to retrieve the current version of the key. + KeyURI *string `json:"keyUri,omitempty" azure:"ro"` + + // READ-ONLY; The URI to retrieve the specific version of the key. + KeyURIWithVersion *string `json:"keyUriWithVersion,omitempty" azure:"ro"` +} + +type ManagedHsmKeyReleasePolicy struct { + // Content type and version of key release policy + ContentType *string `json:"contentType,omitempty"` + + // Blob encoding the policy rules under which the key can be released. + Data []byte `json:"data,omitempty"` +} + +type ManagedHsmKeyRotationPolicyAttributes struct { + // The expiration time for the new key version. It should be in ISO8601 format. Eg: 'P90D', 'P1Y'. + ExpiryTime *string `json:"expiryTime,omitempty"` + + // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. + Created *int64 `json:"created,omitempty" azure:"ro"` + + // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. + Updated *int64 `json:"updated,omitempty" azure:"ro"` +} + +// ManagedHsmKeysClientCreateIfNotExistOptions contains the optional parameters for the ManagedHsmKeysClient.CreateIfNotExist +// method. +type ManagedHsmKeysClientCreateIfNotExistOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientGetOptions contains the optional parameters for the ManagedHsmKeysClient.Get method. +type ManagedHsmKeysClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientGetVersionOptions contains the optional parameters for the ManagedHsmKeysClient.GetVersion method. +type ManagedHsmKeysClientGetVersionOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientListOptions contains the optional parameters for the ManagedHsmKeysClient.NewListPager method. +type ManagedHsmKeysClientListOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientListVersionsOptions contains the optional parameters for the ManagedHsmKeysClient.NewListVersionsPager +// method. +type ManagedHsmKeysClientListVersionsOptions struct { + // placeholder for future optional parameters +} + +type ManagedHsmLifetimeAction struct { + // The action of key rotation policy lifetimeAction. + Action *ManagedHsmAction `json:"action,omitempty"` + + // The trigger of key rotation policy lifetimeAction. + Trigger *ManagedHsmTrigger `json:"trigger,omitempty"` +} + // ManagedHsmListResult - List of managed HSM Pools type ManagedHsmListResult struct { // The URL to get the next set of managed HSM Pools. @@ -564,6 +799,9 @@ type ManagedHsmProperties struct { // Control permission for data plane traffic coming from public networks while private endpoint is enabled. PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // List of all regions associated with the managed hsm pool. + Regions []*MHSMGeoReplicatedRegion `json:"regions,omitempty"` + // softDelete data retention days. It accepts >=7 and <=90. SoftDeleteRetentionInDays *int32 `json:"softDeleteRetentionInDays,omitempty"` @@ -582,6 +820,9 @@ type ManagedHsmProperties struct { // READ-ONLY; The scheduled purge date in UTC. ScheduledPurgeDate *time.Time `json:"scheduledPurgeDate,omitempty" azure:"ro"` + // READ-ONLY; Managed HSM security domain properties. + SecurityDomainProperties *ManagedHSMSecurityDomainProperties `json:"securityDomainProperties,omitempty" azure:"ro"` + // READ-ONLY; Resource Status Message. StatusMessage *string `json:"statusMessage,omitempty" azure:"ro"` } @@ -610,6 +851,14 @@ type ManagedHsmResource struct { Type *string `json:"type,omitempty" azure:"ro"` } +type ManagedHsmRotationPolicy struct { + // The attributes of key rotation policy. + Attributes *ManagedHsmKeyRotationPolicyAttributes `json:"attributes,omitempty"` + + // The lifetimeActions for key rotation action. + LifetimeActions []*ManagedHsmLifetimeAction `json:"lifetimeActions,omitempty"` +} + // ManagedHsmSKU - SKU details type ManagedHsmSKU struct { // REQUIRED; SKU Family of the managed HSM Pool @@ -619,6 +868,15 @@ type ManagedHsmSKU struct { Name *ManagedHsmSKUName `json:"name,omitempty"` } +type ManagedHsmTrigger struct { + // The time duration after key creation to rotate the key. It only applies to rotate. It will be in ISO 8601 duration format. + // Eg: 'P90D', 'P1Y'. + TimeAfterCreate *string `json:"timeAfterCreate,omitempty"` + + // The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. + TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty"` +} + // ManagedHsmsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginCreateOrUpdate // method. type ManagedHsmsClientBeginCreateOrUpdateOptions struct { @@ -645,6 +903,12 @@ type ManagedHsmsClientBeginUpdateOptions struct { ResumeToken string } +// ManagedHsmsClientCheckMhsmNameAvailabilityOptions contains the optional parameters for the ManagedHsmsClient.CheckMhsmNameAvailability +// method. +type ManagedHsmsClientCheckMhsmNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + // ManagedHsmsClientGetDeletedOptions contains the optional parameters for the ManagedHsmsClient.GetDeleted method. type ManagedHsmsClientGetDeletedOptions struct { // placeholder for future optional parameters @@ -655,21 +919,21 @@ type ManagedHsmsClientGetOptions struct { // placeholder for future optional parameters } -// ManagedHsmsClientListByResourceGroupOptions contains the optional parameters for the ManagedHsmsClient.ListByResourceGroup +// ManagedHsmsClientListByResourceGroupOptions contains the optional parameters for the ManagedHsmsClient.NewListByResourceGroupPager // method. type ManagedHsmsClientListByResourceGroupOptions struct { // Maximum number of results to return. Top *int32 } -// ManagedHsmsClientListBySubscriptionOptions contains the optional parameters for the ManagedHsmsClient.ListBySubscription +// ManagedHsmsClientListBySubscriptionOptions contains the optional parameters for the ManagedHsmsClient.NewListBySubscriptionPager // method. type ManagedHsmsClientListBySubscriptionOptions struct { // Maximum number of results to return. Top *int32 } -// ManagedHsmsClientListDeletedOptions contains the optional parameters for the ManagedHsmsClient.ListDeleted method. +// ManagedHsmsClientListDeletedOptions contains the optional parameters for the ManagedHsmsClient.NewListDeletedPager method. type ManagedHsmsClientListDeletedOptions struct { // placeholder for future optional parameters } @@ -775,7 +1039,7 @@ type OperationProperties struct { ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. type OperationsClientListOptions struct { // placeholder for future optional parameters } @@ -871,7 +1135,7 @@ type PrivateEndpointConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.ListByResource +// PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByResourcePager // method. type PrivateEndpointConnectionsClientListByResourceOptions struct { // placeholder for future optional parameters @@ -940,6 +1204,21 @@ type PrivateLinkServiceConnectionState struct { Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` } +// ProxyResourceWithoutSystemData - Common fields that are returned in the response for all Azure Resource Manager resources +type ProxyResourceWithoutSystemData struct { + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + // Resource - Key Vault resource type Resource struct { // READ-ONLY; Fully qualified identifier of the key vault resource. @@ -967,6 +1246,14 @@ type ResourceListResult struct { Value []*Resource `json:"value,omitempty"` } +type RotationPolicy struct { + // The attributes of key rotation policy. + Attributes *KeyRotationPolicyAttributes `json:"attributes,omitempty"` + + // The lifetimeActions for key rotation action. + LifetimeActions []*LifetimeAction `json:"lifetimeActions,omitempty"` +} + // SKU details type SKU struct { // REQUIRED; SKU family name @@ -1084,7 +1371,7 @@ type SecretsClientGetOptions struct { // placeholder for future optional parameters } -// SecretsClientListOptions contains the optional parameters for the SecretsClient.List method. +// SecretsClientListOptions contains the optional parameters for the SecretsClient.NewListPager method. type SecretsClientListOptions struct { // Maximum number of results to return. Top *int32 @@ -1125,6 +1412,15 @@ type SystemData struct { LastModifiedByType *IdentityType `json:"lastModifiedByType,omitempty"` } +type Trigger struct { + // The time duration after key creation to rotate the key. It only applies to rotate. It will be in ISO 8601 duration format. + // Eg: 'P90D', 'P1Y'. + TimeAfterCreate *string `json:"timeAfterCreate,omitempty"` + + // The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. + TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty"` +} + // Vault - Resource information with extended details. type Vault struct { // REQUIRED; Properties of the vault @@ -1179,7 +1475,8 @@ type VaultCheckNameAvailabilityParameters struct { // REQUIRED; The vault name. Name *string `json:"name,omitempty"` - // REQUIRED; The type of resource, Microsoft.KeyVault/vaults + // CONSTANT; The type of resource, Microsoft.KeyVault/vaults + // Field has constant value "Microsoft.KeyVault/vaults", any specified value is ignored. Type *string `json:"type,omitempty"` } @@ -1372,24 +1669,26 @@ type VaultsClientGetOptions struct { // placeholder for future optional parameters } -// VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.ListByResourceGroup method. +// VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.NewListByResourceGroupPager +// method. type VaultsClientListByResourceGroupOptions struct { // Maximum number of results to return. Top *int32 } -// VaultsClientListBySubscriptionOptions contains the optional parameters for the VaultsClient.ListBySubscription method. +// VaultsClientListBySubscriptionOptions contains the optional parameters for the VaultsClient.NewListBySubscriptionPager +// method. type VaultsClientListBySubscriptionOptions struct { // Maximum number of results to return. Top *int32 } -// VaultsClientListDeletedOptions contains the optional parameters for the VaultsClient.ListDeleted method. +// VaultsClientListDeletedOptions contains the optional parameters for the VaultsClient.NewListDeletedPager method. type VaultsClientListDeletedOptions struct { // placeholder for future optional parameters } -// VaultsClientListOptions contains the optional parameters for the VaultsClient.List method. +// VaultsClientListOptions contains the optional parameters for the VaultsClient.NewListPager method. type VaultsClientListOptions struct { // Maximum number of results to return. Top *int32 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go new file mode 100644 index 0000000000..7f7a5e10c3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go @@ -0,0 +1,3750 @@ +//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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armkeyvault + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type AccessPolicyEntry. +func (a AccessPolicyEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "applicationId", a.ApplicationID) + populate(objectMap, "objectId", a.ObjectID) + populate(objectMap, "permissions", a.Permissions) + populate(objectMap, "tenantId", a.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessPolicyEntry. +func (a *AccessPolicyEntry) UnmarshalJSON(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 "applicationId": + err = unpopulate(val, "ApplicationID", &a.ApplicationID) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &a.ObjectID) + delete(rawMsg, key) + case "permissions": + err = unpopulate(val, "Permissions", &a.Permissions) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &a.TenantID) + 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 Action. +func (a Action) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Action. +func (a *Action) UnmarshalJSON(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) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Attributes. +func (a Attributes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeUnix(objectMap, "created", a.Created) + populate(objectMap, "enabled", a.Enabled) + populateTimeUnix(objectMap, "exp", a.Expires) + populateTimeUnix(objectMap, "nbf", a.NotBefore) + populateTimeUnix(objectMap, "updated", a.Updated) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Attributes. +func (a *Attributes) UnmarshalJSON(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 "created": + err = unpopulateTimeUnix(val, "Created", &a.Created) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "exp": + err = unpopulateTimeUnix(val, "Expires", &a.Expires) + delete(rawMsg, key) + case "nbf": + err = unpopulateTimeUnix(val, "NotBefore", &a.NotBefore) + delete(rawMsg, key) + case "updated": + err = unpopulateTimeUnix(val, "Updated", &a.Updated) + 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 CheckMhsmNameAvailabilityParameters. +func (c CheckMhsmNameAvailabilityParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckMhsmNameAvailabilityParameters. +func (c *CheckMhsmNameAvailabilityParameters) UnmarshalJSON(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) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CheckMhsmNameAvailabilityResult. +func (c CheckMhsmNameAvailabilityResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", c.Message) + populate(objectMap, "nameAvailable", c.NameAvailable) + populate(objectMap, "reason", c.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckMhsmNameAvailabilityResult. +func (c *CheckMhsmNameAvailabilityResult) UnmarshalJSON(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 "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &c.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) + 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 CheckNameAvailabilityResult. +func (c CheckNameAvailabilityResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "message", c.Message) + populate(objectMap, "nameAvailable", c.NameAvailable) + populate(objectMap, "reason", c.Reason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResult. +func (c *CheckNameAvailabilityResult) UnmarshalJSON(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 "message": + err = unpopulate(val, "Message", &c.Message) + delete(rawMsg, key) + case "nameAvailable": + err = unpopulate(val, "NameAvailable", &c.NameAvailable) + delete(rawMsg, key) + case "reason": + err = unpopulate(val, "Reason", &c.Reason) + 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 DeletedManagedHsm. +func (d DeletedManagedHsm) 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 DeletedManagedHsm. +func (d *DeletedManagedHsm) UnmarshalJSON(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 DeletedManagedHsmListResult. +func (d DeletedManagedHsmListResult) 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 DeletedManagedHsmListResult. +func (d *DeletedManagedHsmListResult) UnmarshalJSON(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 DeletedManagedHsmProperties. +func (d DeletedManagedHsmProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "deletionDate", d.DeletionDate) + populate(objectMap, "location", d.Location) + populate(objectMap, "mhsmId", d.MhsmID) + populate(objectMap, "purgeProtectionEnabled", d.PurgeProtectionEnabled) + populateTimeRFC3339(objectMap, "scheduledPurgeDate", d.ScheduledPurgeDate) + populate(objectMap, "tags", d.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedManagedHsmProperties. +func (d *DeletedManagedHsmProperties) UnmarshalJSON(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 "deletionDate": + err = unpopulateTimeRFC3339(val, "DeletionDate", &d.DeletionDate) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "mhsmId": + err = unpopulate(val, "MhsmID", &d.MhsmID) + delete(rawMsg, key) + case "purgeProtectionEnabled": + err = unpopulate(val, "PurgeProtectionEnabled", &d.PurgeProtectionEnabled) + delete(rawMsg, key) + case "scheduledPurgeDate": + err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &d.ScheduledPurgeDate) + 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 DeletedVault. +func (d DeletedVault) 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 DeletedVault. +func (d *DeletedVault) UnmarshalJSON(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 DeletedVaultListResult. +func (d DeletedVaultListResult) 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 DeletedVaultListResult. +func (d *DeletedVaultListResult) UnmarshalJSON(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 DeletedVaultProperties. +func (d DeletedVaultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "deletionDate", d.DeletionDate) + populate(objectMap, "location", d.Location) + populate(objectMap, "purgeProtectionEnabled", d.PurgeProtectionEnabled) + populateTimeRFC3339(objectMap, "scheduledPurgeDate", d.ScheduledPurgeDate) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "vaultId", d.VaultID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedVaultProperties. +func (d *DeletedVaultProperties) UnmarshalJSON(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 "deletionDate": + err = unpopulateTimeRFC3339(val, "DeletionDate", &d.DeletionDate) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "purgeProtectionEnabled": + err = unpopulate(val, "PurgeProtectionEnabled", &d.PurgeProtectionEnabled) + delete(rawMsg, key) + case "scheduledPurgeDate": + err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &d.ScheduledPurgeDate) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + case "vaultId": + err = unpopulate(val, "VaultID", &d.VaultID) + 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 DimensionProperties. +func (d DimensionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "displayName", d.DisplayName) + populate(objectMap, "name", d.Name) + populate(objectMap, "toBeExportedForShoebox", d.ToBeExportedForShoebox) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DimensionProperties. +func (d *DimensionProperties) UnmarshalJSON(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 "displayName": + err = unpopulate(val, "DisplayName", &d.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "toBeExportedForShoebox": + err = unpopulate(val, "ToBeExportedForShoebox", &d.ToBeExportedForShoebox) + 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 Error. +func (e Error) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", e.Code) + populate(objectMap, "innererror", e.InnerError) + populate(objectMap, "message", e.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Error. +func (e *Error) UnmarshalJSON(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 "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "innererror": + err = unpopulate(val, "InnerError", &e.InnerError) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + 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 IPRule. +func (i IPRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IPRule. +func (i *IPRule) UnmarshalJSON(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 "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 Key. +func (k Key) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", k.ID) + populate(objectMap, "location", k.Location) + populate(objectMap, "name", k.Name) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "tags", k.Tags) + populate(objectMap, "type", k.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Key. +func (k *Key) UnmarshalJSON(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 "id": + err = unpopulate(val, "ID", &k.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &k.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &k.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &k.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &k.Type) + 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 KeyAttributes. +func (k KeyAttributes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "created", k.Created) + populate(objectMap, "enabled", k.Enabled) + populate(objectMap, "exp", k.Expires) + populate(objectMap, "exportable", k.Exportable) + populate(objectMap, "nbf", k.NotBefore) + populate(objectMap, "recoveryLevel", k.RecoveryLevel) + populate(objectMap, "updated", k.Updated) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyAttributes. +func (k *KeyAttributes) UnmarshalJSON(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 "created": + err = unpopulate(val, "Created", &k.Created) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &k.Enabled) + delete(rawMsg, key) + case "exp": + err = unpopulate(val, "Expires", &k.Expires) + delete(rawMsg, key) + case "exportable": + err = unpopulate(val, "Exportable", &k.Exportable) + delete(rawMsg, key) + case "nbf": + err = unpopulate(val, "NotBefore", &k.NotBefore) + delete(rawMsg, key) + case "recoveryLevel": + err = unpopulate(val, "RecoveryLevel", &k.RecoveryLevel) + delete(rawMsg, key) + case "updated": + err = unpopulate(val, "Updated", &k.Updated) + 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 KeyCreateParameters. +func (k KeyCreateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "tags", k.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyCreateParameters. +func (k *KeyCreateParameters) UnmarshalJSON(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 "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &k.Tags) + 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 KeyListResult. +func (k KeyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", k.NextLink) + populate(objectMap, "value", k.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyListResult. +func (k *KeyListResult) UnmarshalJSON(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 "nextLink": + err = unpopulate(val, "NextLink", &k.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &k.Value) + 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 KeyProperties. +func (k KeyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributes", k.Attributes) + populate(objectMap, "curveName", k.CurveName) + populate(objectMap, "keyOps", k.KeyOps) + populate(objectMap, "keySize", k.KeySize) + populate(objectMap, "keyUri", k.KeyURI) + populate(objectMap, "keyUriWithVersion", k.KeyURIWithVersion) + populate(objectMap, "kty", k.Kty) + populate(objectMap, "release_policy", k.ReleasePolicy) + populate(objectMap, "rotationPolicy", k.RotationPolicy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyProperties. +func (k *KeyProperties) UnmarshalJSON(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 "attributes": + err = unpopulate(val, "Attributes", &k.Attributes) + delete(rawMsg, key) + case "curveName": + err = unpopulate(val, "CurveName", &k.CurveName) + delete(rawMsg, key) + case "keyOps": + err = unpopulate(val, "KeyOps", &k.KeyOps) + delete(rawMsg, key) + case "keySize": + err = unpopulate(val, "KeySize", &k.KeySize) + delete(rawMsg, key) + case "keyUri": + err = unpopulate(val, "KeyURI", &k.KeyURI) + delete(rawMsg, key) + case "keyUriWithVersion": + err = unpopulate(val, "KeyURIWithVersion", &k.KeyURIWithVersion) + delete(rawMsg, key) + case "kty": + err = unpopulate(val, "Kty", &k.Kty) + delete(rawMsg, key) + case "release_policy": + err = unpopulate(val, "ReleasePolicy", &k.ReleasePolicy) + delete(rawMsg, key) + case "rotationPolicy": + err = unpopulate(val, "RotationPolicy", &k.RotationPolicy) + 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 KeyReleasePolicy. +func (k KeyReleasePolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contentType", k.ContentType) + populateByteArray(objectMap, "data", k.Data, runtime.Base64URLFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyReleasePolicy. +func (k *KeyReleasePolicy) UnmarshalJSON(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 "contentType": + err = unpopulate(val, "ContentType", &k.ContentType) + delete(rawMsg, key) + case "data": + err = runtime.DecodeByteArray(string(val), &k.Data, runtime.Base64URLFormat) + 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 KeyRotationPolicyAttributes. +func (k KeyRotationPolicyAttributes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "created", k.Created) + populate(objectMap, "expiryTime", k.ExpiryTime) + populate(objectMap, "updated", k.Updated) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KeyRotationPolicyAttributes. +func (k *KeyRotationPolicyAttributes) UnmarshalJSON(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 "created": + err = unpopulate(val, "Created", &k.Created) + delete(rawMsg, key) + case "expiryTime": + err = unpopulate(val, "ExpiryTime", &k.ExpiryTime) + delete(rawMsg, key) + case "updated": + err = unpopulate(val, "Updated", &k.Updated) + 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 LifetimeAction. +func (l LifetimeAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", l.Action) + populate(objectMap, "trigger", l.Trigger) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LifetimeAction. +func (l *LifetimeAction) UnmarshalJSON(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 "action": + err = unpopulate(val, "Action", &l.Action) + delete(rawMsg, key) + case "trigger": + err = unpopulate(val, "Trigger", &l.Trigger) + 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 LogSpecification. +func (l LogSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "blobDuration", l.BlobDuration) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "name", l.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification. +func (l *LogSpecification) UnmarshalJSON(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 "blobDuration": + err = unpopulate(val, "BlobDuration", &l.BlobDuration) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + 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 MHSMGeoReplicatedRegion. +func (m MHSMGeoReplicatedRegion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "isPrimary", m.IsPrimary) + populate(objectMap, "name", m.Name) + populate(objectMap, "provisioningState", m.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMGeoReplicatedRegion. +func (m *MHSMGeoReplicatedRegion) UnmarshalJSON(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 "isPrimary": + err = unpopulate(val, "IsPrimary", &m.IsPrimary) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + 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 MHSMIPRule. +func (m MHSMIPRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMIPRule. +func (m *MHSMIPRule) UnmarshalJSON(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 "value": + err = unpopulate(val, "Value", &m.Value) + 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 MHSMNetworkRuleSet. +func (m MHSMNetworkRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bypass", m.Bypass) + populate(objectMap, "defaultAction", m.DefaultAction) + populate(objectMap, "ipRules", m.IPRules) + populate(objectMap, "virtualNetworkRules", m.VirtualNetworkRules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMNetworkRuleSet. +func (m *MHSMNetworkRuleSet) UnmarshalJSON(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 "bypass": + err = unpopulate(val, "Bypass", &m.Bypass) + delete(rawMsg, key) + case "defaultAction": + err = unpopulate(val, "DefaultAction", &m.DefaultAction) + delete(rawMsg, key) + case "ipRules": + err = unpopulate(val, "IPRules", &m.IPRules) + delete(rawMsg, key) + case "virtualNetworkRules": + err = unpopulate(val, "VirtualNetworkRules", &m.VirtualNetworkRules) + 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 MHSMPrivateEndpoint. +func (m MHSMPrivateEndpoint) 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 MHSMPrivateEndpoint. +func (m *MHSMPrivateEndpoint) UnmarshalJSON(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 MHSMPrivateEndpointConnection. +func (m MHSMPrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", m.Etag) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "sku", m.SKU) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateEndpointConnection. +func (m *MHSMPrivateEndpointConnection) UnmarshalJSON(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 "etag": + err = unpopulate(val, "Etag", &m.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + 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 MHSMPrivateEndpointConnectionItem. +func (m MHSMPrivateEndpointConnectionItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", m.Etag) + populate(objectMap, "id", m.ID) + populate(objectMap, "properties", m.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateEndpointConnectionItem. +func (m *MHSMPrivateEndpointConnectionItem) UnmarshalJSON(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 "etag": + err = unpopulate(val, "Etag", &m.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + 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 MHSMPrivateEndpointConnectionProperties. +func (m MHSMPrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "privateEndpoint", m.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", m.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", m.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateEndpointConnectionProperties. +func (m *MHSMPrivateEndpointConnectionProperties) UnmarshalJSON(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 "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &m.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &m.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + 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 MHSMPrivateEndpointConnectionsListResult. +func (m MHSMPrivateEndpointConnectionsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateEndpointConnectionsListResult. +func (m *MHSMPrivateEndpointConnectionsListResult) UnmarshalJSON(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 "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + 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 MHSMPrivateLinkResource. +func (m MHSMPrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "sku", m.SKU) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateLinkResource. +func (m *MHSMPrivateLinkResource) UnmarshalJSON(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) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + 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 MHSMPrivateLinkResourceListResult. +func (m MHSMPrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateLinkResourceListResult. +func (m *MHSMPrivateLinkResourceListResult) UnmarshalJSON(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 "value": + err = unpopulate(val, "Value", &m.Value) + 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 MHSMPrivateLinkResourceProperties. +func (m MHSMPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "groupId", m.GroupID) + populate(objectMap, "requiredMembers", m.RequiredMembers) + populate(objectMap, "requiredZoneNames", m.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateLinkResourceProperties. +func (m *MHSMPrivateLinkResourceProperties) UnmarshalJSON(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 "groupId": + err = unpopulate(val, "GroupID", &m.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &m.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &m.RequiredZoneNames) + 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 MHSMPrivateLinkServiceConnectionState. +func (m MHSMPrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "actionsRequired", m.ActionsRequired) + populate(objectMap, "description", m.Description) + populate(objectMap, "status", m.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMPrivateLinkServiceConnectionState. +func (m *MHSMPrivateLinkServiceConnectionState) UnmarshalJSON(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 "actionsRequired": + err = unpopulate(val, "ActionsRequired", &m.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + 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 MHSMRegionsListResult. +func (m MHSMRegionsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MHSMRegionsListResult. +func (m *MHSMRegionsListResult) UnmarshalJSON(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 "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + 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 MHSMVirtualNetworkRule. +func (m MHSMVirtualNetworkRule) 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 MHSMVirtualNetworkRule. +func (m *MHSMVirtualNetworkRule) UnmarshalJSON(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 ManagedHSMSecurityDomainProperties. +func (m ManagedHSMSecurityDomainProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "activationStatus", m.ActivationStatus) + populate(objectMap, "activationStatusMessage", m.ActivationStatusMessage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHSMSecurityDomainProperties. +func (m *ManagedHSMSecurityDomainProperties) UnmarshalJSON(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 "activationStatus": + err = unpopulate(val, "ActivationStatus", &m.ActivationStatus) + delete(rawMsg, key) + case "activationStatusMessage": + err = unpopulate(val, "ActivationStatusMessage", &m.ActivationStatusMessage) + 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 ManagedHsm. +func (m ManagedHsm) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "sku", m.SKU) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsm. +func (m *ManagedHsm) UnmarshalJSON(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) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + 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 ManagedHsmAction. +func (m ManagedHsmAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmAction. +func (m *ManagedHsmAction) UnmarshalJSON(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 "type": + err = unpopulate(val, "Type", &m.Type) + 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 ManagedHsmError. +func (m ManagedHsmError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "error", m.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmError. +func (m *ManagedHsmError) UnmarshalJSON(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 "error": + err = unpopulate(val, "Error", &m.Error) + 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 ManagedHsmKey. +func (m ManagedHsmKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmKey. +func (m *ManagedHsmKey) UnmarshalJSON(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) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + 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 ManagedHsmKeyAttributes. +func (m ManagedHsmKeyAttributes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "created", m.Created) + populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "exp", m.Expires) + populate(objectMap, "exportable", m.Exportable) + populate(objectMap, "nbf", m.NotBefore) + populate(objectMap, "recoveryLevel", m.RecoveryLevel) + populate(objectMap, "updated", m.Updated) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmKeyAttributes. +func (m *ManagedHsmKeyAttributes) UnmarshalJSON(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 "created": + err = unpopulate(val, "Created", &m.Created) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + delete(rawMsg, key) + case "exp": + err = unpopulate(val, "Expires", &m.Expires) + delete(rawMsg, key) + case "exportable": + err = unpopulate(val, "Exportable", &m.Exportable) + delete(rawMsg, key) + case "nbf": + err = unpopulate(val, "NotBefore", &m.NotBefore) + delete(rawMsg, key) + case "recoveryLevel": + err = unpopulate(val, "RecoveryLevel", &m.RecoveryLevel) + delete(rawMsg, key) + case "updated": + err = unpopulate(val, "Updated", &m.Updated) + 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 ManagedHsmKeyCreateParameters. +func (m ManagedHsmKeyCreateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "tags", m.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmKeyCreateParameters. +func (m *ManagedHsmKeyCreateParameters) UnmarshalJSON(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 "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + 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 ManagedHsmKeyListResult. +func (m ManagedHsmKeyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmKeyListResult. +func (m *ManagedHsmKeyListResult) UnmarshalJSON(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 "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + 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 ManagedHsmKeyProperties. +func (m ManagedHsmKeyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributes", m.Attributes) + populate(objectMap, "curveName", m.CurveName) + populate(objectMap, "keyOps", m.KeyOps) + populate(objectMap, "keySize", m.KeySize) + populate(objectMap, "keyUri", m.KeyURI) + populate(objectMap, "keyUriWithVersion", m.KeyURIWithVersion) + populate(objectMap, "kty", m.Kty) + populate(objectMap, "release_policy", m.ReleasePolicy) + populate(objectMap, "rotationPolicy", m.RotationPolicy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmKeyProperties. +func (m *ManagedHsmKeyProperties) UnmarshalJSON(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 "attributes": + err = unpopulate(val, "Attributes", &m.Attributes) + delete(rawMsg, key) + case "curveName": + err = unpopulate(val, "CurveName", &m.CurveName) + delete(rawMsg, key) + case "keyOps": + err = unpopulate(val, "KeyOps", &m.KeyOps) + delete(rawMsg, key) + case "keySize": + err = unpopulate(val, "KeySize", &m.KeySize) + delete(rawMsg, key) + case "keyUri": + err = unpopulate(val, "KeyURI", &m.KeyURI) + delete(rawMsg, key) + case "keyUriWithVersion": + err = unpopulate(val, "KeyURIWithVersion", &m.KeyURIWithVersion) + delete(rawMsg, key) + case "kty": + err = unpopulate(val, "Kty", &m.Kty) + delete(rawMsg, key) + case "release_policy": + err = unpopulate(val, "ReleasePolicy", &m.ReleasePolicy) + delete(rawMsg, key) + case "rotationPolicy": + err = unpopulate(val, "RotationPolicy", &m.RotationPolicy) + 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 ManagedHsmKeyReleasePolicy. +func (m ManagedHsmKeyReleasePolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "contentType", m.ContentType) + populateByteArray(objectMap, "data", m.Data, runtime.Base64URLFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmKeyReleasePolicy. +func (m *ManagedHsmKeyReleasePolicy) UnmarshalJSON(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 "contentType": + err = unpopulate(val, "ContentType", &m.ContentType) + delete(rawMsg, key) + case "data": + err = runtime.DecodeByteArray(string(val), &m.Data, runtime.Base64URLFormat) + 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 ManagedHsmKeyRotationPolicyAttributes. +func (m ManagedHsmKeyRotationPolicyAttributes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "created", m.Created) + populate(objectMap, "expiryTime", m.ExpiryTime) + populate(objectMap, "updated", m.Updated) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmKeyRotationPolicyAttributes. +func (m *ManagedHsmKeyRotationPolicyAttributes) UnmarshalJSON(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 "created": + err = unpopulate(val, "Created", &m.Created) + delete(rawMsg, key) + case "expiryTime": + err = unpopulate(val, "ExpiryTime", &m.ExpiryTime) + delete(rawMsg, key) + case "updated": + err = unpopulate(val, "Updated", &m.Updated) + 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 ManagedHsmLifetimeAction. +func (m ManagedHsmLifetimeAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "action", m.Action) + populate(objectMap, "trigger", m.Trigger) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmLifetimeAction. +func (m *ManagedHsmLifetimeAction) UnmarshalJSON(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 "action": + err = unpopulate(val, "Action", &m.Action) + delete(rawMsg, key) + case "trigger": + err = unpopulate(val, "Trigger", &m.Trigger) + 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 ManagedHsmListResult. +func (m ManagedHsmListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmListResult. +func (m *ManagedHsmListResult) UnmarshalJSON(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 "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + 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 ManagedHsmProperties. +func (m ManagedHsmProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "createMode", m.CreateMode) + populate(objectMap, "enablePurgeProtection", m.EnablePurgeProtection) + populate(objectMap, "enableSoftDelete", m.EnableSoftDelete) + populate(objectMap, "hsmUri", m.HsmURI) + populate(objectMap, "initialAdminObjectIds", m.InitialAdminObjectIDs) + populate(objectMap, "networkAcls", m.NetworkACLs) + populate(objectMap, "privateEndpointConnections", m.PrivateEndpointConnections) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "publicNetworkAccess", m.PublicNetworkAccess) + populate(objectMap, "regions", m.Regions) + populateTimeRFC3339(objectMap, "scheduledPurgeDate", m.ScheduledPurgeDate) + populate(objectMap, "securityDomainProperties", m.SecurityDomainProperties) + populate(objectMap, "softDeleteRetentionInDays", m.SoftDeleteRetentionInDays) + populate(objectMap, "statusMessage", m.StatusMessage) + populate(objectMap, "tenantId", m.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmProperties. +func (m *ManagedHsmProperties) UnmarshalJSON(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 "createMode": + err = unpopulate(val, "CreateMode", &m.CreateMode) + delete(rawMsg, key) + case "enablePurgeProtection": + err = unpopulate(val, "EnablePurgeProtection", &m.EnablePurgeProtection) + delete(rawMsg, key) + case "enableSoftDelete": + err = unpopulate(val, "EnableSoftDelete", &m.EnableSoftDelete) + delete(rawMsg, key) + case "hsmUri": + err = unpopulate(val, "HsmURI", &m.HsmURI) + delete(rawMsg, key) + case "initialAdminObjectIds": + err = unpopulate(val, "InitialAdminObjectIDs", &m.InitialAdminObjectIDs) + delete(rawMsg, key) + case "networkAcls": + err = unpopulate(val, "NetworkACLs", &m.NetworkACLs) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &m.PrivateEndpointConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &m.PublicNetworkAccess) + delete(rawMsg, key) + case "regions": + err = unpopulate(val, "Regions", &m.Regions) + delete(rawMsg, key) + case "scheduledPurgeDate": + err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &m.ScheduledPurgeDate) + delete(rawMsg, key) + case "securityDomainProperties": + err = unpopulate(val, "SecurityDomainProperties", &m.SecurityDomainProperties) + delete(rawMsg, key) + case "softDeleteRetentionInDays": + err = unpopulate(val, "SoftDeleteRetentionInDays", &m.SoftDeleteRetentionInDays) + delete(rawMsg, key) + case "statusMessage": + err = unpopulate(val, "StatusMessage", &m.StatusMessage) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + 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 ManagedHsmResource. +func (m ManagedHsmResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "sku", m.SKU) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmResource. +func (m *ManagedHsmResource) UnmarshalJSON(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) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + 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 ManagedHsmRotationPolicy. +func (m ManagedHsmRotationPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributes", m.Attributes) + populate(objectMap, "lifetimeActions", m.LifetimeActions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmRotationPolicy. +func (m *ManagedHsmRotationPolicy) UnmarshalJSON(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 "attributes": + err = unpopulate(val, "Attributes", &m.Attributes) + delete(rawMsg, key) + case "lifetimeActions": + err = unpopulate(val, "LifetimeActions", &m.LifetimeActions) + 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 ManagedHsmSKU. +func (m ManagedHsmSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + if m.Family == nil { + m.Family = to.Ptr(ManagedHsmSKUFamilyB) + } + populate(objectMap, "family", m.Family) + populate(objectMap, "name", m.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmSKU. +func (m *ManagedHsmSKU) UnmarshalJSON(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 "family": + err = unpopulate(val, "Family", &m.Family) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + 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 ManagedHsmTrigger. +func (m ManagedHsmTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "timeAfterCreate", m.TimeAfterCreate) + populate(objectMap, "timeBeforeExpiry", m.TimeBeforeExpiry) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmTrigger. +func (m *ManagedHsmTrigger) UnmarshalJSON(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 "timeAfterCreate": + err = unpopulate(val, "TimeAfterCreate", &m.TimeAfterCreate) + delete(rawMsg, key) + case "timeBeforeExpiry": + err = unpopulate(val, "TimeBeforeExpiry", &m.TimeBeforeExpiry) + 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 MetricSpecification. +func (m MetricSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "aggregationType", m.AggregationType) + populate(objectMap, "dimensions", m.Dimensions) + populate(objectMap, "displayDescription", m.DisplayDescription) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "fillGapWithZero", m.FillGapWithZero) + populate(objectMap, "internalMetricName", m.InternalMetricName) + populate(objectMap, "lockAggregationType", m.LockAggregationType) + populate(objectMap, "name", m.Name) + populate(objectMap, "supportedAggregationTypes", m.SupportedAggregationTypes) + populate(objectMap, "supportedTimeGrainTypes", m.SupportedTimeGrainTypes) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification. +func (m *MetricSpecification) UnmarshalJSON(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 "aggregationType": + err = unpopulate(val, "AggregationType", &m.AggregationType) + delete(rawMsg, key) + case "dimensions": + err = unpopulate(val, "Dimensions", &m.Dimensions) + delete(rawMsg, key) + case "displayDescription": + err = unpopulate(val, "DisplayDescription", &m.DisplayDescription) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &m.DisplayName) + delete(rawMsg, key) + case "fillGapWithZero": + err = unpopulate(val, "FillGapWithZero", &m.FillGapWithZero) + delete(rawMsg, key) + case "internalMetricName": + err = unpopulate(val, "InternalMetricName", &m.InternalMetricName) + delete(rawMsg, key) + case "lockAggregationType": + err = unpopulate(val, "LockAggregationType", &m.LockAggregationType) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "supportedAggregationTypes": + err = unpopulate(val, "SupportedAggregationTypes", &m.SupportedAggregationTypes) + delete(rawMsg, key) + case "supportedTimeGrainTypes": + err = unpopulate(val, "SupportedTimeGrainTypes", &m.SupportedTimeGrainTypes) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &m.Unit) + 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 NetworkRuleSet. +func (n NetworkRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bypass", n.Bypass) + populate(objectMap, "defaultAction", n.DefaultAction) + populate(objectMap, "ipRules", n.IPRules) + populate(objectMap, "virtualNetworkRules", n.VirtualNetworkRules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkRuleSet. +func (n *NetworkRuleSet) UnmarshalJSON(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 "bypass": + err = unpopulate(val, "Bypass", &n.Bypass) + delete(rawMsg, key) + case "defaultAction": + err = unpopulate(val, "DefaultAction", &n.DefaultAction) + delete(rawMsg, key) + case "ipRules": + err = unpopulate(val, "IPRules", &n.IPRules) + delete(rawMsg, key) + case "virtualNetworkRules": + err = unpopulate(val, "VirtualNetworkRules", &n.VirtualNetworkRules) + 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 Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "display", o.Display) + populate(objectMap, "isDataAction", o.IsDataAction) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.OperationProperties) + populate(objectMap, "origin", o.Origin) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Operation. +func (o *Operation) UnmarshalJSON(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 "isDataAction": + err = unpopulate(val, "IsDataAction", &o.IsDataAction) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "OperationProperties", &o.OperationProperties) + 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 OperationDisplay. +func (o OperationDisplay) 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 OperationDisplay. +func (o *OperationDisplay) UnmarshalJSON(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 OperationListResult. +func (o OperationListResult) 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 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 "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 OperationProperties. +func (o OperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "serviceSpecification", o.ServiceSpecification) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties. +func (o *OperationProperties) UnmarshalJSON(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 "serviceSpecification": + err = unpopulate(val, "ServiceSpecification", &o.ServiceSpecification) + 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 Permissions. +func (p Permissions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificates", p.Certificates) + populate(objectMap, "keys", p.Keys) + populate(objectMap, "secrets", p.Secrets) + populate(objectMap, "storage", p.Storage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Permissions. +func (p *Permissions) UnmarshalJSON(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 "certificates": + err = unpopulate(val, "Certificates", &p.Certificates) + delete(rawMsg, key) + case "keys": + err = unpopulate(val, "Keys", &p.Keys) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &p.Secrets) + delete(rawMsg, key) + case "storage": + err = unpopulate(val, "Storage", &p.Storage) + 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, "etag", p.Etag) + 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) + 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 "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, 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) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionItem. +func (p PrivateEndpointConnectionItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "properties", p.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionItem. +func (p *PrivateEndpointConnectionItem) UnmarshalJSON(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 "etag": + err = unpopulate(val, "Etag", &p.Etag) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + 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, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + 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 "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) + } + 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 ProxyResourceWithoutSystemData. +func (p ProxyResourceWithoutSystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResourceWithoutSystemData. +func (p *ProxyResourceWithoutSystemData) UnmarshalJSON(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 "tags": + err = unpopulate(val, "Tags", &p.Tags) + 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 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 ResourceListResult. +func (r ResourceListResult) 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 ResourceListResult. +func (r *ResourceListResult) UnmarshalJSON(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 RotationPolicy. +func (r RotationPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributes", r.Attributes) + populate(objectMap, "lifetimeActions", r.LifetimeActions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RotationPolicy. +func (r *RotationPolicy) UnmarshalJSON(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 "attributes": + err = unpopulate(val, "Attributes", &r.Attributes) + delete(rawMsg, key) + case "lifetimeActions": + err = unpopulate(val, "LifetimeActions", &r.LifetimeActions) + 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) + if s.Family == nil { + s.Family = to.Ptr(SKUFamilyA) + } + populate(objectMap, "family", s.Family) + populate(objectMap, "name", s.Name) + 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 "family": + err = unpopulate(val, "Family", &s.Family) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + 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 Secret. +func (s Secret) 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 Secret. +func (s *Secret) UnmarshalJSON(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 SecretAttributes. +func (s SecretAttributes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeUnix(objectMap, "created", s.Created) + populate(objectMap, "enabled", s.Enabled) + populateTimeUnix(objectMap, "exp", s.Expires) + populateTimeUnix(objectMap, "nbf", s.NotBefore) + populateTimeUnix(objectMap, "updated", s.Updated) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretAttributes. +func (s *SecretAttributes) UnmarshalJSON(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 "created": + err = unpopulateTimeUnix(val, "Created", &s.Created) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &s.Enabled) + delete(rawMsg, key) + case "exp": + err = unpopulateTimeUnix(val, "Expires", &s.Expires) + delete(rawMsg, key) + case "nbf": + err = unpopulateTimeUnix(val, "NotBefore", &s.NotBefore) + delete(rawMsg, key) + case "updated": + err = unpopulateTimeUnix(val, "Updated", &s.Updated) + 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 SecretCreateOrUpdateParameters. +func (s SecretCreateOrUpdateParameters) 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 SecretCreateOrUpdateParameters. +func (s *SecretCreateOrUpdateParameters) UnmarshalJSON(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 SecretListResult. +func (s SecretListResult) 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 SecretListResult. +func (s *SecretListResult) UnmarshalJSON(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 SecretPatchParameters. +func (s SecretPatchParameters) 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 SecretPatchParameters. +func (s *SecretPatchParameters) UnmarshalJSON(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 SecretPatchProperties. +func (s SecretPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributes", s.Attributes) + populate(objectMap, "contentType", s.ContentType) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretPatchProperties. +func (s *SecretPatchProperties) UnmarshalJSON(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 "attributes": + err = unpopulate(val, "Attributes", &s.Attributes) + delete(rawMsg, key) + case "contentType": + err = unpopulate(val, "ContentType", &s.ContentType) + 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 SecretProperties. +func (s SecretProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "attributes", s.Attributes) + populate(objectMap, "contentType", s.ContentType) + populate(objectMap, "secretUri", s.SecretURI) + populate(objectMap, "secretUriWithVersion", s.SecretURIWithVersion) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SecretProperties. +func (s *SecretProperties) UnmarshalJSON(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 "attributes": + err = unpopulate(val, "Attributes", &s.Attributes) + delete(rawMsg, key) + case "contentType": + err = unpopulate(val, "ContentType", &s.ContentType) + delete(rawMsg, key) + case "secretUri": + err = unpopulate(val, "SecretURI", &s.SecretURI) + delete(rawMsg, key) + case "secretUriWithVersion": + err = unpopulate(val, "SecretURIWithVersion", &s.SecretURIWithVersion) + 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 ServiceSpecification. +func (s ServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logSpecifications", s.LogSpecifications) + populate(objectMap, "metricSpecifications", s.MetricSpecifications) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification. +func (s *ServiceSpecification) UnmarshalJSON(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 "logSpecifications": + err = unpopulate(val, "LogSpecifications", &s.LogSpecifications) + delete(rawMsg, key) + case "metricSpecifications": + err = unpopulate(val, "MetricSpecifications", &s.MetricSpecifications) + 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) + populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + 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 = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + 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 Trigger. +func (t Trigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "timeAfterCreate", t.TimeAfterCreate) + populate(objectMap, "timeBeforeExpiry", t.TimeBeforeExpiry) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Trigger. +func (t *Trigger) UnmarshalJSON(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 "timeAfterCreate": + err = unpopulate(val, "TimeAfterCreate", &t.TimeAfterCreate) + delete(rawMsg, key) + case "timeBeforeExpiry": + err = unpopulate(val, "TimeBeforeExpiry", &t.TimeBeforeExpiry) + 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 Vault. +func (v Vault) 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, "systemData", v.SystemData) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Vault. +func (v *Vault) UnmarshalJSON(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 "systemData": + err = unpopulate(val, "SystemData", &v.SystemData) + 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 VaultAccessPolicyParameters. +func (v VaultAccessPolicyParameters) 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 VaultAccessPolicyParameters. +func (v *VaultAccessPolicyParameters) UnmarshalJSON(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 VaultAccessPolicyProperties. +func (v VaultAccessPolicyProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessPolicies", v.AccessPolicies) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultAccessPolicyProperties. +func (v *VaultAccessPolicyProperties) UnmarshalJSON(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 "accessPolicies": + err = unpopulate(val, "AccessPolicies", &v.AccessPolicies) + 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 VaultCheckNameAvailabilityParameters. +func (v VaultCheckNameAvailabilityParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", v.Name) + objectMap["type"] = "Microsoft.KeyVault/vaults" + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultCheckNameAvailabilityParameters. +func (v *VaultCheckNameAvailabilityParameters) UnmarshalJSON(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 "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 VaultCreateOrUpdateParameters. +func (v VaultCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", v.Location) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultCreateOrUpdateParameters. +func (v *VaultCreateOrUpdateParameters) UnmarshalJSON(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 "location": + err = unpopulate(val, "Location", &v.Location) + 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 VaultListResult. +func (v VaultListResult) 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 VaultListResult. +func (v *VaultListResult) UnmarshalJSON(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 VaultPatchParameters. +func (v VaultPatchParameters) 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 VaultPatchParameters. +func (v *VaultPatchParameters) UnmarshalJSON(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 VaultPatchProperties. +func (v VaultPatchProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessPolicies", v.AccessPolicies) + populate(objectMap, "createMode", v.CreateMode) + populate(objectMap, "enablePurgeProtection", v.EnablePurgeProtection) + populate(objectMap, "enableRbacAuthorization", v.EnableRbacAuthorization) + populate(objectMap, "enableSoftDelete", v.EnableSoftDelete) + populate(objectMap, "enabledForDeployment", v.EnabledForDeployment) + populate(objectMap, "enabledForDiskEncryption", v.EnabledForDiskEncryption) + populate(objectMap, "enabledForTemplateDeployment", v.EnabledForTemplateDeployment) + populate(objectMap, "networkAcls", v.NetworkACLs) + populate(objectMap, "publicNetworkAccess", v.PublicNetworkAccess) + populate(objectMap, "sku", v.SKU) + populate(objectMap, "softDeleteRetentionInDays", v.SoftDeleteRetentionInDays) + populate(objectMap, "tenantId", v.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultPatchProperties. +func (v *VaultPatchProperties) UnmarshalJSON(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 "accessPolicies": + err = unpopulate(val, "AccessPolicies", &v.AccessPolicies) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &v.CreateMode) + delete(rawMsg, key) + case "enablePurgeProtection": + err = unpopulate(val, "EnablePurgeProtection", &v.EnablePurgeProtection) + delete(rawMsg, key) + case "enableRbacAuthorization": + err = unpopulate(val, "EnableRbacAuthorization", &v.EnableRbacAuthorization) + delete(rawMsg, key) + case "enableSoftDelete": + err = unpopulate(val, "EnableSoftDelete", &v.EnableSoftDelete) + delete(rawMsg, key) + case "enabledForDeployment": + err = unpopulate(val, "EnabledForDeployment", &v.EnabledForDeployment) + delete(rawMsg, key) + case "enabledForDiskEncryption": + err = unpopulate(val, "EnabledForDiskEncryption", &v.EnabledForDiskEncryption) + delete(rawMsg, key) + case "enabledForTemplateDeployment": + err = unpopulate(val, "EnabledForTemplateDeployment", &v.EnabledForTemplateDeployment) + delete(rawMsg, key) + case "networkAcls": + err = unpopulate(val, "NetworkACLs", &v.NetworkACLs) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &v.PublicNetworkAccess) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &v.SKU) + delete(rawMsg, key) + case "softDeleteRetentionInDays": + err = unpopulate(val, "SoftDeleteRetentionInDays", &v.SoftDeleteRetentionInDays) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &v.TenantID) + 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 VaultProperties. +func (v VaultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessPolicies", v.AccessPolicies) + populate(objectMap, "createMode", v.CreateMode) + populate(objectMap, "enablePurgeProtection", v.EnablePurgeProtection) + populate(objectMap, "enableRbacAuthorization", v.EnableRbacAuthorization) + populate(objectMap, "enableSoftDelete", v.EnableSoftDelete) + populate(objectMap, "enabledForDeployment", v.EnabledForDeployment) + populate(objectMap, "enabledForDiskEncryption", v.EnabledForDiskEncryption) + populate(objectMap, "enabledForTemplateDeployment", v.EnabledForTemplateDeployment) + populate(objectMap, "hsmPoolResourceId", v.HsmPoolResourceID) + populate(objectMap, "networkAcls", v.NetworkACLs) + populate(objectMap, "privateEndpointConnections", v.PrivateEndpointConnections) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "publicNetworkAccess", v.PublicNetworkAccess) + populate(objectMap, "sku", v.SKU) + populate(objectMap, "softDeleteRetentionInDays", v.SoftDeleteRetentionInDays) + populate(objectMap, "tenantId", v.TenantID) + populate(objectMap, "vaultUri", v.VaultURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VaultProperties. +func (v *VaultProperties) UnmarshalJSON(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 "accessPolicies": + err = unpopulate(val, "AccessPolicies", &v.AccessPolicies) + delete(rawMsg, key) + case "createMode": + err = unpopulate(val, "CreateMode", &v.CreateMode) + delete(rawMsg, key) + case "enablePurgeProtection": + err = unpopulate(val, "EnablePurgeProtection", &v.EnablePurgeProtection) + delete(rawMsg, key) + case "enableRbacAuthorization": + err = unpopulate(val, "EnableRbacAuthorization", &v.EnableRbacAuthorization) + delete(rawMsg, key) + case "enableSoftDelete": + err = unpopulate(val, "EnableSoftDelete", &v.EnableSoftDelete) + delete(rawMsg, key) + case "enabledForDeployment": + err = unpopulate(val, "EnabledForDeployment", &v.EnabledForDeployment) + delete(rawMsg, key) + case "enabledForDiskEncryption": + err = unpopulate(val, "EnabledForDiskEncryption", &v.EnabledForDiskEncryption) + delete(rawMsg, key) + case "enabledForTemplateDeployment": + err = unpopulate(val, "EnabledForTemplateDeployment", &v.EnabledForTemplateDeployment) + delete(rawMsg, key) + case "hsmPoolResourceId": + err = unpopulate(val, "HsmPoolResourceID", &v.HsmPoolResourceID) + delete(rawMsg, key) + case "networkAcls": + err = unpopulate(val, "NetworkACLs", &v.NetworkACLs) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &v.PrivateEndpointConnections) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &v.PublicNetworkAccess) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &v.SKU) + delete(rawMsg, key) + case "softDeleteRetentionInDays": + err = unpopulate(val, "SoftDeleteRetentionInDays", &v.SoftDeleteRetentionInDays) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &v.TenantID) + delete(rawMsg, key) + case "vaultUri": + err = unpopulate(val, "VaultURI", &v.VaultURI) + 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 VirtualNetworkRule. +func (v VirtualNetworkRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", v.ID) + populate(objectMap, "ignoreMissingVnetServiceEndpoint", v.IgnoreMissingVnetServiceEndpoint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRule. +func (v *VirtualNetworkRule) UnmarshalJSON(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 "ignoreMissingVnetServiceEndpoint": + err = unpopulate(val, "IgnoreMissingVnetServiceEndpoint", &v.IgnoreMissingVnetServiceEndpoint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, 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 populateByteArray(m map[string]any, k string, b []byte, f runtime.Base64Encoding) { + if azcore.IsNullValue(b) { + m[k] = nil + } else if len(b) == 0 { + return + } else { + m[k] = runtime.EncodeByteArray(b, f) + } +} + +func unpopulate(data json.RawMessage, fn string, v any) error { + if data == nil { + 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/keyvault/armkeyvault/zz_generated_operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/operations_client.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_operations_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/operations_client.go index 491d2b4d7d..3b7216f1d5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/operations_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -12,8 +13,6 @@ import ( "context" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -22,36 +21,27 @@ import ( // OperationsClient contains the methods for the Operations group. // Don't use this type directly, use NewOperationsClient() instead. type OperationsClient struct { - host string - pl runtime.Pipeline + 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. +// - 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) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".OperationsClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &OperationsClient{ - host: ep, - pl: pl, + internal: cl, } return client, nil } // NewListPager - Lists all of the available Key Vault Rest API operations. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// +// Generated from API version 2023-02-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 { @@ -68,7 +58,7 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption if err != nil { return OperationsClientListResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return OperationsClientListResponse{}, err } @@ -83,12 +73,12 @@ func (client *OperationsClient) NewListPager(options *OperationsClientListOption // listCreateRequest creates the List request. func (client *OperationsClient) listCreateRequest(ctx context.Context, options *OperationsClientListOptions) (*policy.Request, error) { urlPath := "/providers/Microsoft.KeyVault/operations" - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-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/keyvault/armkeyvault/zz_generated_privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privateendpointconnections_client.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_privateendpointconnections_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privateendpointconnections_client.go index 679f54da37..5d48db74b8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_privateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privateendpointconnections_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -26,65 +25,58 @@ import ( // PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. // Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead. type PrivateEndpointConnectionsClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient 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. +// - 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 NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".PrivateEndpointConnectionsClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &PrivateEndpointConnectionsClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } // BeginDelete - Deletes the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the key vault. -// vaultName - The name of the key vault. -// privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. -// options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the key vault. +// - vaultName - The name of the key vault. +// - privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. +// - options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete +// method. func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, vaultName, privateEndpointConnectionName, options) if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // Delete - Deletes the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, vaultName, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -113,12 +105,12 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -126,18 +118,19 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the key vault. -// vaultName - The name of the key vault. -// privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. -// options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the key vault. +// - vaultName - The name of the key vault. +// - privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. +// - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } @@ -166,12 +159,12 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,12 +181,12 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListByResourcePager - The List operation gets information about the private endpoint connections associated with the // vault. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the key vault. -// vaultName - The name of the key vault. -// options - PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.ListByResource -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the key vault. +// - vaultName - The name of the key vault. +// - options - PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByResourcePager +// method. func (client *PrivateEndpointConnectionsClient) NewListByResourcePager(resourceGroupName string, vaultName string, options *PrivateEndpointConnectionsClientListByResourceOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByResourceResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionsClientListByResourceResponse]{ More: func(page PrivateEndpointConnectionsClientListByResourceResponse) bool { @@ -210,7 +203,7 @@ func (client *PrivateEndpointConnectionsClient) NewListByResourcePager(resourceG if err != nil { return PrivateEndpointConnectionsClientListByResourceResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientListByResourceResponse{}, err } @@ -237,12 +230,12 @@ func (client *PrivateEndpointConnectionsClient) listByResourceCreateRequest(ctx return nil, errors.New("parameter vaultName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,19 +252,20 @@ func (client *PrivateEndpointConnectionsClient) listByResourceHandleResponse(res // Put - Updates the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the key vault. -// vaultName - The name of the key vault. -// privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. -// properties - The intended state of private endpoint connection. -// options - PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the key vault. +// - vaultName - The name of the key vault. +// - privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. +// - properties - The intended state of private endpoint connection. +// - options - PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put +// method. func (client *PrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientPutOptions) (PrivateEndpointConnectionsClientPutResponse, error) { req, err := client.putCreateRequest(ctx, resourceGroupName, vaultName, privateEndpointConnectionName, properties, options) if err != nil { return PrivateEndpointConnectionsClientPutResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientPutResponse{}, err } @@ -300,12 +294,12 @@ func (client *PrivateEndpointConnectionsClient) putCreateRequest(ctx context.Con 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, properties) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privatelinkresources_client.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_privatelinkresources_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privatelinkresources_client.go index 26b4acbfcf..731c8aa545 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_privatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privatelinkresources_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -25,49 +24,41 @@ import ( // PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. // Don't use this type directly, use NewPrivateLinkResourcesClient() instead. type PrivateLinkResourcesClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient 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. +// - 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 NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".PrivateLinkResourcesClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &PrivateLinkResourcesClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } // ListByVault - Gets the private link resources supported for the key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - Name of the resource group that contains the key vault. -// vaultName - The name of the key vault. -// options - PrivateLinkResourcesClientListByVaultOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByVault -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - Name of the resource group that contains the key vault. +// - vaultName - The name of the key vault. +// - options - PrivateLinkResourcesClientListByVaultOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByVault +// method. func (client *PrivateLinkResourcesClient) ListByVault(ctx context.Context, resourceGroupName string, vaultName string, options *PrivateLinkResourcesClientListByVaultOptions) (PrivateLinkResourcesClientListByVaultResponse, error) { req, err := client.listByVaultCreateRequest(ctx, resourceGroupName, vaultName, options) if err != nil { return PrivateLinkResourcesClientListByVaultResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientListByVaultResponse{}, err } @@ -92,12 +83,12 @@ func (client *PrivateLinkResourcesClient) listByVaultCreateRequest(ctx context.C return nil, errors.New("parameter vaultName cannot be empty") } urlPath = strings.ReplaceAll(urlPath, "{vaultName}", url.PathEscape(vaultName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-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/keyvault/armkeyvault/zz_generated_response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/response_types.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_response_types.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/response_types.go index 7513e14035..a1fd185c65 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/response_types.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -23,17 +24,17 @@ type KeysClientGetVersionResponse struct { Key } -// KeysClientListResponse contains the response from method KeysClient.List. +// KeysClientListResponse contains the response from method KeysClient.NewListPager. type KeysClientListResponse struct { KeyListResult } -// KeysClientListVersionsResponse contains the response from method KeysClient.ListVersions. +// KeysClientListVersionsResponse contains the response from method KeysClient.NewListVersionsPager. type KeysClientListVersionsResponse struct { KeyListResult } -// MHSMPrivateEndpointConnectionsClientDeleteResponse contains the response from method MHSMPrivateEndpointConnectionsClient.Delete. +// MHSMPrivateEndpointConnectionsClientDeleteResponse contains the response from method MHSMPrivateEndpointConnectionsClient.BeginDelete. type MHSMPrivateEndpointConnectionsClientDeleteResponse struct { MHSMPrivateEndpointConnection } @@ -43,7 +44,7 @@ type MHSMPrivateEndpointConnectionsClientGetResponse struct { MHSMPrivateEndpointConnection } -// MHSMPrivateEndpointConnectionsClientListByResourceResponse contains the response from method MHSMPrivateEndpointConnectionsClient.ListByResource. +// MHSMPrivateEndpointConnectionsClientListByResourceResponse contains the response from method MHSMPrivateEndpointConnectionsClient.NewListByResourcePager. type MHSMPrivateEndpointConnectionsClientListByResourceResponse struct { MHSMPrivateEndpointConnectionsListResult } @@ -63,12 +64,47 @@ type MHSMPrivateLinkResourcesClientListByMHSMResourceResponse struct { MHSMPrivateLinkResourceListResult } -// ManagedHsmsClientCreateOrUpdateResponse contains the response from method ManagedHsmsClient.CreateOrUpdate. +// MHSMRegionsClientListByResourceResponse contains the response from method MHSMRegionsClient.NewListByResourcePager. +type MHSMRegionsClientListByResourceResponse struct { + MHSMRegionsListResult +} + +// ManagedHsmKeysClientCreateIfNotExistResponse contains the response from method ManagedHsmKeysClient.CreateIfNotExist. +type ManagedHsmKeysClientCreateIfNotExistResponse struct { + ManagedHsmKey +} + +// ManagedHsmKeysClientGetResponse contains the response from method ManagedHsmKeysClient.Get. +type ManagedHsmKeysClientGetResponse struct { + ManagedHsmKey +} + +// ManagedHsmKeysClientGetVersionResponse contains the response from method ManagedHsmKeysClient.GetVersion. +type ManagedHsmKeysClientGetVersionResponse struct { + ManagedHsmKey +} + +// ManagedHsmKeysClientListResponse contains the response from method ManagedHsmKeysClient.NewListPager. +type ManagedHsmKeysClientListResponse struct { + ManagedHsmKeyListResult +} + +// ManagedHsmKeysClientListVersionsResponse contains the response from method ManagedHsmKeysClient.NewListVersionsPager. +type ManagedHsmKeysClientListVersionsResponse struct { + ManagedHsmKeyListResult +} + +// ManagedHsmsClientCheckMhsmNameAvailabilityResponse contains the response from method ManagedHsmsClient.CheckMhsmNameAvailability. +type ManagedHsmsClientCheckMhsmNameAvailabilityResponse struct { + CheckMhsmNameAvailabilityResult +} + +// ManagedHsmsClientCreateOrUpdateResponse contains the response from method ManagedHsmsClient.BeginCreateOrUpdate. type ManagedHsmsClientCreateOrUpdateResponse struct { ManagedHsm } -// ManagedHsmsClientDeleteResponse contains the response from method ManagedHsmsClient.Delete. +// ManagedHsmsClientDeleteResponse contains the response from method ManagedHsmsClient.BeginDelete. type ManagedHsmsClientDeleteResponse struct { // placeholder for future response values } @@ -83,37 +119,37 @@ type ManagedHsmsClientGetResponse struct { ManagedHsm } -// ManagedHsmsClientListByResourceGroupResponse contains the response from method ManagedHsmsClient.ListByResourceGroup. +// ManagedHsmsClientListByResourceGroupResponse contains the response from method ManagedHsmsClient.NewListByResourceGroupPager. type ManagedHsmsClientListByResourceGroupResponse struct { ManagedHsmListResult } -// ManagedHsmsClientListBySubscriptionResponse contains the response from method ManagedHsmsClient.ListBySubscription. +// ManagedHsmsClientListBySubscriptionResponse contains the response from method ManagedHsmsClient.NewListBySubscriptionPager. type ManagedHsmsClientListBySubscriptionResponse struct { ManagedHsmListResult } -// ManagedHsmsClientListDeletedResponse contains the response from method ManagedHsmsClient.ListDeleted. +// ManagedHsmsClientListDeletedResponse contains the response from method ManagedHsmsClient.NewListDeletedPager. type ManagedHsmsClientListDeletedResponse struct { DeletedManagedHsmListResult } -// ManagedHsmsClientPurgeDeletedResponse contains the response from method ManagedHsmsClient.PurgeDeleted. +// ManagedHsmsClientPurgeDeletedResponse contains the response from method ManagedHsmsClient.BeginPurgeDeleted. type ManagedHsmsClientPurgeDeletedResponse struct { // placeholder for future response values } -// ManagedHsmsClientUpdateResponse contains the response from method ManagedHsmsClient.Update. +// ManagedHsmsClientUpdateResponse contains the response from method ManagedHsmsClient.BeginUpdate. type ManagedHsmsClientUpdateResponse struct { ManagedHsm } -// OperationsClientListResponse contains the response from method OperationsClient.List. +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { OperationListResult } -// PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.Delete. +// PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete. type PrivateEndpointConnectionsClientDeleteResponse struct { PrivateEndpointConnection } @@ -123,7 +159,7 @@ type PrivateEndpointConnectionsClientGetResponse struct { PrivateEndpointConnection } -// PrivateEndpointConnectionsClientListByResourceResponse contains the response from method PrivateEndpointConnectionsClient.ListByResource. +// PrivateEndpointConnectionsClientListByResourceResponse contains the response from method PrivateEndpointConnectionsClient.NewListByResourcePager. type PrivateEndpointConnectionsClientListByResourceResponse struct { PrivateEndpointConnectionListResult } @@ -153,7 +189,7 @@ type SecretsClientGetResponse struct { Secret } -// SecretsClientListResponse contains the response from method SecretsClient.List. +// SecretsClientListResponse contains the response from method SecretsClient.NewListPager. type SecretsClientListResponse struct { SecretListResult } @@ -168,7 +204,7 @@ type VaultsClientCheckNameAvailabilityResponse struct { CheckNameAvailabilityResult } -// VaultsClientCreateOrUpdateResponse contains the response from method VaultsClient.CreateOrUpdate. +// VaultsClientCreateOrUpdateResponse contains the response from method VaultsClient.BeginCreateOrUpdate. type VaultsClientCreateOrUpdateResponse struct { Vault } @@ -188,27 +224,27 @@ type VaultsClientGetResponse struct { Vault } -// VaultsClientListByResourceGroupResponse contains the response from method VaultsClient.ListByResourceGroup. +// VaultsClientListByResourceGroupResponse contains the response from method VaultsClient.NewListByResourceGroupPager. type VaultsClientListByResourceGroupResponse struct { VaultListResult } -// VaultsClientListBySubscriptionResponse contains the response from method VaultsClient.ListBySubscription. +// VaultsClientListBySubscriptionResponse contains the response from method VaultsClient.NewListBySubscriptionPager. type VaultsClientListBySubscriptionResponse struct { VaultListResult } -// VaultsClientListDeletedResponse contains the response from method VaultsClient.ListDeleted. +// VaultsClientListDeletedResponse contains the response from method VaultsClient.NewListDeletedPager. type VaultsClientListDeletedResponse struct { DeletedVaultListResult } -// VaultsClientListResponse contains the response from method VaultsClient.List. +// VaultsClientListResponse contains the response from method VaultsClient.NewListPager. type VaultsClientListResponse struct { ResourceListResult } -// VaultsClientPurgeDeletedResponse contains the response from method VaultsClient.PurgeDeleted. +// VaultsClientPurgeDeletedResponse contains the response from method VaultsClient.BeginPurgeDeleted. type VaultsClientPurgeDeletedResponse struct { // placeholder for future response values } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_secrets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/secrets_client.go similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_secrets_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/secrets_client.go index fe357bbbd7..cf43971e13 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_secrets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/secrets_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -26,32 +25,23 @@ import ( // SecretsClient contains the methods for the Secrets group. // Don't use this type directly, use NewSecretsClient() instead. type SecretsClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewSecretsClient creates a new instance of SecretsClient 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. +// - 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 NewSecretsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecretsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".SecretsClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &SecretsClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } @@ -60,18 +50,20 @@ func NewSecretsClient(subscriptionID string, credential azcore.TokenCredential, // internal use in ARM deployments. Users should use the data-plane REST service for interaction // with vault secrets. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// vaultName - Name of the vault -// secretName - Name of the secret -// parameters - Parameters to create or update the secret -// options - SecretsClientCreateOrUpdateOptions contains the optional parameters for the SecretsClient.CreateOrUpdate method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - vaultName - Name of the vault +// - secretName - Name of the secret. The value you provide may be copied globally for the purpose of running the service. The +// value provided should not include personally identifiable or sensitive information. +// - parameters - Parameters to create or update the secret +// - options - SecretsClientCreateOrUpdateOptions contains the optional parameters for the SecretsClient.CreateOrUpdate method. func (client *SecretsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, secretName string, parameters SecretCreateOrUpdateParameters, options *SecretsClientCreateOrUpdateOptions) (SecretsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, secretName, parameters, options) if err != nil { return SecretsClientCreateOrUpdateResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientCreateOrUpdateResponse{}, err } @@ -100,12 +92,12 @@ func (client *SecretsClient) createOrUpdateCreateRequest(ctx context.Context, re 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,17 +115,18 @@ func (client *SecretsClient) createOrUpdateHandleResponse(resp *http.Response) ( // Get - Gets the specified secret. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane // REST service for interaction with vault secrets. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// vaultName - The name of the vault. -// secretName - The name of the secret. -// options - SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - vaultName - The name of the vault. +// - secretName - The name of the secret. +// - options - SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. func (client *SecretsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, secretName string, options *SecretsClientGetOptions) (SecretsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, secretName, options) if err != nil { return SecretsClientGetResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientGetResponse{}, err } @@ -162,12 +155,12 @@ func (client *SecretsClient) getCreateRequest(ctx context.Context, resourceGroup 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -185,11 +178,11 @@ func (client *SecretsClient) getHandleResponse(resp *http.Response) (SecretsClie // NewListPager - The List operation gets information about the secrets in a vault. NOTE: This API is intended for internal // use in ARM deployments. Users should use the data-plane REST service for interaction with // vault secrets. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// vaultName - The name of the vault. -// options - SecretsClientListOptions contains the optional parameters for the SecretsClient.List method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - vaultName - The name of the vault. +// - options - SecretsClientListOptions contains the optional parameters for the SecretsClient.NewListPager method. func (client *SecretsClient) NewListPager(resourceGroupName string, vaultName string, options *SecretsClientListOptions) *runtime.Pager[SecretsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SecretsClientListResponse]{ More: func(page SecretsClientListResponse) bool { @@ -206,7 +199,7 @@ func (client *SecretsClient) NewListPager(resourceGroupName string, vaultName st if err != nil { return SecretsClientListResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientListResponse{}, err } @@ -233,7 +226,7 @@ func (client *SecretsClient) listCreateRequest(ctx context.Context, resourceGrou 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.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -241,7 +234,7 @@ func (client *SecretsClient) listCreateRequest(ctx context.Context, resourceGrou if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,18 +252,19 @@ func (client *SecretsClient) listHandleResponse(resp *http.Response) (SecretsCli // Update - Update a secret in the specified subscription. NOTE: This API is intended for internal use in ARM deployments. // Users should use the data-plane REST service for interaction with vault secrets. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// vaultName - Name of the vault -// secretName - Name of the secret -// parameters - Parameters to patch the secret -// options - SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - vaultName - Name of the vault +// - secretName - Name of the secret +// - parameters - Parameters to patch the secret +// - options - SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method. func (client *SecretsClient) Update(ctx context.Context, resourceGroupName string, vaultName string, secretName string, parameters SecretPatchParameters, options *SecretsClientUpdateOptions) (SecretsClientUpdateResponse, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, vaultName, secretName, parameters, options) if err != nil { return SecretsClientUpdateResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientUpdateResponse{}, err } @@ -299,12 +293,12 @@ func (client *SecretsClient) updateCreateRequest(ctx context.Context, resourceGr 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_rfc3339.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_time_rfc3339.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_rfc3339.go index 543471aa0f..6b10975133 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_rfc3339.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -61,7 +62,7 @@ func (t *timeRFC3339) Parse(layout, value string) error { return err } -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { +func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_time_unix.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_unix.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_time_unix.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_unix.go index 6ef8910872..5698058826 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_time_unix.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_unix.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -36,7 +37,7 @@ func (t timeUnix) String() string { return fmt.Sprintf("%d", time.Time(t).Unix()) } -func populateTimeUnix(m map[string]interface{}, k string, t *time.Time) { +func populateTimeUnix(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_vaults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/vaults_client.go similarity index 84% rename from vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_vaults_client.go rename to vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/vaults_client.go index 310e7d09ff..b087a90a98 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_vaults_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/vaults_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armkeyvault @@ -13,8 +14,6 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -26,48 +25,40 @@ import ( // VaultsClient contains the methods for the Vaults group. // Don't use this type directly, use NewVaultsClient() instead. type VaultsClient struct { - host string + internal *arm.Client subscriptionID string - pl runtime.Pipeline } // NewVaultsClient creates a new instance of VaultsClient 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. +// - 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 NewVaultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VaultsClient, error) { - if options == nil { - options = &arm.ClientOptions{} - } - ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint - if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { - ep = c.Endpoint - } - pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + cl, err := arm.NewClient(moduleName+".VaultsClient", moduleVersion, credential, options) if err != nil { return nil, err } client := &VaultsClient{ subscriptionID: subscriptionID, - host: ep, - pl: pl, + internal: cl, } return client, nil } // CheckNameAvailability - Checks that the vault name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// vaultName - The name of the vault. -// options - VaultsClientCheckNameAvailabilityOptions contains the optional parameters for the VaultsClient.CheckNameAvailability -// method. +// +// Generated from API version 2023-02-01 +// - vaultName - The name of the vault. +// - options - VaultsClientCheckNameAvailabilityOptions contains the optional parameters for the VaultsClient.CheckNameAvailability +// method. func (client *VaultsClient) CheckNameAvailability(ctx context.Context, vaultName VaultCheckNameAvailabilityParameters, options *VaultsClientCheckNameAvailabilityOptions) (VaultsClientCheckNameAvailabilityResponse, error) { req, err := client.checkNameAvailabilityCreateRequest(ctx, vaultName, options) if err != nil { return VaultsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientCheckNameAvailabilityResponse{}, err } @@ -84,12 +75,12 @@ func (client *VaultsClient) checkNameAvailabilityCreateRequest(ctx context.Conte 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, vaultName) @@ -106,33 +97,35 @@ func (client *VaultsClient) checkNameAvailabilityHandleResponse(resp *http.Respo // BeginCreateOrUpdate - Create or update a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the server belongs. -// vaultName - Name of the vault -// parameters - Parameters to create or update the vault -// options - VaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the VaultsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the server belongs. +// - vaultName - Name of the vault +// - parameters - Parameters to create or update the vault +// - options - VaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the VaultsClient.BeginCreateOrUpdate +// method. func (client *VaultsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultCreateOrUpdateParameters, options *VaultsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VaultsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, vaultName, parameters, options) if err != nil { return nil, err } - return runtime.NewPoller[VaultsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller[VaultsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[VaultsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[VaultsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // CreateOrUpdate - Create or update a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *VaultsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultCreateOrUpdateParameters, options *VaultsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -157,12 +150,12 @@ func (client *VaultsClient) createOrUpdateCreateRequest(ctx context.Context, res 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -170,16 +163,17 @@ func (client *VaultsClient) createOrUpdateCreateRequest(ctx context.Context, res // Delete - Deletes the specified Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// vaultName - The name of the vault to delete -// options - VaultsClientDeleteOptions contains the optional parameters for the VaultsClient.Delete method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - vaultName - The name of the vault to delete +// - options - VaultsClientDeleteOptions contains the optional parameters for the VaultsClient.Delete method. func (client *VaultsClient) Delete(ctx context.Context, resourceGroupName string, vaultName string, options *VaultsClientDeleteOptions) (VaultsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, vaultName, options) if err != nil { return VaultsClientDeleteResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientDeleteResponse{}, err } @@ -204,12 +198,12 @@ func (client *VaultsClient) deleteCreateRequest(ctx context.Context, resourceGro 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -217,16 +211,17 @@ func (client *VaultsClient) deleteCreateRequest(ctx context.Context, resourceGro // Get - Gets the specified Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// vaultName - The name of the vault. -// options - VaultsClientGetOptions contains the optional parameters for the VaultsClient.Get method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - vaultName - The name of the vault. +// - options - VaultsClientGetOptions contains the optional parameters for the VaultsClient.Get method. func (client *VaultsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, options *VaultsClientGetOptions) (VaultsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, options) if err != nil { return VaultsClientGetResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientGetResponse{}, err } @@ -251,12 +246,12 @@ func (client *VaultsClient) getCreateRequest(ctx context.Context, resourceGroupN 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -273,16 +268,17 @@ func (client *VaultsClient) getHandleResponse(resp *http.Response) (VaultsClient // GetDeleted - Gets the deleted Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// vaultName - The name of the vault. -// location - The location of the deleted vault. -// options - VaultsClientGetDeletedOptions contains the optional parameters for the VaultsClient.GetDeleted method. +// +// Generated from API version 2023-02-01 +// - vaultName - The name of the vault. +// - location - The location of the deleted vault. +// - options - VaultsClientGetDeletedOptions contains the optional parameters for the VaultsClient.GetDeleted method. func (client *VaultsClient) GetDeleted(ctx context.Context, vaultName string, location string, options *VaultsClientGetDeletedOptions) (VaultsClientGetDeletedResponse, error) { req, err := client.getDeletedCreateRequest(ctx, vaultName, location, options) if err != nil { return VaultsClientGetDeletedResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientGetDeletedResponse{}, err } @@ -307,12 +303,12 @@ func (client *VaultsClient) getDeletedCreateRequest(ctx context.Context, vaultNa 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -328,9 +324,9 @@ func (client *VaultsClient) getDeletedHandleResponse(resp *http.Response) (Vault } // NewListPager - The List operation gets information about the vaults associated with the subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// options - VaultsClientListOptions contains the optional parameters for the VaultsClient.List method. +// +// Generated from API version 2023-02-01 +// - options - VaultsClientListOptions contains the optional parameters for the VaultsClient.NewListPager method. func (client *VaultsClient) NewListPager(options *VaultsClientListOptions) *runtime.Pager[VaultsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VaultsClientListResponse]{ More: func(page VaultsClientListResponse) bool { @@ -347,7 +343,7 @@ func (client *VaultsClient) NewListPager(options *VaultsClientListOptions) *runt if err != nil { return VaultsClientListResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientListResponse{}, err } @@ -366,7 +362,7 @@ func (client *VaultsClient) listCreateRequest(ctx context.Context, options *Vaul 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.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -392,11 +388,11 @@ func (client *VaultsClient) listHandleResponse(resp *http.Response) (VaultsClien // NewListByResourceGroupPager - The List operation gets information about the vaults associated with the subscription and // within the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// options - VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.ListByResourceGroup -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - options - VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.NewListByResourceGroupPager +// method. func (client *VaultsClient) NewListByResourceGroupPager(resourceGroupName string, options *VaultsClientListByResourceGroupOptions) *runtime.Pager[VaultsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[VaultsClientListByResourceGroupResponse]{ More: func(page VaultsClientListByResourceGroupResponse) bool { @@ -413,7 +409,7 @@ func (client *VaultsClient) NewListByResourceGroupPager(resourceGroupName string if err != nil { return VaultsClientListByResourceGroupResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientListByResourceGroupResponse{}, err } @@ -436,7 +432,7 @@ func (client *VaultsClient) listByResourceGroupCreateRequest(ctx context.Context 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.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -444,7 +440,7 @@ func (client *VaultsClient) listByResourceGroupCreateRequest(ctx context.Context if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -460,10 +456,10 @@ func (client *VaultsClient) listByResourceGroupHandleResponse(resp *http.Respons } // NewListBySubscriptionPager - The List operation gets information about the vaults associated with the subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// options - VaultsClientListBySubscriptionOptions contains the optional parameters for the VaultsClient.ListBySubscription -// method. +// +// Generated from API version 2023-02-01 +// - options - VaultsClientListBySubscriptionOptions contains the optional parameters for the VaultsClient.NewListBySubscriptionPager +// method. func (client *VaultsClient) NewListBySubscriptionPager(options *VaultsClientListBySubscriptionOptions) *runtime.Pager[VaultsClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[VaultsClientListBySubscriptionResponse]{ More: func(page VaultsClientListBySubscriptionResponse) bool { @@ -480,7 +476,7 @@ func (client *VaultsClient) NewListBySubscriptionPager(options *VaultsClientList if err != nil { return VaultsClientListBySubscriptionResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientListBySubscriptionResponse{}, err } @@ -499,7 +495,7 @@ func (client *VaultsClient) listBySubscriptionCreateRequest(ctx context.Context, 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.host, urlPath)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) if err != nil { return nil, err } @@ -507,7 +503,7 @@ func (client *VaultsClient) listBySubscriptionCreateRequest(ctx context.Context, if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -523,9 +519,9 @@ func (client *VaultsClient) listBySubscriptionHandleResponse(resp *http.Response } // NewListDeletedPager - Gets information about the deleted vaults in a subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// options - VaultsClientListDeletedOptions contains the optional parameters for the VaultsClient.ListDeleted method. +// +// Generated from API version 2023-02-01 +// - options - VaultsClientListDeletedOptions contains the optional parameters for the VaultsClient.NewListDeletedPager method. func (client *VaultsClient) NewListDeletedPager(options *VaultsClientListDeletedOptions) *runtime.Pager[VaultsClientListDeletedResponse] { return runtime.NewPager(runtime.PagingHandler[VaultsClientListDeletedResponse]{ More: func(page VaultsClientListDeletedResponse) bool { @@ -542,7 +538,7 @@ func (client *VaultsClient) NewListDeletedPager(options *VaultsClientListDeleted if err != nil { return VaultsClientListDeletedResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientListDeletedResponse{}, err } @@ -561,12 +557,12 @@ func (client *VaultsClient) listDeletedCreateRequest(ctx context.Context, option 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -583,32 +579,34 @@ func (client *VaultsClient) listDeletedHandleResponse(resp *http.Response) (Vaul // BeginPurgeDeleted - Permanently deletes the specified vault. aka Purges the deleted Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// vaultName - The name of the soft-deleted vault. -// location - The location of the soft-deleted vault. -// options - VaultsClientBeginPurgeDeletedOptions contains the optional parameters for the VaultsClient.BeginPurgeDeleted -// method. +// +// Generated from API version 2023-02-01 +// - vaultName - The name of the soft-deleted vault. +// - location - The location of the soft-deleted vault. +// - options - VaultsClientBeginPurgeDeletedOptions contains the optional parameters for the VaultsClient.BeginPurgeDeleted +// method. func (client *VaultsClient) BeginPurgeDeleted(ctx context.Context, vaultName string, location string, options *VaultsClientBeginPurgeDeletedOptions) (*runtime.Poller[VaultsClientPurgeDeletedResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.purgeDeleted(ctx, vaultName, location, options) if err != nil { return nil, err } - return runtime.NewPoller[VaultsClientPurgeDeletedResponse](resp, client.pl, nil) + return runtime.NewPoller[VaultsClientPurgeDeletedResponse](resp, client.internal.Pipeline(), nil) } else { - return runtime.NewPollerFromResumeToken[VaultsClientPurgeDeletedResponse](options.ResumeToken, client.pl, nil) + return runtime.NewPollerFromResumeToken[VaultsClientPurgeDeletedResponse](options.ResumeToken, client.internal.Pipeline(), nil) } } // PurgeDeleted - Permanently deletes the specified vault. aka Purges the deleted Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 +// +// Generated from API version 2023-02-01 func (client *VaultsClient) purgeDeleted(ctx context.Context, vaultName string, location string, options *VaultsClientBeginPurgeDeletedOptions) (*http.Response, error) { req, err := client.purgeDeletedCreateRequest(ctx, vaultName, location, options) if err != nil { return nil, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } @@ -633,12 +631,12 @@ func (client *VaultsClient) purgeDeletedCreateRequest(ctx context.Context, vault 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -646,17 +644,18 @@ func (client *VaultsClient) purgeDeletedCreateRequest(ctx context.Context, vault // Update - Update a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the server belongs. -// vaultName - Name of the vault -// parameters - Parameters to patch the vault -// options - VaultsClientUpdateOptions contains the optional parameters for the VaultsClient.Update method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the server belongs. +// - vaultName - Name of the vault +// - parameters - Parameters to patch the vault +// - options - VaultsClientUpdateOptions contains the optional parameters for the VaultsClient.Update method. func (client *VaultsClient) Update(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultPatchParameters, options *VaultsClientUpdateOptions) (VaultsClientUpdateResponse, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) if err != nil { return VaultsClientUpdateResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientUpdateResponse{}, err } @@ -681,12 +680,12 @@ func (client *VaultsClient) updateCreateRequest(ctx context.Context, resourceGro 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -703,19 +702,20 @@ func (client *VaultsClient) updateHandleResponse(resp *http.Response) (VaultsCli // UpdateAccessPolicy - Update access policies in a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-10-01 -// resourceGroupName - The name of the Resource Group to which the vault belongs. -// vaultName - Name of the vault -// operationKind - Name of the operation -// parameters - Access policy to merge into the vault -// options - VaultsClientUpdateAccessPolicyOptions contains the optional parameters for the VaultsClient.UpdateAccessPolicy -// method. +// +// Generated from API version 2023-02-01 +// - resourceGroupName - The name of the Resource Group to which the vault belongs. +// - vaultName - Name of the vault +// - operationKind - Name of the operation +// - parameters - Access policy to merge into the vault +// - options - VaultsClientUpdateAccessPolicyOptions contains the optional parameters for the VaultsClient.UpdateAccessPolicy +// method. func (client *VaultsClient) UpdateAccessPolicy(ctx context.Context, resourceGroupName string, vaultName string, operationKind AccessPolicyUpdateKind, parameters VaultAccessPolicyParameters, options *VaultsClientUpdateAccessPolicyOptions) (VaultsClientUpdateAccessPolicyResponse, error) { req, err := client.updateAccessPolicyCreateRequest(ctx, resourceGroupName, vaultName, operationKind, parameters, options) if err != nil { return VaultsClientUpdateAccessPolicyResponse{}, err } - resp, err := client.pl.Do(req) + resp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientUpdateAccessPolicyResponse{}, err } @@ -744,12 +744,12 @@ func (client *VaultsClient) updateAccessPolicyCreateRequest(ctx context.Context, 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.host, urlPath)) + 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", "2021-10-01") + reqQP.Set("api-version", "2023-02-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_models_serde.go deleted file mode 100644 index 95d14a8bc1..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/zz_generated_models_serde.go +++ /dev/null @@ -1,581 +0,0 @@ -//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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armkeyvault - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type Attributes. -func (a Attributes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeUnix(objectMap, "created", a.Created) - populate(objectMap, "enabled", a.Enabled) - populateTimeUnix(objectMap, "exp", a.Expires) - populateTimeUnix(objectMap, "nbf", a.NotBefore) - populateTimeUnix(objectMap, "updated", a.Updated) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Attributes. -func (a *Attributes) UnmarshalJSON(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 "created": - err = unpopulateTimeUnix(val, "Created", &a.Created) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &a.Enabled) - delete(rawMsg, key) - case "exp": - err = unpopulateTimeUnix(val, "Expires", &a.Expires) - delete(rawMsg, key) - case "nbf": - err = unpopulateTimeUnix(val, "NotBefore", &a.NotBefore) - delete(rawMsg, key) - case "updated": - err = unpopulateTimeUnix(val, "Updated", &a.Updated) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedManagedHsmProperties. -func (d *DeletedManagedHsmProperties) UnmarshalJSON(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 "deletionDate": - err = unpopulateTimeRFC3339(val, "DeletionDate", &d.DeletionDate) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &d.Location) - delete(rawMsg, key) - case "mhsmId": - err = unpopulate(val, "MhsmID", &d.MhsmID) - delete(rawMsg, key) - case "purgeProtectionEnabled": - err = unpopulate(val, "PurgeProtectionEnabled", &d.PurgeProtectionEnabled) - delete(rawMsg, key) - case "scheduledPurgeDate": - err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &d.ScheduledPurgeDate) - 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 -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DeletedVaultProperties. -func (d *DeletedVaultProperties) UnmarshalJSON(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 "deletionDate": - err = unpopulateTimeRFC3339(val, "DeletionDate", &d.DeletionDate) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &d.Location) - delete(rawMsg, key) - case "purgeProtectionEnabled": - err = unpopulate(val, "PurgeProtectionEnabled", &d.PurgeProtectionEnabled) - delete(rawMsg, key) - case "scheduledPurgeDate": - err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &d.ScheduledPurgeDate) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &d.Tags) - delete(rawMsg, key) - case "vaultId": - err = unpopulate(val, "VaultID", &d.VaultID) - 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 Key. -func (k Key) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", k.ID) - populate(objectMap, "location", k.Location) - populate(objectMap, "name", k.Name) - populate(objectMap, "properties", k.Properties) - populate(objectMap, "tags", k.Tags) - populate(objectMap, "type", k.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type KeyCreateParameters. -func (k KeyCreateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", k.Properties) - populate(objectMap, "tags", k.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type KeyProperties. -func (k KeyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "attributes", k.Attributes) - populate(objectMap, "curveName", k.CurveName) - populate(objectMap, "keyOps", k.KeyOps) - populate(objectMap, "keySize", k.KeySize) - populate(objectMap, "keyUri", k.KeyURI) - populate(objectMap, "keyUriWithVersion", k.KeyURIWithVersion) - populate(objectMap, "kty", k.Kty) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MHSMNetworkRuleSet. -func (m MHSMNetworkRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bypass", m.Bypass) - populate(objectMap, "defaultAction", m.DefaultAction) - populate(objectMap, "ipRules", m.IPRules) - populate(objectMap, "virtualNetworkRules", m.VirtualNetworkRules) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateEndpointConnection. -func (m MHSMPrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", m.Etag) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "sku", m.SKU) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateLinkResource. -func (m MHSMPrivateLinkResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "sku", m.SKU) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MHSMPrivateLinkResourceProperties. -func (m MHSMPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupId", m.GroupID) - populate(objectMap, "requiredMembers", m.RequiredMembers) - populate(objectMap, "requiredZoneNames", m.RequiredZoneNames) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedHsm. -func (m ManagedHsm) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "sku", m.SKU) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedHsmProperties. -func (m ManagedHsmProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "createMode", m.CreateMode) - populate(objectMap, "enablePurgeProtection", m.EnablePurgeProtection) - populate(objectMap, "enableSoftDelete", m.EnableSoftDelete) - populate(objectMap, "hsmUri", m.HsmURI) - populate(objectMap, "initialAdminObjectIds", m.InitialAdminObjectIDs) - populate(objectMap, "networkAcls", m.NetworkACLs) - populate(objectMap, "privateEndpointConnections", m.PrivateEndpointConnections) - populate(objectMap, "provisioningState", m.ProvisioningState) - populate(objectMap, "publicNetworkAccess", m.PublicNetworkAccess) - populateTimeRFC3339(objectMap, "scheduledPurgeDate", m.ScheduledPurgeDate) - populate(objectMap, "softDeleteRetentionInDays", m.SoftDeleteRetentionInDays) - populate(objectMap, "statusMessage", m.StatusMessage) - populate(objectMap, "tenantId", m.TenantID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmProperties. -func (m *ManagedHsmProperties) UnmarshalJSON(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 "createMode": - err = unpopulate(val, "CreateMode", &m.CreateMode) - delete(rawMsg, key) - case "enablePurgeProtection": - err = unpopulate(val, "EnablePurgeProtection", &m.EnablePurgeProtection) - delete(rawMsg, key) - case "enableSoftDelete": - err = unpopulate(val, "EnableSoftDelete", &m.EnableSoftDelete) - delete(rawMsg, key) - case "hsmUri": - err = unpopulate(val, "HsmURI", &m.HsmURI) - delete(rawMsg, key) - case "initialAdminObjectIds": - err = unpopulate(val, "InitialAdminObjectIDs", &m.InitialAdminObjectIDs) - delete(rawMsg, key) - case "networkAcls": - err = unpopulate(val, "NetworkACLs", &m.NetworkACLs) - delete(rawMsg, key) - case "privateEndpointConnections": - err = unpopulate(val, "PrivateEndpointConnections", &m.PrivateEndpointConnections) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &m.PublicNetworkAccess) - delete(rawMsg, key) - case "scheduledPurgeDate": - err = unpopulateTimeRFC3339(val, "ScheduledPurgeDate", &m.ScheduledPurgeDate) - delete(rawMsg, key) - case "softDeleteRetentionInDays": - err = unpopulate(val, "SoftDeleteRetentionInDays", &m.SoftDeleteRetentionInDays) - delete(rawMsg, key) - case "statusMessage": - err = unpopulate(val, "StatusMessage", &m.StatusMessage) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &m.TenantID) - 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 ManagedHsmResource. -func (m ManagedHsmResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "sku", m.SKU) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkRuleSet. -func (n NetworkRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bypass", n.Bypass) - populate(objectMap, "defaultAction", n.DefaultAction) - populate(objectMap, "ipRules", n.IPRules) - populate(objectMap, "virtualNetworkRules", n.VirtualNetworkRules) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Permissions. -func (p Permissions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "certificates", p.Certificates) - populate(objectMap, "keys", p.Keys) - populate(objectMap, "secrets", p.Secrets) - populate(objectMap, "storage", p.Storage) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. -func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - 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) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. -func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. -func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupId", p.GroupID) - populate(objectMap, "requiredMembers", p.RequiredMembers) - populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) -} - -// MarshalJSON implements the json.Marshaller interface for type Secret. -func (s Secret) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - 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) -} - -// MarshalJSON implements the json.Marshaller interface for type SecretAttributes. -func (s SecretAttributes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeUnix(objectMap, "created", s.Created) - populate(objectMap, "enabled", s.Enabled) - populateTimeUnix(objectMap, "exp", s.Expires) - populateTimeUnix(objectMap, "nbf", s.NotBefore) - populateTimeUnix(objectMap, "updated", s.Updated) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SecretAttributes. -func (s *SecretAttributes) UnmarshalJSON(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 "created": - err = unpopulateTimeUnix(val, "Created", &s.Created) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &s.Enabled) - delete(rawMsg, key) - case "exp": - err = unpopulateTimeUnix(val, "Expires", &s.Expires) - delete(rawMsg, key) - case "nbf": - err = unpopulateTimeUnix(val, "NotBefore", &s.NotBefore) - delete(rawMsg, key) - case "updated": - err = unpopulateTimeUnix(val, "Updated", &s.Updated) - 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 SecretCreateOrUpdateParameters. -func (s SecretCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SecretPatchParameters. -func (s SecretPatchParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - 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 = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - 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 VaultAccessPolicyProperties. -func (v VaultAccessPolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accessPolicies", v.AccessPolicies) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VaultCreateOrUpdateParameters. -func (v VaultCreateOrUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "location", v.Location) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VaultPatchParameters. -func (v VaultPatchParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VaultPatchProperties. -func (v VaultPatchProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accessPolicies", v.AccessPolicies) - populate(objectMap, "createMode", v.CreateMode) - populate(objectMap, "enablePurgeProtection", v.EnablePurgeProtection) - populate(objectMap, "enableRbacAuthorization", v.EnableRbacAuthorization) - populate(objectMap, "enableSoftDelete", v.EnableSoftDelete) - populate(objectMap, "enabledForDeployment", v.EnabledForDeployment) - populate(objectMap, "enabledForDiskEncryption", v.EnabledForDiskEncryption) - populate(objectMap, "enabledForTemplateDeployment", v.EnabledForTemplateDeployment) - populate(objectMap, "networkAcls", v.NetworkACLs) - populate(objectMap, "publicNetworkAccess", v.PublicNetworkAccess) - populate(objectMap, "sku", v.SKU) - populate(objectMap, "softDeleteRetentionInDays", v.SoftDeleteRetentionInDays) - populate(objectMap, "tenantId", v.TenantID) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type VaultProperties. -func (v VaultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accessPolicies", v.AccessPolicies) - populate(objectMap, "createMode", v.CreateMode) - populate(objectMap, "enablePurgeProtection", v.EnablePurgeProtection) - populate(objectMap, "enableRbacAuthorization", v.EnableRbacAuthorization) - populate(objectMap, "enableSoftDelete", v.EnableSoftDelete) - populate(objectMap, "enabledForDeployment", v.EnabledForDeployment) - populate(objectMap, "enabledForDiskEncryption", v.EnabledForDiskEncryption) - populate(objectMap, "enabledForTemplateDeployment", v.EnabledForTemplateDeployment) - populate(objectMap, "hsmPoolResourceId", v.HsmPoolResourceID) - populate(objectMap, "networkAcls", v.NetworkACLs) - populate(objectMap, "privateEndpointConnections", v.PrivateEndpointConnections) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "publicNetworkAccess", v.PublicNetworkAccess) - populate(objectMap, "sku", v.SKU) - populate(objectMap, "softDeleteRetentionInDays", v.SoftDeleteRetentionInDays) - populate(objectMap, "tenantId", v.TenantID) - populate(objectMap, "vaultUri", v.VaultURI) - return json.Marshal(objectMap) -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - 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/modules.txt b/vendor/modules.txt index d05bb87c20..a92072d694 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -47,7 +47,7 @@ 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/keyvault/armkeyvault v1.0.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault # github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1 From a74154b752bd6cabb4ee6bb66f41d32b9776b417 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Tue, 17 Oct 2023 12:55:54 +0000 Subject: [PATCH 10/11] feat: add node metrics fix test --- charts/latest/blob-csi-driver-v0.0.0.tgz | Bin 5873 -> 5884 bytes .../templates/csi-blob-node.yaml | 1 + charts/latest/blob-csi-driver/values.yaml | 1 + deploy/csi-blob-node.yaml | 1 + pkg/blob/blob_test.go | 2 ++ pkg/blob/nodeserver.go | 22 ++++++++++++++++++ 6 files changed, 27 insertions(+) diff --git a/charts/latest/blob-csi-driver-v0.0.0.tgz b/charts/latest/blob-csi-driver-v0.0.0.tgz index 8ba56091e056733c6f82c910169f1366649b3573..7f2789b0d6756f8d2390b6d39cf1ee68ecbf91fd 100644 GIT binary patch delta 5877 zcmV-*ZDU@TYoIz3PRRJfy)~KaXAxgA{#CX)LWn3Dky|FgiH|0_@axNcRz}zD@Zeu zA`Kz&bg4Yl-(lqYBjyu#(M5yFkjW7T0aU$o1sQQRCrUp6w-8`LH1DEY;1nbXMMBYY z!n9LLa(>h}ZnV~s^vN732r=U97B-`pbO}|L482aH-G5q7kTMT?dU0LBlnBZ376VnC z3UUR4{JzZ$bJHP1s=c06&GlL2#k<5Py7h^BuAbCtuU?@mm;eXr z0+I|d3W#wOFb+t7%RvhD_!dwkz(ZeWKs6acr$~#aP$)P|x@ab4D7wuI(+$F!9&<%g zVsR&$E`OsFGL1MmA@dxUQHco!-c4LNge@ug??5;QU8C9VpxO?us~ml z@2fGJE*_dNjutFxpfN}_9TV&eKxCpGqOX|hhkua(^*2ZCD{Uxxj7rXYA9z=NX~(R^ zJm(30#`W~aLYqOS#c&5iHGYfT;-o0_OG816#<}9uRThRq zjVWaktG~2NV9(S4_&$;|Kq2!)Eo9zV3e`mqk7YDIz6F03h6@c~IwQwH=aG;sDD)## zGJh0+#2%Ko=4y~kM}%IXyB~#v!?0}lD4s504%$q@Xv7KQL@v&KEHr+gLRnM#V=AVQ zi1?h$0dWv4;w~UDV_a@3{Vt;}gfd+KdUl#>5ri>mC*%Nuw&j|&Fw4(Se-W_|5(3Bd zBO!r1E+>+>*jLoY;6@5s%NyKFG*z6c`F~_#$heHCdMO#=5k<>Ihp<4DQO=k|w+kdd zO0}f1TJ##-xxuC=+%6E@;~?|_b=BVmkS=;qxX;9Ap+vpiYPHd0tqk;7t7VqNQrIj@ zL&>F5Pv?5R(pB9>SSc_^zchP|R}C#f>_Qi*58{~lt05(8>}x*=)$A_&EX9Augnt}@ z{L1*$_aL3u>rTOT~71X9M4$3V@iL>`1dJ;W&bG#(_~Ye-2fC$1PV zF1x7nual!U_N{LQ*q5^utW(q5gHK#6x=8;O(M$RXD|zS|g_JxzH~frzOd);cv#FAK zzl)AFE+fgpkhAUgim!l3k^H5Y4}bLDblhrvBJooWzeOOjP;MA0DF{m4I!Q0fc&mxE zpGYjVkg92Po=Bs(k$$^VvQYI_*y{azBBV%Oz+?ih?4tURjole|kq`Ba@W+cIRKobpsed?6AXC#@ zYgsL+$1kRk^xFaT3574rj{^7zi!;{+A$}%uHt>K-Ee^>d5AgkGiszX4N;`E?+op1k zH&Z!BC8YsWVSVSb+esu~#Mym@^lk33#z?4;*!PnT%TcAkOP@x)-FVYDuG_kGEd4rZ z$4;Z&Xqk=z`+s2L-p7ljs;Jk|E3{NX$at>Q;~ywf8b$o$HR|=>eg5zo z4TkS8U!$MTu7-o*hkw_oe|2?vrR*?eOvm~~Goc=&f7g6MqkA0wmSBt*5n}=ps{0FdFq1&lDG>|(D1SENH9@J4p+X%iHOQcc zz7jdpVB1lRNep^Q{$gBuSTF6#I<#F{(f=zU2(|C7IlR2?j~nt{KAFb4_|MTv(f@mV z^5*Tq|N9*6TB)8@K^>)Lrtz`VgV1LS(B2g7wTLxLqgK0S$en?Ew+5MUb4V;B@fw9b zU;*kd*{#J&)_;{gavYjiv8N9YsBr}vuCcUj(c`0H$slta5pRm8b#5R_z0l)h9XXEP zwhwwL*Q(e5%?$hyxM;}miJ_o1>%Vh!@}{uQ0IbsHgw0d8?gk2eaYDaHm*} zL(j?}(s6~`Mar>p^fqdC#x+PvEaZgB39A21IDZrM`~b}V6_W{oaY!3%I1CF;3uB5uJfLK4=e|t?Sv%>&F?CJHqB5;!**MRu z`1Lb`BBU;eC>P`Lkut zgdO2B|3P6Zb@>DR7BQKd)yK!0I`=fhtf|G&Hh+XzJ{wtf;+2#QQkd6Bvj5<~UjeZs zocpq7*@uzuFN1Uw##8UUK=$t(rg5~)$4)sc2HOIcIQfWc9CIoV@7SPmUp<6w$4JgKTwuxVL(Oz)kE!TvwWn)#hW3YIDNCUSCc8tnthv8&9=!F zM_B5eCtmUCav^QIL}ozJe);^FVNto{UuUqT7;=8`<%iFkU`%w8cIH+IT2>vT0e|m| zAgzvT#(v%0+*C_-kytj6z5&Tx5VC^uDxu3xSiwGACuo+Gk<7;`z0Df8$>+|eYb;q8 z;3~s@#F;vSrq2;l=g}^@il`(3^vnrz<@hpDk(6*QRI&3b-WHS!4%jWiQ4tF+>E+J8m$%;cK>NtPyhd@Q|Ng}b{BTH+~se5{)Z@C9th z&;DrU_W^`3pNgy)sA;b|^V3ef^ibQc*z-6Dar*raXT9E4e?0z&1<(iV0e2uy6I&0l zfh*F2L`f=(r~$jWL_Uk_A2USjAeP# zFgptNZumFb?VNd)$i+zz_U#9#7cxTS>GwaJj|VsXVQ+Lf7+%{p#D6$xYq?l-g;t~0 zwUf=Hc-bi%CzAT)S;o!N17U^eWI>a{~*QmHsP9=+Zbg*?dn? zk7&6+8;IWv??TQbbAOrNMc3z}UD(LWu9b2OvLR(_I-O|~O#Fz$^^Ajem!DZAFU3ApS!NeQf@^w4^Is{IbXYX8X2L9jA zSN)swtA4LPydIog+`J!L^le7rd(ML5SoO(jLZ+W^_z@OYFn=inB%dYDedXXe>TGC% z(@DE(_AKv`M5|1WW^o`{C22QmBTDYO&1SVJ5pQi2irOYkF+=rwQScH5e!9LMjc-O* zm;e5coqk!1W$+e|TKAVV9B#tk_WW(bUS6m^T;7a(A8#%$KipjOzw|FQrCLrCte6J) zE!7c9=b^gJTYni#?A~c5SUDAj!T#{e;OcVtsXx5dVm~^&{;A?T1k%k^>ohfsLebHL z8~+uIuAiXw*5fkp_H1XSV&}p@t%%aKyx*@PgulYrRh$XoH(lVesNOkX?~?ipi+)(W zk}}L{*J8sYf};8aJjU_!vYJ8egm=Y{SR@eMk*13s$$ujuo7x-U%EA}feqwewLnxVD zdvwTFqi*J5i)&=|?p?FuwR*V{$lbkaPo%Zk`C?PQnbqs|9KN)_J2Ol@9~`5=96}=j z4sg!+sZKfn`^);PlDYr0AJ$V=E0&vK)Z*i|@~2N0x(4N;yk4y;e#V3uOy2BVzi}Av ze~)k-u76lua+Bz_gxP85u&d&=JeKuxbp&&p-C=L+RPO?7k*(Ph)`c7kah>Xbk4QYf9Pz5b6{ z?RGK$|Lt-6_^|$;qs94u7y?GeutWNvmX3WU{uL1Jq&6a5U_F)`OPI!0;>su{bZTm^ z6Ms9XSjb-FBmX|(C{9VqBHSf&ur$&a$r-e8amW^Yv1~!>z+NJuFJ^)9yr5X_X0QRI zwdVO0!O@_X^Czv&Bg_DLR3y84k^`0;Ft$k`R4neAI#|j%Gb?BJY`QepGa;>zot2)N z%L9}F)QdQw)A%wGLZ^c%Wy{C?dvGItO@C+Zke6lf8h9Xzkrv13s{Vb*A-+Mv5=V)z zMv>+gfO1PO9vCt?pjMc;MBn;OQJ51hBkVhAaeXQ!ndPA8J)1gfS?hV2_3Pa{`19sB z>hbI;v(Yx4wsoCq8A{~&ibTlxCKV^S#>5F#|3khXd^*Jl?OH}5Vk-@X4lwg!#!bFXDIclA%BaD9)(du)g$L~g$Huf~JR;ZDQ~ z7YS7oD~_zQkD+zej;*to!FAS+ZhzdrzWH?a@0-g}f2hNrH^a}Lb|P82LaCCbqW2_H z!De)NgYntBi~h~$QSa=!-+Q+ct-}3I1!C)?0m}MuBC#qKpg@{MkX(O|?z;X8WUEy7 zLiTEk`Z>}Xw~SC9QfvRWQ)~6Q+B9oS;hCRyHV%(zedn{ zOMf-~Z6N8hq(r-CXrQ+>9^JKi-Vau74_H z$jjJ@+&{QakMT*fT5$&Rnp?j2JCFoRz&tp$qbjKP9kUCMH?b#o3d?6UY|C)%xH7_L zVzKei(c@z?^rI=EqFEWkuzxY}O~U$V=iC=rjUo%Ws}8g*#X~;-GvxD|eQsZw{P_c6 zw&(Hyq!Tz-A~9Zo0GwZ;{QRzeGra8eZ-!@|`ZmhDRt{{Cr>}Yb z78&~0h*#w1|M_YiHmMdc?z9c+1oDD31(~F735lgRwM1lX7m8Les(CVpL=L4Ihf<9as)}uKJ=Xm0c&G*0 zh`(KGLGo6^=Hfab;D37+a$5MkyE1_8Y^-Y$f~(b&{;3}uhlgsFZ&9tXYvkfNs$5o` zC9UT)&O$uJ=GPP75l<&FYb|GGLHE&y`?o8$$s-DK@usx1Neoj~(|#rLP^t6cl{)r- zdUfJP!g!WB7Ru)GM*^GL>}=|v$jY;p2%@q|ORsk*BPzHqtbYYW+YZjja+&x z?cAseO6Ml9{_^|5R-%++zS94-`6jcE1@eMBPwB%iD}=Vr9$6XQTv?cs1zi#1Tvyy; zlVWFOuP1qo^QXBr^-C*kkKI|^iGvE$(ZyBwT!i{!;&Bd{_OC0L*4(&;;y8egXV%OQrCE#o7|4xoh zjtcdE?UT3dL;cTlw1U1+AH892rqmbr$Hjls9fU)oOa4R`{eM!g|Ee)%P6of!!)1+MY~#j2 zbKticU<$JS8r6Lw^uPL$p#Ed#N&U}LHV^22I}p^DaBfW1)Hc~@lw%0j$3kp4 z&JD)|bD(mEnTtpB8r8!pa_fiX3ZgdZy$;@`g&sz3L6q@Ge?TUnU9EDx4K24!MyLM9Y{oJ}~KLY+2 zP)db~*jOR$RUfG@Qu(!(lapjyJ)csFf7Yr($bVy*{d+bhvvWZMT zJRIBpXlu^@&$Z`~BR5 zYW?f9?e+imCxNy4|M+b||96g$4!{5ZEbYbge`-)3H2*>KAKIZE+MylVGq?X200960 L#TPL)0H^=}Iv24I delta 5866 zcmV3Cpr zCE-j0EC4E2UH|Xj03gK|sFxKx?I+A+Vv&p81+Z8wb{F8S&u$%85Xa+W2E2Jb#auS# zIPkyQS!uOet&^i8{eP>~D*oSUpB#SIK00o-jt^UJ+U@UJ?SG^8aqBzO+8qnkB@z~Q=&jFg(MU3mCxFgJ zePo2EMsWZgR1m4!Y=OVkXf;~3mu~XDWJ+=V&#)hX*sTIsKL6Y8*2!^k{vWm5`}zMI zg#>s4of<;7SbxA3gsg)Cmp209awgbVHe42{w?4a7PzZ4dnIMw!c?UJ`eiThtkY*x9 z8bad9LV2j)VdVQm<`Z|`LH+T7$sq>;RK0Ws8FDrwNv{sSy$qXn6G34wP)}xqI300L0y@N)(wSSr*Wgc|($Avl61}J*m}Ry+T(o1`gB( zBpG595aTFd9FPE)gB0rVEuct%hrUdKYBGdQkQPy)P;eM`&{WD$beb8a8-z7I=8C4o z;!ZSOMt{d-5^-=s<~c5-5)%r%sqi@(nGRF;e)+Zb3OUHE zX~8@my!i*18;}7GpjH#WXT*gw*JTlvs()P$SV9L$9szoVepXFUf4@dCEW!p@pfAMt zRhvx}4~-c|a~3tw2&C$cG4=%@GFA`K7fkiTNPmF(%@O-T8;TyIk~7~2-ccj%n7O!k z=m?BnA;m0WV>F6ci205CJfY9H?*3S4Gw8G!Zh@%AZ?RkK6or0aC}`0*SDd=a!ceF& zrA%V=OUnfIJpG^VBRK^WGEdY(=AETb9rW;6M&sjK@Rwn@&;X_~avXFX3CV&&Jwhcz z0e?vBVTo(52FX-J=oPyAQ8+jZ%Z88Q=>le;%_NM5oG?!0{M^Sv;|D5~HKhkrF@;3L zXJiJ5gJ2PN0f{N&a$V_n8Fe9)=>*Wd(^Qinj7d8o2MDw+*Q|wEeg=9(#9T-S9M_M8 z1n#(;NaA8&Q6GUDDQGQka4*qBajN>0g?}OAGNS6GWQa!;EhZhp0#QaeV-nrYkpL;x zl*Ve(Yjo!Zo1$<#M{tjW&?MBrN=Jf#Fu#*xQB^{Yf4gg`ySDEc_+C)I06Nh~L>7&0z9 z=-^)`he!6MZwlC#(-iEWrk4kwxL9l6k*_ zjx{bL$-ZGSp$wLX&gDTm)85LqZUjFc1vrD_LBElYc=iM5|d zEVYoTX&gL}MsXqkT3v_7W1^;Wtm2gRAAwS>jK_~8^MS|OS7UL|9n3qZu2%}qd}!n~ zRG=lO9#dqYs;#iqd-p_0k-UKM7+l#w^#L2XQ}7}m>TBVTCr7A+@vBpDo_|25rkB>T zT2hZ+Od;vFed-empP3&8@B!v$t_wo^Oysoh0hL-Dl1U!m`%e_lF!7ak>Y(;|+U2mM zAAl+ZZ+&(B?v7B~LGtg!_ z4wWvyCIO5j4#GawAYGEtyMeN`hQI?Ngt2^DZ{EBq>)B`3e3cuV7gn}UC4zsaWAOz` zcj~dp*KN^O3fHQ4%!E2qtbf!y5+irDF<=>SEem7up0g-Sc5qjKy?>uMk#I>}P}BY0 z=z1Q)0@r(xMkkCUR{J6&i#228c5=pi!xf~VRaNXZF!r)C*v=-Pn5iosqvZD}8js0+ z2h}e}BWDVJpx)~G@7bvP;bNgG>UH!AE%XgCPAc{I2g;O25&w9Ny1lob-oHlu!Mn@X z=;yPmL4WZ6HR@emU4LFFlS|pnv3}7^s0ZoqnonqSuUezjrVp}%nlsFsKDlkiPilHj zOU^pTgIj`Wt)>h(pJ8vIAhk*+KxMxhlX-=HVcOot{;#M%)&}$0SyxSVWn`Jniry`8 z2Ma+a6g(7QiYLnGi}502tUW??eWCVX5~$h`Vxb?!7P}@W)qjpts2!vR>37i=BBvT` zGpaF(epks~j7vA`rJYv$va?e3|4Il#?YnCZF0Xr|hP;lvKe6PH6 zrF#C~Ou-Lc~l7;mDV$VX_SL z)NFh<5l01iIRnm#2j~xFwNe+I9O^$wU@S#ccT!|PJ^i=lt#+;*%!U`konkc(Ju53o z#}#hpDaXdq+o;(Y*B~jekP|A$sQx$M{7uyJ4KRPl+eh?=_Ma&&RsWwls^8SNX$%Vj zrffK)*ndP7lL>%vNE>W83=2*RW1l}fpk!|6#-@R+mGq98x~5`LnO3uGoaa^i`WZge zOF~^g@~T=>!I{f~kWsyx$oSgJa3SW>VdITk9-G0=?L6Q1B;t|qK2ApdY>_izN4Us; zP}oXU{y@J)Oy+v^@v){hLk%%)YB97mA(qcZmVcdiCS`*Z<~5S+KREE0Kr9I7M%GOG zF!KFHkZ#O)>fIN}KF(npN6QR$%3(3srU;h;aJmx5bOKB3p+$^Nb#Fy$@(p`wo%=17 z>h<3eFxfIKWcm7k&^jot{|Bu%CrA7B|2fJXpH(GLNP&wGbnH2e zXW7vw?+uA$73#!3Ug=IRGHkBRsEyU~3YW5cVk#!{FD9Sqcvr6ar7Ee` zE_%BfiK{DH$9Vq|&_?1*YHDYFUGiuVHh(erW9?i)auKCZGSc^&dDAdk3ifvR z*IVtJS(V7enGyEo2dEb^LgnfAKb(*HH@!i3c-bFZ+ZMz)PjoR^^nVGhMyq2do5?D* zQ#MW{HRM^w&C_H@YFodxKhiPj2os>vQoE2!Vn>u>aD;ZUTM!kpPbxUlnRX_T+A+RQ zr`W7a$5`|5Hp8468Ec|nVt?p#J_mwO&U5rC&|7l@3z(JuD@o|WI5sJMPf?F(u|6A! z-wW?T&Lnf0-$B>s!+&kq$jh#katyL2WowR|DPv6hh{N@igP1bkGr5jwnMxVH2iYl7 zGOD?v19aPL?+7K5V807Ko{zv~)Ds&n|A>^)GrhqwpPPL9wlRXEi31k2w4Q^D7va0g_>fbAMksc#hf|THtijuIfF@ zyCnN6lek%INLESOjoOHk`%bf2ZA!#T8-=2_N%PK7y1%a|bKB0e(w$gwlDa zuJcw#61#U=34d00g<-Ha_}ss`9DM8zuC>??&#r%}*bjkpGpBW$nnj`LXu^&E3Px9V z&}!>(5qNvHJyWrAp`lhp>0I9Js0iUNF?JPaLikM=xGbu74%oY-{@kJ;md~UNv)Z-T zFxjD~J_e6*{JgAYkUQaBaS)3H!aLG*u_JjTWK(-1Tz^>@k#r*_B&|>}k~X zJZ$k9nVoyrtazui6u7t+&5e*KcO^x;=+4?eESMQ_ly-C@_c6NPq*JGk&V` z(Et9j{;H(!zxB;}%4)@QGmKh%+*bbd&O#qdc_`0UtBRj8VH%S+J6A6p#{1tTT!$;> zm)s6l&8>>;<((Y6d@ar~>1gD@Vk*#C=Yp*7||Wga}~La62Q|4{uav0T_-14s{`=TiiS z{cg^mv^H@{K0XGfWh zw(hje>r~57BF~p3LdMstILX~6PN?ed^F6Blu_fS*zcXc_q?hU$jcWRw7N~i>mT}fu8ghqp@ zKNww~U0mF}y|{e)?$gK`G|uA(jxi`P{o2^)Clo5i8s-R7tGZ zvV&bT?O#aOqQl*y?D2vVNRMEQrU+CO({t)5rwW{oL4v(tmM!($rxwppz9+nCpoH_H`iyOp|?1b@nsV5_pF z1bz+bn@eLF!7hQt8;ZrC>2P$2<@EIXAG%ll&%LXgtKR#Y(dGGvo8j5@Ph|{w8C#P3 z2lweVJ}Fi!&R||~%lB>@l3)p#2d8#a1@*pVcH!|l_T*M!`OJcCX|5etM)*uDHf}n4 zd~Ak(G$B+pD`OZoCca8oKYy*98+A`x6%X6BZ>@6|325tocQ4e}rQ#{Z<*!e{Er0J^d{cT82W(#afQ>y4UY&1|FrHcaKLwA2_1w>=eG*l%DGmJMV9&-$A4{W>OV5*JL6<}(SDi_*NwKrE){`8)`Q6-# zV@FGDkL_99ih~N%8@4Ka*vlDv(pj)22GrW!kqhcCzR{Eyk4j5xe;Dm$ z4x?>u8Lg1QwSQKD^~JHYO6-r*?aQ}Os?Y!MTkJYJxdeR0`M;CHlfwC*gZ9ar_XQT`%>SbAwAy4e6S(;pM=+1WvJ^ zy-ZbKe7pVmK_2-g(cD2eB>Kpo=%8Qf^6@RA0c{4WCs$wS%1I$KUib85|njh`r%>k@3540_y141 z1Z2hjzkPUEy8q|sV1NI|vy>J4|7TqY^f8EUX$g2C#h>kmZ$;&2FHU$CWp5FNy_(;B zsn-9o0AM2kPw@n=(*LcK+~q&Zsu}bS@p2uql#5jyOQ3iijt$&O(phv5tG=JRSFL}Yvbp}>d?&C{ z{~y08=>LP`qy6{)pQXH*{!b0cz2@I*{(ae(ec6|NdFJwe0RRC1|2J7-005`}00o_Z AcmMzZ diff --git a/charts/latest/blob-csi-driver/templates/csi-blob-node.yaml b/charts/latest/blob-csi-driver/templates/csi-blob-node.yaml index f7b6a48f3b..f0f5118fd6 100644 --- a/charts/latest/blob-csi-driver/templates/csi-blob-node.yaml +++ b/charts/latest/blob-csi-driver/templates/csi-blob-node.yaml @@ -171,6 +171,7 @@ spec: - "--mount-permissions={{ .Values.node.mountPermissions }}" - "--allow-inline-volume-key-access-with-idenitity={{ .Values.node.allowInlineVolumeKeyAccessWithIdentity }}" - "--enable-aznfs-mount={{ .Values.node.enableAznfsMount }}" + - "--metrics-address=0.0.0.0:{{ .Values.node.metricsPort }}" ports: - containerPort: {{ .Values.node.livenessProbe.healthPort }} name: healthz diff --git a/charts/latest/blob-csi-driver/values.yaml b/charts/latest/blob-csi-driver/values.yaml index 8ff043a423..82fb98945c 100644 --- a/charts/latest/blob-csi-driver/values.yaml +++ b/charts/latest/blob-csi-driver/values.yaml @@ -111,6 +111,7 @@ node: allowEmptyCloudConfig: true allowInlineVolumeKeyAccessWithIdentity: false maxUnavailable: 1 + metricsPort: 29635 livenessProbe: healthPort: 29633 logLevel: 5 diff --git a/deploy/csi-blob-node.yaml b/deploy/csi-blob-node.yaml index 45980e3002..de64d3dcad 100644 --- a/deploy/csi-blob-node.yaml +++ b/deploy/csi-blob-node.yaml @@ -127,6 +127,7 @@ spec: - "--blobfuse-proxy-endpoint=$(BLOBFUSE_PROXY_ENDPOINT)" - "--nodeid=$(KUBE_NODE_NAME)" - "--user-agent-suffix=OSS-kubectl" + - "--metrics-address=0.0.0.0:29635" ports: - containerPort: 29633 name: healthz diff --git a/pkg/blob/blob_test.go b/pkg/blob/blob_test.go index 4b22b7ae6f..61a5929f8d 100644 --- a/pkg/blob/blob_test.go +++ b/pkg/blob/blob_test.go @@ -60,6 +60,7 @@ func NewFakeDriver() *Driver { driver.Name = fakeDriverName driver.Version = vendorVersion driver.subnetLockMap = util.NewLockMap() + driver.cloud = &azure.Cloud{} return driver } @@ -92,6 +93,7 @@ func TestNewDriver(t *testing.T) { fakedriver.accountSearchCache = driver.accountSearchCache fakedriver.dataPlaneAPIVolCache = driver.dataPlaneAPIVolCache fakedriver.volStatsCache = driver.volStatsCache + fakedriver.cloud = driver.cloud assert.Equal(t, driver, fakedriver) } diff --git a/pkg/blob/nodeserver.go b/pkg/blob/nodeserver.go index ca49e18ceb..c9a809aecb 100644 --- a/pkg/blob/nodeserver.go +++ b/pkg/blob/nodeserver.go @@ -28,6 +28,7 @@ import ( volumehelper "sigs.k8s.io/blob-csi-driver/pkg/util" azcache "sigs.k8s.io/cloud-provider-azure/pkg/cache" + "sigs.k8s.io/cloud-provider-azure/pkg/metrics" "github.com/Azure/azure-sdk-for-go/storage" "github.com/container-storage-interface/spec/lib/go/csi" @@ -238,6 +239,12 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe attrib := req.GetVolumeContext() secrets := req.GetSecrets() + mc := metrics.NewMetricContext(blobCSIDriverName, "node_stage_volume", d.cloud.ResourceGroup, "", d.Name) + isOperationSucceeded := false + defer func() { + mc.ObserveOperationWithResult(isOperationSucceeded, VolumeID, volumeID) + }() + var serverAddress, storageEndpointSuffix, protocol, ephemeralVolMountOptions string var ephemeralVol, isHnsEnabled bool @@ -340,6 +347,7 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe klog.V(2).Infof("skip chmod on targetPath(%s) since mountPermissions is set as 0", targetPath) } + isOperationSucceeded = true klog.V(2).Infof("volume(%s) mount %s on %s succeeded", volumeID, source, targetPath) return &csi.NodeStageVolumeResponse{}, nil } @@ -442,6 +450,12 @@ func (d *Driver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolu } defer d.volumeLocks.Release(volumeID) + mc := metrics.NewMetricContext(blobCSIDriverName, "node_unstage_volume", d.cloud.ResourceGroup, "", d.Name) + isOperationSucceeded := false + defer func() { + mc.ObserveOperationWithResult(isOperationSucceeded, VolumeID, volumeID) + }() + klog.V(2).Infof("NodeUnstageVolume: volume %s unmounting on %s", volumeID, stagingTargetPath) err := mount.CleanupMountPoint(stagingTargetPath, d.mounter, true /*extensiveMountPointCheck*/) if err != nil { @@ -449,6 +463,7 @@ func (d *Driver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolu } klog.V(2).Infof("NodeUnstageVolume: volume %s unmount on %s successfully", volumeID, stagingTargetPath) + isOperationSucceeded = true return &csi.NodeUnstageVolumeResponse{}, nil } @@ -491,6 +506,12 @@ func (d *Driver) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeS return &resp, nil } + mc := metrics.NewMetricContext(blobCSIDriverName, "node_get_volume_stats", d.cloud.ResourceGroup, "", d.Name) + isOperationSucceeded := false + defer func() { + mc.ObserveOperationWithResult(isOperationSucceeded, VolumeID, req.VolumeId) + }() + if _, err := os.Lstat(req.VolumePath); err != nil { if os.IsNotExist(err) { return nil, status.Errorf(codes.NotFound, "path %s does not exist", req.VolumePath) @@ -548,6 +569,7 @@ func (d *Driver) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeS }, } + isOperationSucceeded = true klog.V(6).Infof("NodeGetVolumeStats: volume stats for volume %s path %s is %v", req.VolumeId, req.VolumePath, resp) // cache the volume stats per volume d.volStatsCache.Set(req.VolumeId, *resp) From 7c9fdd97bb3edf9fd98db0765072066f10dca97c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 17:00:20 +0000 Subject: [PATCH 11/11] chore(deps): bump github.com/jongio/azidext/go/azidext Bumps [github.com/jongio/azidext/go/azidext](https://github.com/jongio/azidext) from 0.4.0 to 0.5.0. - [Release notes](https://github.com/jongio/azidext/releases) - [Commits](https://github.com/jongio/azidext/compare/go/azidext/v0.4.0...go/azidext/v0.5.0) --- updated-dependencies: - dependency-name: github.com/jongio/azidext/go/azidext dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 +-- go.sum | 8 ++--- .../azure-sdk-for-go/sdk/azcore/CHANGELOG.md | 7 +++++ .../azure-sdk-for-go/sdk/azcore/arm/client.go | 9 +++--- .../azcore/arm/runtime/policy_register_rp.go | 18 ++++++++++-- .../Azure/azure-sdk-for-go/sdk/azcore/core.go | 9 +++--- .../sdk/azcore/internal/shared/constants.go | 2 +- .../sdk/azcore/internal/shared/shared.go | 29 +++++++++++++------ .../sdk/azcore/runtime/policy_retry.go | 3 +- .../azure_identity_credential_adapter.go | 6 ++-- vendor/modules.txt | 4 +-- 11 files changed, 67 insertions(+), 32 deletions(-) diff --git a/go.mod b/go.mod index 0d1aa1a475..77fa406c1b 100644 --- a/go.mod +++ b/go.mod @@ -34,11 +34,11 @@ require ( ) require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1 github.com/go-ini/ini v1.67.0 - github.com/jongio/azidext/go/azidext v0.4.0 + github.com/jongio/azidext/go/azidext v0.5.0 github.com/onsi/ginkgo/v2 v2.13.0 github.com/pkg/errors v0.9.1 github.com/satori/go.uuid v1.2.0 diff --git a/go.sum b/go.sum index a1a86ae095..750ee1d1e4 100644 --- a/go.sum +++ b/go.sum @@ -36,8 +36,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 h1:8kDqDngH+DmVBiCtIjCFTGa7MBnsIOkF9IccInFEbjk= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 h1:SEy2xmstIphdPwNBUi7uhvjyjhVKISfwjfOJmuy7kg4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= @@ -259,8 +259,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= -github.com/jongio/azidext/go/azidext v0.4.0 h1:TOYyVFMeWGgXNhURSgrEtUCu7JAAKgsy+5C4+AEfYlw= -github.com/jongio/azidext/go/azidext v0.4.0/go.mod h1:VrlpGde5B+pPbTUxnThE5UIQQkcebdr3jrC2MmlMVSI= +github.com/jongio/azidext/go/azidext v0.5.0 h1:uPInXD4NZ3J0k79FPwIA0YXknFn+WcqZqSgs3/jPgvQ= +github.com/jongio/azidext/go/azidext v0.5.0/go.mod h1:TVRX/hJhzbsCKaOIzicH6a8IvOH0hpjWk/JwZZgtXeU= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= 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 7ecc8f2a96..c4da5d78f1 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,12 @@ # Release History +## 1.6.1 (2023-06-06) + +### Bugs Fixed +* Retry policy always clones the underlying `*http.Request` before invoking the next policy. +* Added some non-standard error codes to the list of error codes for unregistered resource providers. +* Fixed an issue in `azcore.NewClient()` and `arm.NewClient()` that could cause an incorrect module name to be used in telemetry. + ## 1.6.0 (2023-05-04) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/client.go index 94d018d435..aa34575f66 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/client.go @@ -28,12 +28,13 @@ type Client struct { // NewClient creates a new Client instance with the provided values. // This client is intended to be used with Azure Resource Manager endpoints. -// - clientName - the fully qualified name of the client ("package.Client"); this is used by the tracing provider when creating spans +// - clientName - the fully qualified name of the client ("module/package.Client"); this is used by the telemetry policy and tracing provider. +// if module and package are the same value, the "module/" prefix can be omitted. // - moduleVersion - the version of the containing module; used by the telemetry policy // - cred - the TokenCredential used to authenticate the request // - options - optional client configurations; pass nil to accept the default values func NewClient(clientName, moduleVersion string, cred azcore.TokenCredential, options *ClientOptions) (*Client, error) { - pkg, err := shared.ExtractPackageName(clientName) + mod, client, err := shared.ExtractModuleName(clientName) if err != nil { return nil, err } @@ -52,12 +53,12 @@ func NewClient(clientName, moduleVersion string, cred azcore.TokenCredential, op if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } - pl, err := armruntime.NewPipeline(pkg, moduleVersion, cred, runtime.PipelineOptions{}, options) + pl, err := armruntime.NewPipeline(mod, moduleVersion, cred, runtime.PipelineOptions{}, options) if err != nil { return nil, err } - tr := options.TracingProvider.NewTracer(clientName, moduleVersion) + tr := options.TracingProvider.NewTracer(client, moduleVersion) return &Client{ep: ep, pl: pl, tr: tr}, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_register_rp.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_register_rp.go index 49e6608070..c3f5eeafe0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_register_rp.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime/policy_register_rp.go @@ -80,7 +80,6 @@ func (r *rpRegistrationPolicy) Do(req *azpolicy.Request) (*http.Response, error) // policy is disabled return req.Next() } - const unregisteredRPCode = "MissingSubscriptionRegistration" const registeredState = "Registered" var rp string var resp *http.Response @@ -101,7 +100,7 @@ func (r *rpRegistrationPolicy) Do(req *azpolicy.Request) (*http.Response, error) // to the caller so its error unmarshalling will kick in return resp, err } - if !strings.EqualFold(reqErr.ServiceError.Code, unregisteredRPCode) { + if !isUnregisteredRPCode(reqErr.ServiceError.Code) { // not a 409 due to unregistered RP. just return the response // to the caller so its error unmarshalling will kick in return resp, err @@ -173,6 +172,21 @@ func (r *rpRegistrationPolicy) Do(req *azpolicy.Request) (*http.Response, error) return resp, fmt.Errorf("exceeded attempts to register %s", rp) } +var unregisteredRPCodes = []string{ + "MissingSubscriptionRegistration", + "MissingRegistrationForResourceProvider", + "Subscription Not Registered", +} + +func isUnregisteredRPCode(errorCode string) bool { + for _, code := range unregisteredRPCodes { + if strings.EqualFold(errorCode, code) { + return true + } + } + return false +} + func getSubscription(path string) (string, error) { parts := strings.Split(path, "/") for i, v := range parts { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/core.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/core.go index 72c2cf21ee..27231ad920 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/core.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/core.go @@ -76,12 +76,13 @@ type Client struct { } // NewClient creates a new Client instance with the provided values. -// - clientName - the fully qualified name of the client ("package.Client"); this is used by the tracing provider when creating spans +// - clientName - the fully qualified name of the client ("module/package.Client"); this is used by the telemetry policy and tracing provider. +// if module and package are the same value, the "module/" prefix can be omitted. // - moduleVersion - the semantic version of the containing module; used by the telemetry policy // - plOpts - pipeline configuration options; can be the zero-value // - options - optional client configurations; pass nil to accept the default values func NewClient(clientName, moduleVersion string, plOpts runtime.PipelineOptions, options *ClientOptions) (*Client, error) { - pkg, err := shared.ExtractPackageName(clientName) + mod, client, err := shared.ExtractModuleName(clientName) if err != nil { return nil, err } @@ -96,9 +97,9 @@ func NewClient(clientName, moduleVersion string, plOpts runtime.PipelineOptions, } } - pl := runtime.NewPipeline(pkg, moduleVersion, plOpts, options) + pl := runtime.NewPipeline(mod, moduleVersion, plOpts, options) - tr := options.TracingProvider.NewTracer(clientName, moduleVersion) + tr := options.TracingProvider.NewTracer(client, moduleVersion) return &Client{pl: pl, tr: tr}, nil } 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 681167bcba..269a831ed1 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 @@ -32,5 +32,5 @@ const ( Module = "azcore" // Version is the semantic version (see http://semver.org) of this module. - Version = "v1.6.0" + Version = "v1.6.1" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/shared.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/shared.go index 930ab8c839..db0aaa7cb9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/shared.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/shared.go @@ -13,7 +13,6 @@ import ( "reflect" "regexp" "strconv" - "strings" "time" ) @@ -79,14 +78,26 @@ func ValidateModVer(moduleVersion string) error { return nil } -// ExtractPackageName returns "package" from "package.Client". +// ExtractModuleName returns "module", "package.Client" from "module/package.Client" or +// "package", "package.Client" from "package.Client" when there's no "module/" prefix. // If clientName is malformed, an error is returned. -func ExtractPackageName(clientName string) (string, error) { - pkg, client, ok := strings.Cut(clientName, ".") - if !ok { - return "", fmt.Errorf("missing . in clientName %s", clientName) - } else if pkg == "" || client == "" { - return "", fmt.Errorf("malformed clientName %s", clientName) +func ExtractModuleName(clientName string) (string, string, error) { + // uses unnamed capturing for "module", "package.Client", and "package" + regex, err := regexp.Compile(`^(?:([a-z0-9]+)/)?(([a-z0-9]+)\.(?:[A-Za-z0-9]+))$`) + if err != nil { + return "", "", err } - return pkg, nil + + matches := regex.FindStringSubmatch(clientName) + if len(matches) < 4 { + return "", "", fmt.Errorf("malformed clientName %s", clientName) + } + + // the first match is the entire string, the second is "module", the third is + // "package.Client" and the fourth is "package". + // if there was no "module/" prefix, the second match will be the empty string + if matches[1] != "" { + return matches[1], matches[2], nil + } + return matches[3], matches[2], nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go index 5f52ba75b4..e0c5929f3b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/policy_retry.go @@ -125,7 +125,8 @@ func (p *retryPolicy) Do(req *policy.Request) (resp *http.Response, err error) { } if options.TryTimeout == 0 { - resp, err = req.Next() + clone := req.Clone(req.Raw().Context()) + resp, err = clone.Next() } else { // Set the per-try time for this particular retry operation and then Do the operation. tryCtx, tryCancel := context.WithTimeout(req.Raw().Context(), options.TryTimeout) diff --git a/vendor/github.com/jongio/azidext/go/azidext/azure_identity_credential_adapter.go b/vendor/github.com/jongio/azidext/go/azidext/azure_identity_credential_adapter.go index 553b95a271..69531f60d2 100644 --- a/vendor/github.com/jongio/azidext/go/azidext/azure_identity_credential_adapter.go +++ b/vendor/github.com/jongio/azidext/go/azidext/azure_identity_credential_adapter.go @@ -41,7 +41,7 @@ func (ca *policyAdapter) WithAuthorization() autorest.PrepareDecorator { if err != nil { return r, err } - _, err = ca.pl.Do(req) + resp, err := ca.pl.Do(req) // if the authentication failed due to invalid/missing credentials // return a wrapped error so the retry policy won't kick in. type nonRetriable interface { @@ -59,7 +59,7 @@ func (ca *policyAdapter) WithAuthorization() autorest.PrepareDecorator { } // copy the authorization header to the real request const authHeader = "Authorization" - r.Header.Set(authHeader, req.Raw().Header.Get(authHeader)) + r.Header.Set(authHeader, resp.Request.Header.Get(authHeader)) return r, err }) } @@ -97,7 +97,7 @@ func NewDefaultAzureCredentialAdapter(options *DefaultAzureCredentialOptions) (a type nullPolicy struct{} func (nullPolicy) Do(req *policy.Request) (*http.Response, error) { - return &http.Response{StatusCode: http.StatusOK}, nil + return &http.Response{Request: req.Raw(), StatusCode: http.StatusOK}, nil } // error type returned to prevent the retry policy from retrying the request diff --git a/vendor/modules.txt b/vendor/modules.txt index a92072d694..a687863efd 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -13,7 +13,7 @@ github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage github.com/Azure/azure-sdk-for-go/storage github.com/Azure/azure-sdk-for-go/version -# github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 +# github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/azcore github.com/Azure/azure-sdk-for-go/sdk/azcore/arm @@ -276,7 +276,7 @@ github.com/imdario/mergo # github.com/inconshreveable/mousetrap v1.1.0 ## explicit; go 1.18 github.com/inconshreveable/mousetrap -# github.com/jongio/azidext/go/azidext v0.4.0 +# github.com/jongio/azidext/go/azidext v0.5.0 ## explicit; go 1.18 github.com/jongio/azidext/go/azidext # github.com/josharian/intern v1.0.0